summaryrefslogtreecommitdiff
path: root/lib/Transforms/Scalar
Commit message (Collapse)AuthorAge
* make -fno-rtti the default unless a directory builds with REQUIRES_RTTI.Chris Lattner2010-01-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94378 91177308-0d34-0410-b5e6-96231b3b80d8
* third bug from PR6119: the xor dupe extension allowsChris Lattner2010-01-23
| | | | | | | | | for arbitrary terminators in predecessors, don't assume it is a conditional or uncond branch. The testcase shows an example where they can happen with switches. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94323 91177308-0d34-0410-b5e6-96231b3b80d8
* add an early out to ProcessBranchOnXOR to speed it up,Chris Lattner2010-01-23
| | | | | | | | | handle the case when we can infer an input to the xor from all inputs that agree, instead of going into an infinite loop. Another part of PR6199 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94321 91177308-0d34-0410-b5e6-96231b3b80d8
* fix a crash in jump threading, PR6119Chris Lattner2010-01-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94319 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply 94059 while fixing the calling convention setupEric Christopher2010-01-23
| | | | | | | for strcpy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94287 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert 94059. It is breaking the MultiSource/Benchmarks/Prolangs-C/bisonBob Wilson2010-01-22
| | | | | | | test on ARM. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94198 91177308-0d34-0410-b5e6-96231b3b80d8
* Stop building RTTI information for *most* llvm libraries. NotableChris Lattner2010-01-22
| | | | | | | | | | | | | missing ones are libsupport, libsystem and libvmcore. libvmcore is currently blocked on bugpoint, which uses EH. Once it stops using EH, we can switch it off. This #if 0's out 3 unit tests, because gtest requires RTTI information. Suggestions welcome on how to fix this. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94164 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert LoopStrengthReduce.cpp to pre-r94061 for now.Dan Gohman2010-01-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94123 91177308-0d34-0410-b5e6-96231b3b80d8
* DbgInfoIntrinsics no longer appear in an instruction's use list; so clean up ↵Victor Hernandez2010-01-21
| | | | | | looking for them in use iterations and remove OnlyUsedByDbgInfoIntrinsics() git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94111 91177308-0d34-0410-b5e6-96231b3b80d8
* When inserting expressions for post-increment users which containDan Gohman2010-01-21
| | | | | | | | | loop-variant components, adds must be inserted after the increment. Keep track of the increment position for this case, and insert these adds in the correct location. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94110 91177308-0d34-0410-b5e6-96231b3b80d8
* Include IVUsers information in LSR's debug output.Dan Gohman2010-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94108 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune the search for candidate formulae if the number of registerDan Gohman2010-01-21
| | | | | | | | operands exceeds the number of registers used in the initial solution, as that wouldn't lead to a profitable solution anyway. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94107 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a comment.Dan Gohman2010-01-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94104 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-implement the main strength-reduction portion of LoopStrengthReduction.Dan Gohman2010-01-21
| | | | | | | | | | | | | | | This new version is much more aggressive about doing "full" reduction in cases where it reduces register pressure, and also more aggressive about rewriting induction variables to count down (or up) to zero when doing so reduces register pressure. It currently uses fairly simplistic algorithms for finding reuse opportunities, but it introduces a new framework allows it to combine multiple strategies at once to form hybrid solutions, instead of doing all full-reduction or all base+index. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94061 91177308-0d34-0410-b5e6-96231b3b80d8
* Add strcpy_chk -> strcpy support for "don't know" object sizeEric Christopher2010-01-21
| | | | | | | | answers. This will update as object size checking gets better information. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@94059 91177308-0d34-0410-b5e6-96231b3b80d8
* When doing address-mode sinking, expand the base register first, ratherDan Gohman2010-01-19
| | | | | | | | | | | | | than the scaled register. This makes it more likely that subsequent AddrModeMatcher queries will match the new address the same way as the old, instead of accidentally matching what had been the base register as the new scaled register, and then failing to match the scaled register. This fixes some problems with address-mode sinking multiple muls into a block, which will be a lot more common with some upcoming LoopStrengthReduction changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93935 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a crash in scalarrepl for memcpy/memmove where the source and destinationBob Wilson2010-01-19
| | | | | | | | | | are the same. I had already fixed a similar problem where the source and destination were different bitcasts derived from the same alloca, but the previous fix still did not handle the case where both operands are exactly the same value. Radar 7552893. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93848 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert some of the dynamic opcode lookups into static ones.Owen Anderson2010-01-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93693 91177308-0d34-0410-b5e6-96231b3b80d8
* 1) Use the new SimplifyInstructionsInBlock routine instead of the copyChris Lattner2010-01-12
| | | | | | | | | | | | | in JT. 2) When cloning blocks for PHI or xor conditions, use instsimplify to simplify the code as we go. This allows us to squish common cases early in JT which opens up opportunities for subsequent iterations, and allows it to completely simplify the testcase. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93253 91177308-0d34-0410-b5e6-96231b3b80d8
* tidy upChris Lattner2010-01-12
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93222 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach jump threading to duplicate small blocks when the branchChris Lattner2010-01-12
| | | | | | | | | | | | | | | | | | | | | condition is a xor with a phi node. This eliminates nonsense like this from 176.gcc in several places: LBB166_84: testl %eax, %eax - setne %al - xorb %cl, %al - notb %al - testb $1, %al - je LBB166_85 + je LBB166_69 + jmp LBB166_85 This is rdar://7391699 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93221 91177308-0d34-0410-b5e6-96231b3b80d8
* some cleanup, and make it obvious that ProcessJumpOnPHI only worksChris Lattner2010-01-11
| | | | | | | on branches by renaming it and checking for a branch at the call site. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93208 91177308-0d34-0410-b5e6-96231b3b80d8
* only factor from expressions whose uses are empty and whoseChris Lattner2010-01-09
| | | | | | | base is the right expression type. This fixes PR5981. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93045 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress an unused variable warning when assertions are off;Duncan Sands2010-01-08
| | | | | | | remove some trailing whitespace while there. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93008 91177308-0d34-0410-b5e6-96231b3b80d8
* Use a do-while loop instead of while + boolean.Benjamin Kramer2010-01-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92912 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the object size intrinsic optimization to inst-combine and makeEric Christopher2010-01-06
| | | | | | | it work for any integer size return type. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92853 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting.Mikhail Glushenkov2010-01-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92831 91177308-0d34-0410-b5e6-96231b3b80d8
* Move remaining stuff to the isInteger predicate.Benjamin Kramer2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92771 91177308-0d34-0410-b5e6-96231b3b80d8
* Convert a ton of simple integer type equality tests to the new predicate.Benjamin Kramer2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92760 91177308-0d34-0410-b5e6-96231b3b80d8
* Set Changed properly after calling DeleteDeadPHIs.Dan Gohman2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92735 91177308-0d34-0410-b5e6-96231b3b80d8
* Use do+while instead of while for loops which obviously have aDan Gohman2010-01-05
| | | | | | | non-zero trip count. Use SmallVector's pop_back_val(). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92734 91177308-0d34-0410-b5e6-96231b3b80d8
* fix an infinite loop in reassociate building emacs.Chris Lattner2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92679 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92624 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92623 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92622 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92620 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92619 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92617 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92615 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92614 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92613 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92612 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92611 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92610 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92609 91177308-0d34-0410-b5e6-96231b3b80d8
* Change errs() to dbgs().David Greene2010-01-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92608 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead debug info intrinsics.Devang Patel2010-01-05
| | | | | | | | | | | | Intrinsic::dbg_stoppoint Intrinsic::dbg_region_start Intrinsic::dbg_region_end Intrinsic::dbg_func_start AutoUpgrade simply ignores these intrinsics now. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92557 91177308-0d34-0410-b5e6-96231b3b80d8
* 80-col violations, trailing whitespace.Mikhail Glushenkov2010-01-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92470 91177308-0d34-0410-b5e6-96231b3b80d8
* move instcombine to its own library, it's past time.Chris Lattner2010-01-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92459 91177308-0d34-0410-b5e6-96231b3b80d8
* implement an instcombine xform needed by clang's codegenChris Lattner2010-01-04
| | | | | | | | | on the example in PR4216. This doesn't trigger in the testsuite, so I'd really appreciate someone scrutinizing the logic for correctness. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92458 91177308-0d34-0410-b5e6-96231b3b80d8