summaryrefslogtreecommitdiffstats
path: root/llvm
Commit message (Collapse)AuthorAgeFilesLines
...
* SimplifyCFG: Don't crash when forming a switch bitmap with an undef default ↵Benjamin Kramer2012-10-012-2/+29
| | | | | | | | value. Fixes PR13985. llvm-svn: 164934
* Factor the PHI and select speculation into a separate rewriter. ThisChandler Carruth2012-10-011-263/+294
| | | | | | | | | | | | | | | could probably be factored still further to hoist this logic into a generic helper, but currently I don't have particularly clean ideas about how to handle that. This at least allows us to drop custom load rewriting from the speculation logic, which in turn allows the existing load rewriting logic to fire. In theory, this could enable vector promotion or other tricks after speculation occurs, but I've not dug into such issues. This is primarily just cleaning up the factoring of the code and the resulting logic. llvm-svn: 164933
* Use constants for all return values in switch. Allows clang to optimize it ↵Craig Topper2012-10-011-3/+8
| | | | | | into a lookup table. llvm-svn: 164926
* Refactor the PartitionUse structure to actually use the Use* instead ofChandler Carruth2012-10-012-88/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | a pair of instructions, one for the used pointer and the second for the user. This simplifies the representation and also makes it more dense. This was noticed because of the miscompile in PR13926. In that case, we were running up against a fundamental "bad idea" in the speculation of PHI and select instructions: the speculation and rewriting are interleaved, which requires phi speculation to also perform load rewriting! This is bad, and causes us to miss opportunities to do (for example) vector rewriting only exposed after PHI speculation, etc etc. It also, in the old system, required us to insert *new* load uses into the current partition's use list, which would then be ignored during rewriting because we had already extracted an end iterator for the use list. The appending behavior (and much of the other oddities) stem from the strange de-duplication strategy in the PartitionUse builder. Amusingly, all this went without notice for so long because it could only be triggered by having *different* GEPs into the same partition of the same alloca, where both different GEPs were operands of a single PHI, and where the GEP which was not encountered first also had multiple uses within that same PHI node... Hence the insane steps required to reproduce. So, step one in fixing this fundamental bad idea is to make the PartitionUse actually contain a Use*, and to make the builder do proper deduplication instead of funky de-duplication. This is enough to remove the appending behavior, and fix the miscompile in PR13926, but there is more work to be done here. Subsequent commits will lift the speculation into its own visitor. It'll be a useful step toward potentially extracting all of the speculation logic into a generic utility transform. The existing PHI test case for repeated operands has been made more extreme to catch even these issues. This test case, run through the old pass, will exactly reproduce the miscompile from PR13926. ;] We were so close here! llvm-svn: 164925
* Use dyn_cast instead of isa and cast.Jakub Staszak2012-09-301-10/+8
| | | | | | No functionality change. llvm-svn: 164924
* SimplifyCFG: Enumerating all predecessors of a BB can be expensive ↵Benjamin Kramer2012-09-301-3/+7
| | | | | | | | (switches), avoid it if possible. No functionality change. llvm-svn: 164923
* RST docs: convert HTML escapes to plain text in code examples.Dmitri Gribenko2012-09-302-3/+3
| | | | llvm-svn: 164922
* Sphinx CSS: remove negative letter-spacing, it makes some fonts look reallyDmitri Gribenko2012-09-301-3/+0
| | | | | | bad. Fonts already have appropriate tracking built-in. llvm-svn: 164921
* Fix && to && in Coding Standards.Jakub Staszak2012-09-301-1/+1
| | | | llvm-svn: 164920
* Change getX86SubSuperRegister to take an MVT::SimpleValueType rather than an ↵Craig Topper2012-09-304-11/+12
| | | | | | EVT and add llvm_unreachable to the switches. Helps it compile to dramatically better code. llvm-svn: 164919
* ArgumentPromotion: Remove ancient workaround for a bug in the C backend.Benjamin Kramer2012-09-301-19/+1
| | | | | | Fun fact: The CBE learned how to deal with this situation before it was removed. llvm-svn: 164918
* Ignore apparent buffer overruns on external or weak globals. This is a majorDuncan Sands2012-09-302-7/+16
| | | | | | | source of false positives due to globals being declared in a header with some kind of incomplete (small) type, but the actual definition being bigger. llvm-svn: 164912
* Revert r164910 because it causes failures to several phase2 builds.Nadav Rotem2012-09-305-412/+12
| | | | llvm-svn: 164911
* A DAGCombine optimization for merging consecutive stores. This optimization ↵Nadav Rotem2012-09-305-12/+412
| | | | | | | | | | | | | | | | | | | is not profitable in many cases because moden processos can store multiple values in parallel, and preparing the consecutive store requires some work. We only handle these cases: 1. Consecutive stores where the values and consecutive loads. For example: int a = p->a; int b = p->b; q->a = a; q->b = b; 2. Consecutive stores where the values are constants. Foe example: q->a = 4; q->b = 5; llvm-svn: 164910
* Add LLVM support for Swift.Bob Wilson2012-09-2945-99/+2038
| | | | llvm-svn: 164899
* Whitespace.Bob Wilson2012-09-292-3/+3
| | | | llvm-svn: 164898
* Shrink TargetAlignElem a bit, we do a lot of searches on them.Benjamin Kramer2012-09-292-4/+6
| | | | llvm-svn: 164897
* Fix a somewhat surprising miscompile where code relying on an ABIChandler Carruth2012-09-292-4/+35
| | | | | | | | | | | | | | | alignment could lose it due to the alloca type moving down to a much smaller alignment guarantee. Now SROA will actively compute a proper alignment, factoring the target data, any explicit alignment, and the offset within the struct. This will in some cases lower the alignment requirements, but when we lower them below those of the type, we drop the alignment entirely to give freedom to the code generator to align it however is convenient. Thanks to Duncan for the lovely test case that pinned this down. =] llvm-svn: 164891
* Speculatively revert commit 164885 (nadav) in the hope of ressurecting a pile ofDuncan Sands2012-09-295-410/+12
| | | | | | | | | | | | | | | | | | | | buildbots. Original commit message: A DAGCombine optimization for merging consecutive stores. This optimization is not profitable in many cases because moden processos can store multiple values in parallel, and preparing the consecutive store requires some work. We only handle these cases: 1. Consecutive stores where the values and consecutive loads. For example: int a = p->a; int b = p->b; q->a = a; q->b = b; 2. Consecutive stores where the values are constants. Foe example: q->a = 4; q->b = 5; llvm-svn: 164890
* Tidy up to match coding standards. Remove 'else' after 'return' and moving ↵Craig Topper2012-09-291-27/+24
| | | | | | operators to end of preceding line. No functional change intended. llvm-svn: 164887
* Replace a couple if/elses around similar calls with conditional operators on ↵Craig Topper2012-09-291-17/+6
| | | | | | the varying arguments. No functional change. llvm-svn: 164886
* A DAGCombine optimization for merging consecutive stores. This optimization ↵Nadav Rotem2012-09-295-12/+410
| | | | | | | | | | | | | | | | | | | is not profitable in many cases because moden processos can store multiple values in parallel, and preparing the consecutive store requires some work. We only handle these cases: 1. Consecutive stores where the values and consecutive loads. For example: int a = p->a; int b = p->b; q->a = a; q->b = b; 2. Consecutive stores where the values are constants. Foe example: q->a = 4; q->b = 5; llvm-svn: 164885
* Remove more LLVM_DELETED_FUNCTIONs from destructors to fix -std=c++11 build ↵Craig Topper2012-09-291-3/+3
| | | | | | on gcc 4.7. llvm-svn: 164880
* Add test case for r164850.Evan Cheng2012-09-291-0/+106
| | | | llvm-svn: 164867
* Do not delete BBs if their addresses are taken. rdar://12396696Evan Cheng2012-09-282-2/+56
| | | | llvm-svn: 164866
* Don't use bit-wise operations to query for inclusion/exclusion of attributes.Bill Wendling2012-09-281-14/+49
| | | | llvm-svn: 164860
* GlobalDCE should be run at -O2 / -Os to eliminate unused dtor, etc. ↵Evan Cheng2012-09-281-4/+3
| | | | | | rdar://9142819 llvm-svn: 164850
* MIPS DSP: add operands to make sure instruction strings are being matched.Akira Hatanaka2012-09-282-23/+23
| | | | llvm-svn: 164849
* Remove unused methods.Bill Wendling2012-09-281-7/+1
| | | | llvm-svn: 164848
* docs: dedent list on index.rstSean Silva2012-09-281-23/+23
| | | | | | | | | In reStructuredText, indented blocks denote block quotes [1]. This list is not a block quote. [1]. http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html#block-quotes llvm-svn: 164847
* MIPS DSP: other miscellaneous instructions.Akira Hatanaka2012-09-284-0/+207
| | | | llvm-svn: 164845
* Testcase for r164835Manman Ren2012-09-281-0/+28
| | | | llvm-svn: 164842
* MIPS DSP: ADDUH.QB instruction sub-class.Akira Hatanaka2012-09-283-0/+312
| | | | llvm-svn: 164840
* X86: when replacing SUB with TEST in ISelDAGToDAG, only replace uses of theManman Ren2012-09-281-5/+28
| | | | | | | | second output of SUB with first output of TEST. PR13966 llvm-svn: 164835
* Removing dependency on third party library for Intel JIT event support.Andrew Kaylor2012-09-2815-376/+1285
| | | | | | Patch committed on behalf of Kirill Uhanov llvm-svn: 164831
* PackedVector: Make the BitVector implementation configurable.Benjamin Kramer2012-09-281-13/+14
| | | | llvm-svn: 164826
* Provide malloc-free sentinels for the SparseBitVector internals.Benjamin Kramer2012-09-281-0/+16
| | | | llvm-svn: 164823
* Replace the use of strncpy() and sprintf() with std::string and LLVM streams.Dmitri Gribenko2012-09-281-4/+7
| | | | | | Patch by Martinez, Javier E. llvm-svn: 164822
* CorrelatedPropagation: BasicBlock::removePredecessor can simplify PHI nodes. ↵Benjamin Kramer2012-09-282-0/+30
| | | | | | | | If the it's the condition of a SwitchInst, reload it. Fixes PR13972. llvm-svn: 164818
* Make backtraces work again with both the configure and cmake build.Benjamin Kramer2012-09-283-1/+9
| | | | llvm-svn: 164817
* GlobalOpt: non-constexpr bitcasts or GEPs can occur even if the global value ↵Benjamin Kramer2012-09-282-2/+27
| | | | | | | | is only stored once. Fixes PR13968. llvm-svn: 164815
* Surprisingly, we missed a trivial case here. Fix that!Nick Lewycky2012-09-282-0/+12
| | | | llvm-svn: 164814
* Remove a LLVM_DELETED_FUNCTION from destructor to fix -std=c++11 build on ↵Craig Topper2012-09-281-1/+3
| | | | | | gcc 4.7. llvm-svn: 164813
* 1. Add load/store words from the stackReed Kotler2012-09-283-34/+86
| | | | | | | | | 2. As part of this, added assembly format FEXT_RI16_SP_explicit_ins and moved other lines for FEXT_RI16 formats to be in the right place in the code. 3. Added mayLoad and mayStore assignements for the load/store instructions added and for ones already there that did not have this assignment. 4. Another patch will deal with the problem of load/store byte/halfword to the stack. This is a particular Mips16 problem. llvm-svn: 164811
* Remove <def,read-undef> flags from partial redefinitions.Jakob Stoklund Olesen2012-09-271-0/+6
| | | | | | | | | The new coalescer can turn a full virtual register definition into a partial redef by merging another value into an unused vector lane. Make sure to clear the <read-undef> flag on such defs. llvm-svn: 164807
* Fix more crlf issues.Micah Villmow2012-09-271-34/+34
| | | | llvm-svn: 164805
* instcombine: Add more test cases for __strncpy_chk simplificationMeador Inge2012-09-272-0/+87
| | | | llvm-svn: 164800
* instcombine: Add more test cases for __strcpy_chk simplificationMeador Inge2012-09-273-13/+109
| | | | llvm-svn: 164799
* instcombine: Add more test cases for __memmove_chk simplificationMeador Inge2012-09-272-0/+84
| | | | llvm-svn: 164798
* instcombine: Add more test cases for __memcpy_chk simplificationMeador Inge2012-09-272-0/+84
| | | | llvm-svn: 164797
OpenPOWER on IntegriCloud