summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* [RSForGC] Bring computeLiveOutSeed up to code; NFCSanjoy Das2016-06-261-7/+7
| | | | llvm-svn: 273798
* [RSForGC] Bring computeLiveInValues up to code; NFCSanjoy Das2016-06-261-19/+8
| | | | llvm-svn: 273797
* [RSForGC] Bring recomputeLiveInValues up to code; NFCSanjoy Das2016-06-261-9/+9
| | | | llvm-svn: 273796
* [RSForGC] Bring containsGCPtrType, isGCPointerType up to code; NFCSanjoy Das2016-06-261-3/+2
| | | | llvm-svn: 273795
* [RSForGC] Bring analyzeParsePointLiveness up to code; NFCSanjoy Das2016-06-261-7/+7
| | | | llvm-svn: 273794
* [RSForGC] Bring meetBDVStateImpl up to code; NFCSanjoy Das2016-06-261-14/+13
| | | | llvm-svn: 273793
* [RSForGC] Get rid of the unnecessary MeetBDVStates struct; NFCSanjoy Das2016-06-261-58/+36
| | | | | | All of its implementation is in just one function. llvm-svn: 273792
* [RSForGC] Bring findBasePointer up to code; NFCSanjoy Das2016-06-261-110/+92
| | | | | | | Name-casing and minor style changes to bring the function up to the LLVM coding style. llvm-svn: 273791
* [Object, COFF] An import data directory might not consist soley of importsDavid Majnemer2016-06-261-17/+29
| | | | | | | | | | | | | The last import is the penultimate entry, the last entry is nulled out. Data beyond the null entry should not be considered to hold import entries. This fixes PR28302. N.B. I am working on a reduced testcase, the one in PR28302 is too large. llvm-svn: 273790
* [X86] Convert ==/!= comparisons with -1 for checking undef in shuffle ↵Craig Topper2016-06-251-47/+54
| | | | | | lowering to comparisons of <0 or >=0. While there do the same for other kinds of index checks that can just check for greater than 0. No functional change intended. llvm-svn: 273788
* [X86] Pull similar bitcasts on different paths to earlier shared point. NFCCraig Topper2016-06-251-10/+9
| | | | llvm-svn: 273787
* AMDGPU/R600: Fix GlobalValue regressions.Jan Vesely2016-06-252-2/+3
| | | | | | | | | | | | | | | Don't cast GV expression to MCSymbolRefExpr. r272705 changed GV to binary expressions by including offset even if the offset it 0 (we haven't hit this sooner since tested workloads don't include static offsets) We don't really care about the type of expression, so set it directly. Fixes: r272705 Consider section relative relocations. Since all const as data is in one boffer section relative is equivalent to abs32. Fixes: r273166 Differential Revision: http://reviews.llvm.org/D21633 llvm-svn: 273785
* Just a small cleanupDavid Majnemer2016-06-251-30/+21
| | | | | | No functional change is intended llvm-svn: 273780
* Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"David Majnemer2016-06-256-30/+47
| | | | | | This reverts commit r273778, it seems to break UBSan :/ llvm-svn: 273779
* [SimplifyCFG] Stop inserting calls to llvm.trap for UBDavid Majnemer2016-06-256-47/+30
| | | | | | | | | | | | | | | | | SimplifyCFG had logic to insert calls to llvm.trap for two very particular IR patterns: stores and invokes of undef/null. While InstCombine canonicalizes certain undefined behavior IR patterns to stores of undef, phase ordering means that this cannot be relied upon in general. There are much better tools than llvm.trap: UBSan and ASan. N.B. I could be argued into reverting this change if a clear argument as to why it is important that we synthesize llvm.trap for stores, I'd be hard pressed to see why it'd be useful for invokes... llvm-svn: 273778
* [InstSimplify] Replace calls to null with undefDavid Majnemer2016-06-251-1/+2
| | | | | | | Calling null is undefined behavior, we can simplify the resulting value to undef. llvm-svn: 273777
* [SimplifyCFG] Replace calls to null/undef with unreachableDavid Majnemer2016-06-252-1/+11
| | | | | | | Calling null is undefined behavior, a call to undef can be trivially treated as a call to null. llvm-svn: 273776
* [AMDGPU] Emit debugger prologue and emit the rest of the debugger fields in ↵Konstantin Zhuravlyov2016-06-2511-5/+207
| | | | | | | | | | | | | | | | | | | | | | | the kernel code header Debugger prologue is emitted if -mattr=+amdgpu-debugger-emit-prologue. Debugger prologue writes work group IDs and work item IDs to scratch memory at fixed location in the following format: - offset 0: work group ID x - offset 4: work group ID y - offset 8: work group ID z - offset 16: work item ID x - offset 20: work item ID y - offset 24: work item ID z Set - amd_kernel_code_t::debug_wavefront_private_segment_offset_sgpr to scratch wave offset reg - amd_kernel_code_t::debug_private_segment_buffer_sgpr to scratch rsrc reg - amd_kernel_code_t::is_debug_supported to true if all debugger features are enabled Differential Revision: http://reviews.llvm.org/D20335 llvm-svn: 273769
* MachineScheduler: Remember top/bottom choice in bidirectional schedulingMatthias Braun2016-06-251-9/+50
| | | | | | | | | | | | | Remember the last choice for the top/bottom scheduling boundary in bidirectional scheduling mode. The top choice should not change if we schedule at the bottom and vice versa. This allows us to improve compiletime: We only recalculate the best pick for one border and re-use the cached top-pick from the other border. Differential Revision: http://reviews.llvm.org/D19350 llvm-svn: 273766
* AMDGPU/SI: Make sure not to fold offsets into local address space globalsTom Stellard2016-06-252-0/+10
| | | | | | | | | | | | | | Summary: Offset folding only works if you are emitting relocations, and we don't emit relocations for local address space globals. Reviewers: arsenm, nhaustov Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21647 llvm-svn: 273765
* [LoopUnswitch] Avoid exponential behaviorSanjoy Das2016-06-251-4/+22
| | | | | | | | | | | | Summary: (No semantic change intended). Reviewers: majnemer, bogner, mzolotukhin Subscribers: mcrosier, llvm-commits, mzolotukhin Differential Revision: http://reviews.llvm.org/D21707 llvm-svn: 273763
* The absence of noreturn doesn't ensure mayReturnDavid Majnemer2016-06-251-6/+0
| | | | | | | | | | | There are two separate issues: - LLVM doesn't consider infinite loops to be side effects: we happily hoist/sink above/below loops whose bounds are unknown. - The absence of the noreturn attribute is insufficient for us to know if a function will definitely return. Relying on noreturn in the middle-end for any property is an accident waiting to happen. llvm-svn: 273762
* It isn't meaningful for a transform to preserve another transform. NFC.Michael Kuperstein2016-06-252-10/+0
| | | | llvm-svn: 273761
* IR: Introduce llvm.type.checked.load intrinsic.Peter Collingbourne2016-06-253-17/+182
| | | | | | | | | | | | | | | | This intrinsic safely loads a function pointer from a virtual table pointer using type metadata. This intrinsic is used to implement control flow integrity in conjunction with virtual call optimization. The virtual call optimization pass will optimize away llvm.type.checked.load intrinsics associated with devirtualized calls, thereby removing the type check in cases where it is not needed to enforce the control flow integrity constraint. This patch also introduces the capability to copy type metadata between global variables, and teaches the virtual call optimization pass to do so. Differential Revision: http://reviews.llvm.org/D21121 llvm-svn: 273756
* MachineScheduler: Fully compare top/bottom candidatesMatthias Braun2016-06-251-99/+103
| | | | | | | | | | In bidirectional scheduling this gives more stable results than just comparing the "reason" fields of the top/bottom node because the reason field may be higher depending on what other nodes are in the queue. Differential Revision: http://reviews.llvm.org/D19401 llvm-svn: 273755
* Reinstate r273711David Majnemer2016-06-258-33/+74
| | | | | | | | | | r273711 was reverted by r273743. The inliner needs to know about any call sites in the inlined function. These were obscured if we replaced a call to undef with an undef but kept the call around. This fixes PR28298. llvm-svn: 273753
* Silence a -Wsign-compare warningDavid Majnemer2016-06-251-2/+2
| | | | llvm-svn: 273752
* AMDGPU: Define a schedule class for COPY.Matthias Braun2016-06-242-0/+24
| | | | | | | | | | COPY was lacking a scheduling class, define it to avoid regressions in the upcoming change to the bidirectional MachineScheduler. Approved by tstellar on IRC. Differential Revision: http://reviews.llvm.org/D21540 llvm-svn: 273751
* [PM] Port float2int to the new pass managerMichael Kuperstein2016-06-244-43/+44
| | | | | | Differential Revision: http://reviews.llvm.org/D21704 llvm-svn: 273747
* Hookup ProfileSummary with SampleProfilerLoaderDehao Chen2016-06-241-0/+1
| | | | | | | | | | | | Summary: Set ProfileSummary in SampleProfilerLoader. Reviewers: davidxl, eraman Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21702 llvm-svn: 273745
* [MBP] show function name in debug dumpXinliang David Li2016-06-241-0/+1
| | | | llvm-svn: 273744
* Revert r273711, it caused PR28298.Nico Weber2016-06-248-74/+33
| | | | llvm-svn: 273743
* Fix lib/ExecutionEngine/IntelJITEvents/IntelJITEventListener.cpp for r273701Kevin Enderby2016-06-241-2/+5
| | | | | | and the change to libObject’s getSymbolAddress() to Expected<...> . llvm-svn: 273740
* Simplify. NFC.Rafael Espindola2016-06-241-10/+1
| | | | | | | Also delete out of date comment. This code was always returning .data since r253436. llvm-svn: 273739
* Fix unused variable warning in -asserts builds.Peter Collingbourne2016-06-241-2/+1
| | | | llvm-svn: 273737
* Fix the type signature of DwarfExpression::Add.*Constant to support values ↵Adrian Prantl2016-06-242-4/+4
| | | | | | | | | | | >32 bits. This fixes an embarrassing bug when emitting .debug_loc entries for 64-bit+ constants, which were previously silently truncated to 32 bits. <rdar://problem/26843232> llvm-svn: 273736
* Fix documentation for FindAvailableLoadedValue.Eli Friedman2016-06-241-19/+0
| | | | llvm-svn: 273734
* [Hexagon] Simplify (+fix) instruction selection for indexed loads/storesKrzysztof Parzyszek2016-06-241-308/+161
| | | | llvm-svn: 273733
* [IndVarSimplify] Run clang-format over some oddly formatted bitsSanjoy Das2016-06-241-16/+15
| | | | | | NFC (whitespace only change) llvm-svn: 273732
* IR: New representation for CFI and virtual call optimization pass metadata.Peter Collingbourne2016-06-2411-328/+306
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The bitset metadata currently used in LLVM has a few problems: 1. It has the wrong name. The name "bitset" refers to an implementation detail of one use of the metadata (i.e. its original use case, CFI). This makes it harder to understand, as the name makes no sense in the context of virtual call optimization. 2. It is represented using a global named metadata node, rather than being directly associated with a global. This makes it harder to manipulate the metadata when rebuilding global variables, summarise it as part of ThinLTO and drop unused metadata when associated globals are dropped. For this reason, CFI does not currently work correctly when both CFI and vcall opt are enabled, as vcall opt needs to rebuild vtable globals, and fails to associate metadata with the rebuilt globals. As I understand it, the same problem could also affect ASan, which rebuilds globals with a red zone. This patch solves both of those problems in the following way: 1. Rename the metadata to "type metadata". This new name reflects how the metadata is currently being used (i.e. to represent type information for CFI and vtable opt). The new name is reflected in the name for the associated intrinsic (llvm.type.test) and pass (LowerTypeTests). 2. Attach metadata directly to the globals that it pertains to, rather than using the "llvm.bitsets" global metadata node as we are doing now. This is done using the newly introduced capability to attach metadata to global variables (r271348 and r271358). See also: http://lists.llvm.org/pipermail/llvm-dev/2016-June/100462.html Differential Revision: http://reviews.llvm.org/D21053 llvm-svn: 273729
* [APInt] Don't shift into the sign bitDavid Majnemer2016-06-241-1/+1
| | | | llvm-svn: 273727
* Add support for musl-libc on ARM Linux.Rafael Espindola2016-06-245-5/+22
| | | | | | Patch by Lei Zhang! llvm-svn: 273726
* Add missing dependency to LLVMPassesMichael Kuperstein2016-06-241-1/+1
| | | | | | Passes should depend on CodeGen, as that contains some IR-to-IR passes. llvm-svn: 273724
* [MemorySSA] Move code around a bit. NFC.George Burgess IV2016-06-241-34/+100
| | | | | | | | | | | | This patch moves MSSA's caching walker into MemorySSA, and moves the actual definition of MSSA's caching walker out of MemorySSA.h. This is done in preparation for the new walker, which should be out for review soonish. Also, this patch removes a field from UpwardsMemoryQuery and has a few lines of diff from clang-format'ing MemorySSA.cpp. llvm-svn: 273723
* [APInt] Don't shift into the sign bitDavid Majnemer2016-06-241-2/+2
| | | | | | This fixes PR28294. llvm-svn: 273722
* [obj2yaml] [yaml2obj] Support for MachO Universal binariesChris Bieneman2016-06-241-1/+62
| | | | | | This patch adds round-trip support for MachO Universal binaries to obj2yaml and yaml2obj. Universal binaries have a header and list of architecture structures, followed by a the individual object files at specified offsets. llvm-svn: 273719
* [ARM] Remove dead SDNodes. NFC.Ahmed Bougacha2016-06-241-7/+0
| | | | | | The opcodes are used, but only by DAG->DAG. llvm-svn: 273717
* [X86] Remove dead ISD opcodes. NFC.Ahmed Bougacha2016-06-245-18/+0
| | | | llvm-svn: 273716
* [InstCombine] use m_APInt; NFCISanjay Patel2016-06-241-18/+8
| | | | llvm-svn: 273715
* [PM] Port PreISelIntrinsicLowering to the new PMMichael Kuperstein2016-06-244-12/+23
| | | | llvm-svn: 273713
OpenPOWER on IntegriCloud