summaryrefslogtreecommitdiffstats
path: root/llvm/lib
Commit message (Collapse)AuthorAgeFilesLines
* MC: Calculate intra-section symbol differences correctly for COFFDavid Majnemer2015-02-091-6/+11
| | | | | | This fixes PR22060. llvm-svn: 228565
* [X86] Remove 256-bit and 512-bit memop pattern fragments. They are no longer ↵Craig Topper2015-02-092-14/+2
| | | | | | used. llvm-svn: 228563
* [X86] Remove 'memop' uses from AVX512. Use 'load' instead.Craig Topper2015-02-091-81/+71
| | | | llvm-svn: 228562
* DeadArgElim: fix mismatch in accounting of array return types.Tim Northover2015-02-091-39/+47
| | | | | | | | | | | | Some parts of DeadArgElim were only considering the individual fields of StructTypes separately, but others (where insertvalue & extractvalue instructions occur) also looked into ArrayTypes. This one is an actual bug; the mismatch can lead to an argument being considered used by a return sub-value that isn't being tracked (and hence is dead by default). It then gets incorrectly eliminated. llvm-svn: 228559
* DeadArgElim: assess uses of entire return value aggregate.Tim Northover2015-02-091-26/+26
| | | | | | | | | | | | | | | | | | | | | | | Previously, a non-extractvalue use of an aggregate return value meant the entire return was considered live (the algorithm gave up entirely). This was correct, but conservative. It's better to actually look at that Use, making the analysis results apply to all sub-values under consideration. E.g. %val = call { i32, i32 } @whatever() [...] ret { i32, i32 } %val The return is using the entire aggregate (sub-values 0 and 1). We can still simplify @whatever if we can prove that this return is itself unused. Also unifies the logic slightly between aggregate and non-aggregate cases.. llvm-svn: 228558
* [Orc] Add a JITSymbol class to the Orc APIs, refactor APIs, update clients.Lang Hames2015-02-091-2/+2
| | | | | | | | | | | | | | | | This patch refactors a key piece of the Orc APIs: It removes the *::getSymbolAddress and *::lookupSymbolAddressIn methods, which returned target addresses (uint64_ts), and replaces them with *::findSymbol and *::findSymbolIn respectively, which return instances of the new JITSymbol type. Unlike the old methods, calling findSymbol or findSymbolIn does not cause the symbol to be immediately materialized when found. Instead, the symbol will be materialized if/when the getAddress method is called on the returned JITSymbol. This allows us to query for the existence of symbols without actually materializing them. In the future I expect more information to be attached to the JITSymbol class, for example whether the returned symbol is a weak or strong definition. This will allow us to properly handle weak symbols and multiple definitions. llvm-svn: 228557
* InstCombine: propagate nonNull through assumeRamkumar Ramachandra2015-02-091-1/+8
| | | | | | | | | Make assume (load (call|invoke) != null) set nonNull return attribute for the call and invoke. Also include tests. Differential Revision: http://reviews.llvm.org/D7107 llvm-svn: 228556
* Fix -Wuninitialized build by referencing the relevant ctor parameter instead ↵David Blaikie2015-02-088-8/+8
| | | | | | of the base class member variable. llvm-svn: 228554
* Make PDBSymbol's IPDBSymbol reference const.Zachary Turner2015-02-0832-33/+33
| | | | llvm-svn: 228553
* Bugfix: ScalarEvolution incorrectly assumes that the start of certainSanjoy Das2015-02-081-1/+18
| | | | | | | | | | | | | add recurrences don't overflow. This change makes the optimization more restrictive. It still assumes that an overflowing `add nsw` is undefined behavior; and this change will need revisiting once we have a consistent semantics for poison values. Differential Revision: http://reviews.llvm.org/D7331 llvm-svn: 228552
* [X86] Remove the remaining uses of memop from AVX and AVX2 instruction ↵Craig Topper2015-02-082-237/+211
| | | | | | patterns. AVX and AVX2 can handle unaligned loads being folded so we can just use 'load' llvm-svn: 228551
* Metadata: Use <algorithm> to simplify code. NFC.Benjamin Kramer2015-02-081-30/+12
| | | | llvm-svn: 228550
* DebugInfoPDB: Make the symbol base case hold an IPDBSession ref.Zachary Turner2015-02-0832-67/+87
| | | | | | | | | Dumping a symbol often requires access to data that isn't inside the symbol hierarchy, but which is only accessible through the top-level session. This patch is a pure interface change to give symbols a reference to the session. llvm-svn: 228542
* fix typos; NFCSanjay Patel2015-02-081-3/+3
| | | | llvm-svn: 228529
* Make UTF8->UTF16 conversion null terminate output on empty input.Zachary Turner2015-02-081-1/+4
| | | | llvm-svn: 228527
* Moved AVX2 vbroadcast (reg) instruction foldings under the correct grouping. ↵Simon Pilgrim2015-02-081-3/+3
| | | | | | NFC. llvm-svn: 228526
* Correctly combine alias.scope metadata by a union instead of intersectingBjorn Steinbrink2015-02-084-2/+28
| | | | | | | | | | | | | | | | | Summary: The alias.scope metadata represents sets of things an instruction might alias with. When generically combining the metadata from two instructions the result must be the union of the original sets, because the new instruction might alias with anything any of the original instructions aliased with. Reviewers: hfinkel Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7490 llvm-svn: 228525
* Masked Gather and Scatter Intrinsics.Elena Demikhovsky2015-02-082-1/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Gather and Scatter are new introduced intrinsics, comming after recently implemented masked load and store. This is the first patch for Gather and Scatter intrinsics. It includes only the syntax, parsing and verification. Gather and Scatter intrinsics allow to perform multiple memory accesses (read/write) in one vector instruction. The intrinsics are not target specific and will have the following syntax: Gather: declare <16 x i32> @llvm.masked.gather.v16i32(<16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1> <mask>, <16 x i32> <passthru>) declare <8 x float> @llvm.masked.gather.v8f32(<8 x float*><vector of ptrs>, i32 <alignment>, <8 x i1> <mask>, <8 x float><passthru>) Scatter: declare void @llvm.masked.scatter.v8i32(<8 x i32><vector value to be stored> , <8 x i32*><vector of ptrs> , i32 <alignment>, <8 x i1> <mask>) declare void @llvm.masked.scatter.v16i32(<16 x i32> <vector value to be stored> , <16 x i32*> <vector of ptrs>, i32 <alignment>, <16 x i1><mask> ) Vector of ptrs - a set of source/destination addresses, to load/store the value. Mask - switches on/off vector lanes to prevent memory access for switched-off lanes vector of ptrs, value and mask should have the same vector width. These are code examples where gather / scatter should be used and will allow function vectorization ;void foo1(int * restrict A, int * restrict B, int * restrict C) { ; for (int i=0; i<SIZE; i++) { ; A[i] = B[C[i]]; ; } ;} ;void foo3(int * restrict A, int * restrict B) { ; for (int i=0; i<SIZE; i++) { ; A[B[i]] = i+5; ; } ;} Tests will come in the following patches, with CodeGen and Vectorizer. http://reviews.llvm.org/D7433 llvm-svn: 228521
* ARM & AArch64: teach LowerVSETCC that output type size may differ from input.Tim Northover2015-02-082-18/+27
| | | | | | | | | | | | | | | | | | While various DAG combines try to guarantee that a vector SETCC operation will have the same output size as input, there's nothing intrinsic to either creation or LegalizeTypes that actually guarantees it, so the function needs to be ready to handle a mismatch. Fortunately this is easy enough, just extend or truncate the naturally compared result. I couldn't reproduce the failure in other backends that I know have SIMD, so it's probably only an issue for these two due to shared heritage. Should fix PR21645. llvm-svn: 228518
* Removed unused function mistakenly left in, triggering -Werror.Zachary Turner2015-02-081-21/+0
| | | | llvm-svn: 228517
* Some cleanup for libpdb.Zachary Turner2015-02-0833-71/+663
| | | | | | | | | | | This patch implements a few of the optional suggestions from the initial patch comitting libpdb. In particular, it implements a virtual function out of line for each of the concrete classes. A few other minor cleanups exist as well, such as using override instead of virtual, etc. llvm-svn: 228516
* [X86] Add register use/def for wrmsr and rdmsr.Craig Topper2015-02-071-0/+2
| | | | llvm-svn: 228515
* [X86] Add GETSEC instruction.Craig Topper2015-02-071-0/+6
| | | | llvm-svn: 228514
* [X86][AVX] Added missing stack folding support + test for vptest ymm instructionSimon Pilgrim2015-02-071-0/+1
| | | | llvm-svn: 228509
* LoopIdiom: Use utility functions.Benjamin Kramer2015-02-071-54/+15
| | | | | | | | | The only difference between deleteIfDeadInstruction and RecursivelyDeleteTriviallyDeadInstructions is that the former also manually invalidates SCEV. That's unnecessary because SCEV automatically gets informed when an instruction is deleted via a ValueHandle. NFC. llvm-svn: 228508
* Avoid integer overflows around realloc calls resulting in potentialJoerg Sonnenberger2015-02-071-0/+21
| | | | | | | heap. Problem identified by Guido Vranken. Changes differ from original OpenBSD sources by not depending on non-portable reallocarray. llvm-svn: 228507
* ValueTracking: Make isBytewiseValue simpler and more powerful at the same time.Benjamin Kramer2015-02-071-19/+9
| | | | | | | Turns out there is a simpler way of checking that all bytes in a word are equal than binary decomposition. llvm-svn: 228503
* Properly update AA metadata when performing call slot optimizationBjorn Steinbrink2015-02-071-0/+10
| | | | | | | | Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D7482 llvm-svn: 228500
* [BasicAA] Try to disambiguate GEPs through arrays of structs intoAhmed Bougacha2015-02-071-0/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | different fields. We can show that two GEPs off of the same (possibly multidimensional) array of structs, into different fields, can't alias. Quoting: For two GEPOperators GEP1 and GEP2, if we find that: - both GEPs begin indexing from the exact same pointer; - the last indices in both GEPs are constants, indexing into a struct; - said indices are different, hence,the pointed-to fields are different; - and both GEPs only index through arrays prior to that; this lets us determine that the struct that GEP1 indexes into and the struct that GEP2 indexes into must either precisely overlap or be completely disjoint. Because they cannot partially overlap, indexing into different non-overlapping fields of the struct will never alias. The other BasicAA::aliasGEP rules worked in some cases, but not all (for example, the i32x3 struct in the testcase). We can add this simple ad-hoc rule to complement them. rdar://19717375 Differential Revision: http://reviews.llvm.org/D7453 llvm-svn: 228498
* SCEV: Compress disposition pairs.Benjamin Kramer2015-02-071-18/+18
| | | | | | | Composing DenseMaps and SmallVectors is still somewhat suboptimal, but this at least halves the size of the vector elements. NFC. llvm-svn: 228497
* Fix typos; NFC.Andrea Di Biagio2015-02-071-4/+4
| | | | llvm-svn: 228493
* Move DebugLocs around instead of copying.Benjamin Kramer2015-02-071-4/+4
| | | | llvm-svn: 228491
* MC: Emit COFF section flags in the "proper" orderDavid Majnemer2015-02-071-4/+4
| | | | | | | | COFF section flags are not idempotent: 'rd' will make a read-write section because 'd' implies write 'dr' will make a read-only section because 'r' disables write llvm-svn: 228490
* [PowerPC] Handle loop predecessor invokesHal Finkel2015-02-071-4/+12
| | | | | | | | | | If a loop predecessor has an invoke as its terminator, and the return value from that invoke is used to determine the loop iteration space, then we can't insert a computation based on that value in the loop predecessor prior to the terminator (oops). If there's such an invoke, or just no predecessor for that matter, insert a new loop preheader. llvm-svn: 228488
* Add more DWARF 5 language constants.Bruce Mitchener2015-02-072-1/+25
| | | | | | Differential Revision: http://reviews.llvm.org/D7430 llvm-svn: 228487
* Resubmit unittests for DebugInfoPDB.Zachary Turner2015-02-071-3/+2
| | | | | | | | | | | | | | | These were originally submitted as part of r228428, but this part caused a build breakage in LLVMConfig. The library portion was resubmitted independently since it was not causing breakage. There were two reasons this was causing the build to fail. The first is that there were no Makefiles added for the PDB tests. And the second is that the DebugInfoPDB library was only being built by CMake behind an "if (MSVC)" check. This is wrong since this the library hides platform specific details, and it was causing LLVM-Config to not find the library when trying to build unittests. llvm-svn: 228482
* Support: Add dwarf::getVirtuality()Duncan P. N. Exon Smith2015-02-071-0/+8
| | | | llvm-svn: 228474
* Support: Use Dwarf.def for DW_VIRTUALITY, NFCDuncan P. N. Exon Smith2015-02-071-4/+6
| | | | | | | Use definition file for `DW_VIRTUALITY_*`. Add a `DW_VIRTUALITY_max` both for ease of testing and for future use by the `LLParser`. llvm-svn: 228473
* Support: Add dwarf::getAttributeEncoding()Duncan P. N. Exon Smith2015-02-061-0/+7
| | | | llvm-svn: 228470
* Support: Rewrite AttributeEncodingString(), NFCDuncan P. N. Exon Smith2015-02-061-17/+5
| | | | llvm-svn: 228469
* Support: Stop stringifying DW_ATE_{lo,hi}_userDuncan P. N. Exon Smith2015-02-061-2/+0
| | | | llvm-svn: 228468
* [AArch64] Use the source location of the IR branch when creating BccAhmed Bougacha2015-02-061-2/+2
| | | | | | | | | | | | | | | | | | from a conditional branch fed by an add/sub/mul-with-overflow node. We previously used the SDLoc of the overflow node, for no good reason. In some cases, this led to the Bcc and B terminators having different source orders, and DBG_VALUEs being inserted between them. The real issue is with the code that can't handle DBG_VALUEs between terminators: the few places affected by this will be fixed soon. In the meantime, fixing the SDLoc is a positive change no matter what. No tests, as I have no idea how to get .loc emitted for branches? rdar://19347133 llvm-svn: 228463
* Revert "r227976 - [PowerPC] Yet another approach to __tls_get_addr" and ↵Hal Finkel2015-02-0611-234/+108
| | | | | | | | | | | | | | related fixups Unfortunately, even with the workaround of disabling the linker TLS optimizations in Clang restored (which has already been done), this still breaks self-hosting on my P7 machine (-O3 -DNDEBUG -mcpu=native). Bill is currently working on an alternate implementation to address the TLS issue in a way that also fully elides the linker bug (which, unfortunately, this approach did not fully), so I'm reverting this now. llvm-svn: 228460
* Support: Add dwarf::getLanguage()Duncan P. N. Exon Smith2015-02-061-0/+7
| | | | llvm-svn: 228458
* Support: Rewrite dwarf::LanguageString(), NFCDuncan P. N. Exon Smith2015-02-061-29/+6
| | | | llvm-svn: 228457
* IR: Allow 32-bits for lines in debug locationDuncan P. N. Exon Smith2015-02-062-10/+2
| | | | | | | | | | | | Remove unnecessary restriction of 24-bits for line numbers in `MDLocation`. The rest of the debug info schema (with the exception of local variables) uses 32-bits for line numbers. As I introduce the specialized nodes, it makes sense to canonicalize on one size or the other. llvm-svn: 228455
* use local variables; NFCSanjay Patel2015-02-061-3/+2
| | | | llvm-svn: 228452
* Support: Stop stringifying DW_LANG_{lo,hi}_userDuncan P. N. Exon Smith2015-02-061-2/+0
| | | | llvm-svn: 228451
* AsmParser: Use DW_TAG_hi_user instead of magic constant, NFCDuncan P. N. Exon Smith2015-02-061-1/+1
| | | | llvm-svn: 228448
* AsmWriter: Extract writeTag(), NFCDuncan P. N. Exon Smith2015-02-061-5/+9
| | | | llvm-svn: 228447
OpenPOWER on IntegriCloud