summaryrefslogtreecommitdiff
path: root/lib
Commit message (Collapse)AuthorAge
* Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-12-14
|\
| * Merging r169719: into 3.2 release branch.Pawel Wodnicki2012-12-10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix PR14548: SROA was crashing on a mixture of i1 and i8 loads and stores. When SROA was evaluating a mixture of i1 and i8 loads and stores, in just a particular case, it would tickle a latent bug where we compared bits to bytes rather than bits to bits. As a consequence of the latent bug, we would allow integers through which were not byte-size multiples, a situation the later rewriting code was never intended to handle. In release builds this could trigger all manner of oddities, but the reported issue in PR14548 was forming invalid bitcast instructions. The only downside of this fix is that it makes it more clear that SROA in its current form is not capable of handling mixed i1 and i8 loads and stores. Sometimes with the previous code this would work by luck, but usually it would crash, so I'm not terribly worried. I'll watch the LNT numbers just to be sure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@169735 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-12-05
|\|
| * Merging MIPS JIT/MCJIT changeset into 3.2 release branch.Pawel Wodnicki2012-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging r169183: RuntimeDyld: Fix up r169178. MSVC doesn't like "or". Merging r169178: Runtime dynamic linker for MCJIT should support MIPS BigEndian architecture. This small change adds support for that. It will make all MCJIT tests pass in make-check on BigEndian platforms. Patch by Petar Jovanovic. Merging r169177: Classic JIT is still being supported by MIPS, along with MCJIT. This change adds endian-awareness to MipsJITInfo and emitWordLE in MipsCodeEmitter has become emitWord now to support both endianness. Patch by Petar Jovanovic. Merging r169174: Functions in MipsCodeEmitter.cpp that expand unaligned loads/stores are dead code. Removing it. Patch by Petar Jovanovic. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@169296 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging MIPS GOT changeset into 3.2 release branch.Pawel Wodnicki2012-12-04
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging r168471: Mips direct object xgot support This patch provides support for the MIPS relocations: *) R_MIPS_GOT_HI16 *) R_MIPS_GOT_LO16 *) R_MIPS_CALL_HI16 *) R_MIPS_CALL_LO16 These are used for large GOT instruction sequences. Contributer: Jack Carter Merging r168460: [mips] Generate big GOT code. Merging r168458: [mips] Simplify lowering functions in MipsISelLowering.cpp by using the helper functions added in r168456. Merging r168456: [mips] Add helper functions that create nodes for computing address. Merging r168455: [mips] Add command line option "-mxgot". Merging r168453: [mips] When a node which loads from a GOT is created, pass a MachinePointerInfo referring to a GOT entry. Merging r168450: [mips] Add target operand flag enums for big GOT relocations. Merging r168448: Add relocations used for mips big GOT. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@169294 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-12-04
|\|
| * Merging r169084: into 3.2 release branch.Pawel Wodnicki2012-12-04
| | | | | | | | | | | | | | | | | | | | | | SROA: Avoid struct and array types early to avoid creating an overly large integer type. Fixes PR14465. Differential Revision: http://llvm-reviews.chandlerc.com/D148 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@169290 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-12-01
|\|
| * Merging r168921: into the 3.2 release branch.Pawel Wodnicki2012-11-30
| | | | | | | | | | | | | | | | Follow up to 168711: It's safe to base this analysis on the found compare, just return the value for the right predicate. Thanks to Andy for catching this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168974 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168711: into the 3.2 release branch.Pawel Wodnicki2012-11-30
| | | | | | | | | | | | | | | | SCEV: Even if the latch terminator is foldable we can't deduce the result of an unrelated condition with it. Fixes PR14432. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168973 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168622: into 3.2 release branch.Pawel Wodnicki2012-11-29
| | | | | | | | | | | | Don't use iterator after being erased. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168947 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168837: into the 3.2 release branch.Pawel Wodnicki2012-11-29
| | | | | | | | | | | | | | | | | | | | | | Avoid rewriting instructions twice. This could cause miscompilations in targets where sub-register composition is not always idempotent (ARM). <rdar://problem/12758887> git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168849 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merge in r168799 (PPC bug fix).Hal Finkel2012-11-29
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168842 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merge in r168765 (BBVectorize bug fix)Hal Finkel2012-11-29
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168839 91177308-0d34-0410-b5e6-96231b3b80d8
* | ARM: also support musl c library based tripleAbdoulaye Walsimou Gaye2012-12-01
| | | | | | | | | | Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org> (cherry picked from commit 88e1a833c45dfcf881462516c1c3f2bc5d13cf19)
* | Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-11-28
|\|
| * Merging r167912: into the 3.2 release branch.Pawel Wodnicki2012-11-26
| | | | | | | | | | | | | | Handle DAG CSE adding new uses during ReplaceAllUsesWith. Fixes PR14333. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168596 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168196: into the 3.2 release branch.Pawel Wodnicki2012-11-26
| | | | | | | | | | | | | | Make this easier to understand, as suggested by Chandler. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168594 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168186: into the 3.2 release branch.Pawel Wodnicki2012-11-26
| | | | | | | | | | | | | | | | InstructionSimplify should be able to simplify A+B==B+A to 'true' but wasn't due to the same logic bug that caused PR14361. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168593 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-11-24
|\|
| * Merging r168320: into 3.2 relase branch.Pawel Wodnicki2012-11-23
| | | | | | | | | | | | | | | | Handle mixed normal and early-clobber defs on inline asm. PR14376. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168527 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168512: into 3.2 release branch.Pawel Wodnicki2012-11-23
| | | | | | | | | | | | Update call to the new syntax. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168526 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168291: into the 3.2 release branch.Pawel Wodnicki2012-11-22
| | | | | | | | | | | | | | | | | | | | | | | | Fix PR14060, an infinite loop in reassociate. The problem was that one of the operands of the expression being written was wrongly thought to be reusable as an inner node of the expression resulting in it turning up as both an inner node *and* a leaf, creating a cycle in the def-use graph. This would have caused the verifier to blow up if things had gotten that far, however it managed to provoke an infinite loop first. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168489 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168354: into 3.2 release branchPawel Wodnicki2012-11-22
| | | | | | | | | | | | | | | | | | | | | | Make the AttrListPtr object a part of the LLVMContext. When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168486 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168280: into 3.2 release branch.Pawel Wodnicki2012-11-22
| | | | | | | | | | | | | | Don't try to calculate the alignment of an unsigned type. Fixes PR14371! git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168480 91177308-0d34-0410-b5e6-96231b3b80d8
| * Reverting 168457Pawel Wodnicki2012-11-21
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168465 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168354, r168355 and r168379 into the 3.2 release branch.Pawel Wodnicki2012-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set of Attributes patches. Merging r168354: Make the AttrListPtr object a part of the LLVMContext. When code deletes the context, the AttributeImpls that the AttrListPtr points to are now invalid. Therefore, instead of keeping a separate managed static for the AttrListPtrs that's reference counted, move it into the LLVMContext and delete it when deleting the AttributeImpls. Merging r168355: Merging r168379 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168457 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168181: into 3.2 release branch.Pawel Wodnicki2012-11-21
| | | | | | | | | | | | | | | | | | | | | | Fix PR14361: wrong simplification of A+B==B+A. You may think that the old logic replaced by this patch is equivalent to the new logic, but you'd be wrong, and that's exactly where the bug was. There's a similar bug in instsimplify which manifests itself as instsimplify failing to simplify this, rather than doing it wrong, see next commit. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168447 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168035: into 3.2 release branch.Pawel Wodnicki2012-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a crash observed by Shuxin Yang. The issue here is that LinearizeExprTree, the utility for extracting a chain of operations from the IR, thought that it might as well combine any constants it came across (rather than just returning them along with everything else). On the other hand, the factorization code would like to see the individual constants (this is quite reasonable: it is much easier to pull a factor of 3 out of 2*3 than it is to pull it out of 6; you may think 6/3 isn't so hard, but due to overflow it's not as easy to undo multiplications of constants as it may at first appear). This patch therefore makes LinearizeExprTree stupider: it now leaves optimizing to the optimization part of reassociate, and sticks to just analysing the IR. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168446 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168361, r168346 and r168227 into 3.2 branch releasePawel Wodnicki2012-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Merging r168361: Fix PR14132 and handle OOB loads speculated throuh PHI nodes. The issue is that we may end up with newly OOB loads when speculating a load into the predecessors of a PHI node, and this confuses the new integer splitting logic in some cases, triggering an assertion failure. In fact, the branch in question must be dead code as it loads from a too-narrow alloca. Add code to handle this gracefully and leave the requisite FIXMEs for both optimizing more aggressively and doing more to aid sanitizing invalid code which triggers these patterns. Merging r168346: ------------------------------------------------------------------------ Rework the rewriting of loads and stores for vector and integer allocas to properly handle the combinations of these with split integer loads and stores. This essentially replaces Evan's r168227 by refactoring the code in a different way, and trynig to mirror that refactoring in both the load and store sides of the rewriting. Generally speaking there was some really problematic duplicated code here that led to poorly founded assumptions and then subtle bugs. Now much of the code actually flows through and follows a more consistent style and logical path. There is still a tiny bit of duplication on the store side of things, but it is much less bad. This also changes the logic to never re-use a load or store instruction as that was simply too error prone in practice. I've added a few tests (one a reduction of the one in Evan's original patch, which happened to be the same as the report in PR14349). I'm going to look at adding a few more tests for things I found and fixed in passing (such as the volatile tests in the vectorizable predicate). This patch has survived bootstrap, and modulo one bugfix survived Duncan's test suite, but let me know if anything else explodes. Merging r168227: Teach SROA rewriteVectorizedStoreInst to handle cases when the loaded value is narrower than the stored value. rdar://12713675 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168443 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r168197: into 3.2 release branchPawel Wodnicki2012-11-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Preserve address space of forward-referenced global variables in the LL parser Before, the parser would assert on the following code: @a2 = global i8 addrspace(1)* @a @a = addrspace(1) global i8 0 because the type of @a was "i8*" instead of "i8 addrspace(1)*" when parsing the initializer for @a2. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168435 91177308-0d34-0410-b5e6-96231b3b80d8
* | Merge branch 'release-3.2' into embtk-support-release-3.2Abdoulaye Walsimou Gaye2012-11-20
|\|
| * Merging r168001 into 3.2 release branchPawel Wodnicki2012-11-20
| | | | | | | | | | | | | | NVPTXISelLowering.cpp: Fix warnings. [-Wunused-variable] git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168378 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merge in PPC internal-as fixes: r167861, r167862, r167863, r167875, r167860, ↵Hal Finkel2012-11-20
| | | | | | | | | | | | r167864 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168351 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merge in r167737: Make PPC TOC contents deterministic.Hal Finkel2012-11-20
| | | | | | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168350 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r167718 into 3.2 release branchPawel Wodnicki2012-11-19
| | | | | | | | | | | | | | | | | | | | | | Fix PR14314 - Fix operand order for atomic sub, where the minuend is the value loaded from memory and the subtrahend is the parameter specified. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168336 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r167948, r168198: into the 3.2 release branchPawel Wodnicki2012-11-19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | r168198 [NVPTX] Order global variables in def-use order before emiting them in the final assembly r167948 [NVPTX] Implement custom lowering of loads/stores for i1 Loads from i1 become loads from i8 followed by trunc Stores to i1 become zext to i8 followed by store to i8 git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168335 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r167855 into 3.2 relase branchPawel Wodnicki2012-11-19
| | | | | | | | | | | | | | | | | | | | | | | | Do not consider a machine instruction that uses and defines the same physical register as candidate for common subexpression elimination in MachineCSE. This fixes a bug on PowerPC in MultiSource/Applications/oggenc/oggenc caused by MachineCSE invalidly merging two separate DYNALLOC insns. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168334 91177308-0d34-0410-b5e6-96231b3b80d8
| * Merging r167719 into the 3.2 relase branchPawel Wodnicki2012-11-19
| | | | | | | | | | | | Remove unused field. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168333 91177308-0d34-0410-b5e6-96231b3b80d8
* | ARM: support more possible GNU triplesAbdoulaye Walsimou Gaye2012-11-17
|/ | | | Signed-off-by: Abdoulaye Walsimou Gaye <awg@embtoolkit.org>
* Merge r168176 from trunk:Hans Wennborg2012-11-16
| | | | | | | | | SimplifyCFG: Don't assume non-null ScalarTargetTransformInfo. Patch by Pekka Jääskeläinen! git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168194 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge r168147 from trunk:Hans Wennborg2012-11-16
| | | | | | | | | | | | | | Constant::IsThreadDependent(): Use dyn_cast<Constant> instead of cast It turns out that the operands of a Constant are not always themselves Constant. For example, one of the operands of BlockAddress is BasicBlock, which is not a Constant. This should fix the dragonegg-x86_64-linux-gcc-4.6-test build which broke in r168037. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168193 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge r168037 from trunk:Hans Wennborg2012-11-16
| | | | | | | | | | | | | | | | | Make GlobalOpt be conservative with TLS variables (PR14309) For global variables that get the same value stored into them everywhere, GlobalOpt will replace them with a constant. The problem is that a thread-local GlobalVariable looks like one value (the address of the TLS var), but is different between threads. This patch introduces Constant::isThreadDependent() which returns true for thread-local variables and constants which depend on them (e.g. a GEP into a thread-local array), and teaches GlobalOpt not to track such values. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168192 91177308-0d34-0410-b5e6-96231b3b80d8
* Bugzilla bug 14357Guy Benyei2012-11-15
| | | | | | | | Merge SPIR64 target from trunk - the 64bit counterpart of SPIR. The new OpenCL SPIR extension spec will define separate SPIR for 32 and 64 bit architectures. git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168092 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge r167942, r167966 to fix non-deterministic behavior in BBVectorizeHal Finkel2012-11-15
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@168012 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge BBVectorizer changes r167731, r167743, r167750, r167784, r167811, r167817.Hal Finkel2012-11-14
| | | | | | | | | These changes fix a serious interaction problem with the cost model on x86 that could cause the vectorizer to enter an infinite loop (and sometimes crash in other ways). git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_32@167993 91177308-0d34-0410-b5e6-96231b3b80d8
* [NVPTX] Add more precise PTX/SM target attributesJustin Holewinski2012-11-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each SM and PTX version is modeled as a subtarget feature/CPU. Additionally, PTX 3.1 is added as the default PTX version to be out-of-the-box compatible with CUDA 5.0. Available CPUs for this target: sm_10 - Select the sm_10 processor. sm_11 - Select the sm_11 processor. sm_12 - Select the sm_12 processor. sm_13 - Select the sm_13 processor. sm_20 - Select the sm_20 processor. sm_21 - Select the sm_21 processor. sm_30 - Select the sm_30 processor. sm_35 - Select the sm_35 processor. Available features for this target: ptx30 - Use PTX version 3.0. ptx31 - Use PTX version 3.1. sm_10 - Target SM 1.0. sm_11 - Target SM 1.1. sm_12 - Target SM 1.2. sm_13 - Target SM 1.3. sm_20 - Target SM 2.0. sm_21 - Target SM 2.1. sm_30 - Target SM 3.0. sm_35 - Target SM 3.5. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167699 91177308-0d34-0410-b5e6-96231b3b80d8
* Delete a stale comment. No functional change.Meador Inge2012-11-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167698 91177308-0d34-0410-b5e6-96231b3b80d8
* Move some helper methods to being static functions in the implementation file.Craig Topper2012-11-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167696 91177308-0d34-0410-b5e6-96231b3b80d8
* instcombine: Migrate memset optimizationsMeador Inge2012-11-11
| | | | | | | This patch migrates the memset optimizations from the simplify-libcalls pass into the instcombine library call simplifier. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167689 91177308-0d34-0410-b5e6-96231b3b80d8