summaryrefslogtreecommitdiff
path: root/include
AgeCommit message (Collapse)AuthorFilesLines
2016-06-28TGSI: Add support for read.workdim intrinsicHEADmasterHans de Goede1-0/+2
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-06-28TGSI: initial Intrinsic supportHans de Goede2-0/+36
Add Intrinsic support for get_local_id() and friends. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
2016-06-27TGSI back-end: Initial import.Francisco Jerez1-1/+2
2016-06-26Refactor a duplicated predicate. NFC.Rafael Espindola1-0/+2
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273826 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26Apply clang-tidy's modernize-loop-convert to lib/Analysis.Benjamin Kramer1-4/+6
Only minor manual fixes. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273816 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26Apply clang-tidy's modernize-loop-convert to most of lib/Transforms.Benjamin Kramer2-13/+10
Only minor manual fixes. No functionality change intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273808 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26[RSForGC] Bring findBasePointer up to code; NFCSanjoy Das1-0/+4
Name-casing and minor style changes to bring the function up to the LLVM coding style. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273791 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-26[Object, COFF] An import data directory might not consist soley of importsDavid Majnemer1-4/+2
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273790 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25Reapply r273664 with workaround for MSVCHubert Tong1-0/+45
Reviewers: rsmith, faisalv, aaron.ballman Subscribers: llvm-commits, cfe-commits, nwilson Differential Revision: http://reviews.llvm.org/D19770 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273781 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25Revert "[SimplifyCFG] Stop inserting calls to llvm.trap for UB"David Majnemer1-1/+1
This reverts commit r273778, it seems to break UBSan :/ git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273779 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25[SimplifyCFG] Stop inserting calls to llvm.trap for UBDavid Majnemer1-1/+1
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... git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273778 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25Fix a typo in FindAvailableLoadedValue, introduced by r273734. [-Wdocumentation]NAKAMURA Takumi1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273774 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25MachineScheduler: Remember top/bottom choice in bidirectional schedulingMatthias Braun1-2/+27
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273766 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25The absence of noreturn doesn't ensure mayReturnDavid Majnemer1-9/+1
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273762 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25IR: Introduce llvm.type.checked.load intrinsic.Peter Collingbourne2-3/+15
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273756 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-25MachineScheduler: Fully compare top/bottom candidatesMatthias Braun1-8/+7
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273755 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[PM] Port float2int to the new pass managerMichael Kuperstein2-1/+53
Differential Revision: http://reviews.llvm.org/D21704 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273747 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Fix documentation for FindAvailableLoadedValue.Eli Friedman1-15/+25
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273734 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24IR: New representation for CFI and virtual call optimization pass metadata.Peter Collingbourne8-42/+47
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273729 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Add support for musl-libc on ARM Linux.Rafael Espindola1-0/+9
Patch by Lei Zhang! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273726 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[MachO] Fixing copy-paste error from r273719Chris Bieneman1-1/+1
Thanks Kevin! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273725 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[MemorySSA] Move code around a bit. NFC.George Burgess IV1-69/+3
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273723 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[obj2yaml] [yaml2obj] Support for MachO Universal binariesChris Bieneman2-0/+50
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273719 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[PM] Port PreISelIntrinsicLowering to the new PMMichael Kuperstein2-1/+27
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273713 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[CodeView] Healthy paranoia around stringsDavid Majnemer2-2/+1
Make sure strings don't get too big for a record, truncate them if need-be. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273710 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Revert "InstCombine rule to fold trunc when value available"Reid Kleckner1-32/+0
This reverts commit r273608. Broke building code with sanitizers, where apparently these kinds of loads, casts, and truncations are common: http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux/builds/24502 http://crbug.com/623099 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273703 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Thread Expected<...> up from libObject’s getSymbolAddress() for symbols to ↵Kevin Enderby4-8/+8
allow a good error message to be produced. This is nearly the last libObject interface that used ErrorOr and the last one that appears in llvm/include/llvm/Object/MachO.h . For Mach-O objects this is just a clean up because it’s version of getSymbolAddress() can’t return an error. I will leave it to the experts on COFF and ELF to actually add meaning full error messages in their tests if they wish. And also leave it to these experts to change the last two ErrorOr interfaces in llvm/include/llvm/Object/ObjectFile.h for createCOFFObjectFile() and createELFObjectFile() if they wish. Since there are no test cases for COFF and ELF error cases with respect to getSymbolAddress() in the test suite this is no functional change (NFC). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273701 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Linker: Copy metadata when linking declarations.Peter Collingbourne1-0/+3
Differential Revision: http://reviews.llvm.org/D21624 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273692 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[codeview] Use one byte for S_FRAMECOOKIE CookieKind and add flags byteReid Kleckner3-3/+4
We bailed out while printing codeview for an MSVC compiled SemaExprCXX.cpp that used this record. The MS reference headers look incorrect here, which is probably why we had this bug. They use a 32-bit enum as the field type, but the actual record appears to use one byte for the cookie kind followed by a flags byte. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273691 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Remangle intrinsics names when types are renamedArtur Pilipenko1-0/+5
This is a resubmittion of previously reverted rL273568. This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html Reviewers: mehdi_amini, reames Differential Revision: http://reviews.llvm.org/D19373 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273686 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24NFC. Move verifyIntrinsicIsVarArg from verifier to ↵Artur Pilipenko1-0/+6
Intrinsic::matchIntrinsicVarArg since it will be reused for intrinsic remangling code git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273685 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24[MachineDominatorTree] Add a MDT verifier.Chad Rosier1-0/+23
Differential Revision: http://reviews.llvm.org/D21657 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273678 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Revert r273664Hubert Tong1-44/+0
Revert change until build issues with MSVC can be resolved. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273670 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Add FixedSizeStorage to TrailingObjects; NFCHubert Tong1-0/+44
Summary: This change introduces two types, `FixedSizeStorage` and `FixedSizeStorageOwner`, which can be used to provide stack-allocated objects with trailing objects. Reviewers: rsmith, faisalv, aaron.ballman Subscribers: llvm-commits, cfe-commits, nwilson Differential Revision: http://reviews.llvm.org/D19770 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273664 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Revert "Revert "[misched] Extend scheduler to handle unsupported features""Simon Dardis1-0/+16
This reverts commit r273565. This was an over-eager revert. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273658 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-24Use the same underlying type for bitfieldsDavid Majnemer3-3/+3
MSVC allocates fresh storage for consecutive bitfields with different underlying types. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273645 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Support/ELF: Add R_AMDGPU_GOTPCREL relocationTom Stellard1-0/+1
Summary: We will start generating this in a future patch. Reviewers: arsenm, kzhuravl, rafael, ruiu, tony-tye Subscribers: arsenm, llvm-commits, kzhuravl Differential Revision: http://reviews.llvm.org/D21482 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273628 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[LCG] Make the name of an SCC include more of the functions in it.Chandler Carruth1-1/+17
This makes it much easier to debug issues when the logging contains the name of the SCC. It requires to create a temporary string, but for logging and debugging uses that seems fine. I've added logic to try to output all the function names with an elipsis if there are too many. This was helpful fro me in debugging issues with the new pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273625 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23InstCombine rule to fold trunc when value availableAnna Thomas1-0/+32
Summary: This instcombine rule folds away trunc operations that have value available from a prior load or store. This kind of code can be generated as a result of GVN widening the load or from source code as well. Reviewers: reames, majnemer, sanjoy Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D21246 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273608 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Typo.Vassil Vassilev1-1/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273592 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[SCEV] Don't unnecessarily namespace; NFCSanjoy Das1-3/+3
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273587 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Preserve DebugInfo when replacing values in DAGCombinerNirav Dave1-1/+3
Recommiting after correcting over-eager Debug Value transfer fixing PR28270. [DAG] Previously debug values would transfer debuginfo for the selected start node for a replacement which allows for debug to be dropped. Push debug value transfer to occur with node/value replacement in SelectionDAG, remove now extraneous transfers of debug values. This refixes PR9817 which was being incompletely checked in the testsuite. Reviewers: jyknight Subscribers: dblaikie, llvm-commits Differential Revision: http://reviews.llvm.org/D21037 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273585 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[ARM] Lower (select_cc k k (select_cc ~k ~k x)) into (SSAT l_k x)Pablo Barrio1-0/+3
Summary: SSAT saturates an integer, making sure that its value lies within an interval [-k, k]. Since the constant is given to SSAT as the number of bytes set to one, k + 1 must be a power of 2, otherwise the optimization is not possible. Also, the select_cc must use < and > respectively so that they define an interval. Reviewers: mcrosier, jmolloy, rengolin Subscribers: aemerson, rengolin, llvm-commits Differential Revision: http://reviews.llvm.org/D21372 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273581 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Revert r273568 "Remangle intrinsics names when types are renamed"Hans Wennborg1-5/+0
It broke 2008-07-15-Bswap.ll and 2009-09-01-PostRAProlog.ll git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273574 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Remangle intrinsics names when types are renamedArtur Pilipenko1-0/+5
This is a fix for the problem mentioned in "LTO and intrinsics mangling" llvm-dev mail thread: http://lists.llvm.org/pipermail/llvm-dev/2016-April/098387.html Reviewers: mehdi_amini, reames Differential Revision: http://reviews.llvm.org/D19373 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273568 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Revert "[misched] Extend scheduler to handle unsupported features"Simon Dardis1-16/+0
This reverts commit r273551. Patch contained a wrong check for isUnsupported. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273565 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[misched] Extend scheduler to handle unsupported featuresSimon Dardis1-0/+16
Currently isComplete = 1 requires that every instruction must be described, declared unsupported or marked as having no scheduling information for a processor. For some backends such as MIPS, this requirement entails long regex lists of instructions that are unsupported. This patch teaches Tablegen to skip over instructions that are associated with unsupported feature when checking if the scheduling model is complete. Patch by: Daniel Sanders Contributions by: Simon Dardis Reviewers: MatzeB Differential Reviewer: http://reviews.llvm.org/D20522 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273551 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[AVX512] Remove masked unpack intrinsics and autoupgrade to vectorshuffle ↵Craig Topper1-219/+0
and selects. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273543 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23[modules] Good ol' JIT is gone.Vassil Vassilev1-1/+0
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273541 91177308-0d34-0410-b5e6-96231b3b80d8
2016-06-23Add missing include. Should fix modules builds.Vassil Vassilev1-0/+1
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@273540 91177308-0d34-0410-b5e6-96231b3b80d8