summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms
Commit message (Collapse)AuthorAgeFilesLines
...
* fix more AST updating bugs, correcting miscompilation in PR8041Chris Lattner2010-09-021-2/+4
| | | | llvm-svn: 112878
* Reapply commit 112699, speculatively reverted by echristo, sinceDuncan Sands2010-09-026-20/+18
| | | | | | | | | I'm sure it is harmless. Original commit message: If PrototypeValue is erased in the middle of using the SSAUpdator then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway. llvm-svn: 112810
* deepen my MMX/SRoA hack to avoid hurting non-x86 codegen.Chris Lattner2010-09-011-2/+8
| | | | llvm-svn: 112763
* Fix loop unswitching's assumption that a code path which eitherDan Gohman2010-09-011-9/+8
| | | | | | infinite loops or exits will eventually exit. This fixes PR5373. llvm-svn: 112745
* JumpThreading keeps LazyValueInfo up to date, so we don't need to rerun itOwen Anderson2010-09-011-1/+3
| | | | | | if we schedule another LVI-using pass afterwards. llvm-svn: 112722
* Speculatively revert 112699 and 112702, they seem to be causingEric Christopher2010-09-016-18/+20
| | | | | | self host errors on clang-x86-64. llvm-svn: 112719
* If PrototypeValue is erased in the middle of using the SSAUpdatorDuncan Sands2010-09-016-20/+18
| | | | | | | then the SSAUpdator may access freed memory. Instead, simply pass in the type and name explicitly, which is all that was used anyway. llvm-svn: 112699
* add a gross hack to work around a problem that Argiris reportedChris Lattner2010-09-011-6/+25
| | | | | | | | | | | | | on llvmdev: SRoA is introducing MMX datatypes like <1 x i64>, which then cause random problems because the X86 backend is producing mmx stuff without inserting proper emms calls. In the short term, force off MMX datatypes. In the long term, the X86 backend should not select generic vector types to MMX registers. This is being worked on, but won't be done in time for 2.8. rdar://8380055 llvm-svn: 112696
* Revert 112442 and 112440 until the compile time problems introducedDan Gohman2010-09-011-106/+50
| | | | | | by 112440 are resolved. llvm-svn: 112692
* licm is wasting time hoisting constant foldable operations,Chris Lattner2010-08-311-4/+16
| | | | | | | instead of hoisting them, just fold them away. This occurs in the testcase for PR8041, for example. llvm-svn: 112669
* tidy upChris Lattner2010-08-311-31/+32
| | | | llvm-svn: 112643
* More cleanups of my JumpThreading transforms, including extracting some ↵Owen Anderson2010-08-311-37/+26
| | | | | | duplicated code into a helper function. llvm-svn: 112634
* Add an RAII helper to make cleanup of the RecursionSet more fool-proof.Owen Anderson2010-08-311-18/+24
| | | | llvm-svn: 112628
* Only try to clean up the current block if we changed that block already.Owen Anderson2010-08-311-5/+11
| | | | llvm-svn: 112625
* Refactor my fix for PR5652 to terminate the predecessor lookups after the ↵Owen Anderson2010-08-311-25/+24
| | | | | | first failure. llvm-svn: 112620
* Fix an infinite loop; merging two functions will create a new function (if theNick Lewycky2010-08-311-31/+45
| | | | | | | | | two are weak, we make them thunks to a new strong function) so don't iterate through the function list as we're modifying it. Also add back the outermost loop which got removed during the cleanups. llvm-svn: 112595
* Don't perform an extra traversal of the function just to do cleanup. We can ↵Owen Anderson2010-08-311-5/+4
| | | | | | safely simplify instructions after each block has been processed without worrying about iterator invalidation. llvm-svn: 112594
* Rename ValuePropagation to a more descriptive CorrelatedValuePropagation.Owen Anderson2010-08-311-12/+12
| | | | llvm-svn: 112591
* Rename file to something more descriptive.Owen Anderson2010-08-312-1/+1
| | | | llvm-svn: 112590
* More Chris-inspired JumpThreading fixes: use ConstantExpr to correctly ↵Owen Anderson2010-08-311-26/+64
| | | | | | | | | constant-fold undef, and be more careful with its return value. This actually exposed an infinite recursion bug in ComputeValueKnownInPredecessors which theoretically already existed (in JumpThreading's handling of and/or of i1's), but never manifested before. This patch adds a tracking set to prevent this case. llvm-svn: 112589
* Switch to DenseSet, simplifying much more code. We now have a single iterationNick Lewycky2010-08-311-78/+83
| | | | | | | where we hash, compare and fold, instead of one iteration where we build up the hash buckets and a second one to fold. llvm-svn: 112582
* Remove r111665, which implemented store-narrowing in InstCombine. Chris ↵Owen Anderson2010-08-311-47/+0
| | | | | | | | discovered a miscompilation in it, and it's not easily fixable at the optimizer level. I'll investigate reimplementing it in DAGCombine. llvm-svn: 112575
* Fix a typo.Owen Anderson2010-08-301-1/+1
| | | | llvm-svn: 112560
* Cleanups suggested by Chris.Owen Anderson2010-08-301-20/+18
| | | | llvm-svn: 112553
* Re-apply r112539, being more careful to respect the return values of the ↵Owen Anderson2010-08-301-22/+25
| | | | | | | | constant folding methods. Additionally, use the ConstantExpr::get*() methods to simplify some constant folding. llvm-svn: 112550
* Add statistics to evaluate this pass.Owen Anderson2010-08-301-0/+8
| | | | llvm-svn: 112545
* Revert r112539. It accidentally introduced a miscompilation.Owen Anderson2010-08-301-20/+16
| | | | llvm-svn: 112543
* Fixes and cleanups pointed out by Chris. In general, be careful to handle 0 ↵Owen Anderson2010-08-301-16/+20
| | | | | | | | results from ComputeValueKnownInPredecessors (indicating undef), and re-use existing constant folding APIs. llvm-svn: 112539
* rewrite DwarfEHPrepare to use SSAUpdater to promote its allocasChris Lattner2010-08-291-1/+1
| | | | | | | | instead of PromoteMemToReg. This allows it to stop using DF and DT, eliminating a computation of DT and DF from clang -O3. Clang is now down to 2 runs of DomFrontier. llvm-svn: 112457
* two changes: 1) make AliasSet hold the list of call sites with anChris Lattner2010-08-291-0/+1
| | | | | | | | | | | | | | assertingvh so we get a violent explosion if the pointer dangles. 2) Fix AliasSetTracker::deleteValue to remove call sites with by-pointer comparisons instead of by-alias queries. Using findAliasSetForCallSite can cause alias sets to get merged when they shouldn't, and can also miss alias sets when the call is readonly. #2 fixes PR6889, which only repros with a .c file :( llvm-svn: 112452
* LICM does get dead instructions input to it. Instead of sinking themChris Lattner2010-08-291-1/+12
| | | | | | out of loops, just delete them. llvm-svn: 112451
* use moveBefore instead of remove+insert, it avoids some Chris Lattner2010-08-291-9/+3
| | | | | | | symtab manipulation, so its faster (in addition to being more elegant) llvm-svn: 112450
* revert 112448 for now.Chris Lattner2010-08-291-5/+6
| | | | llvm-svn: 112449
* optimize LICM::hoist to use moveBefore. Correct its updatingChris Lattner2010-08-291-6/+5
| | | | | | | of AST to remove the hoisted instruction from the AST, since it is no longer in the loop. llvm-svn: 112448
* fix some bugs (found by inspection) where LICM would not updateChris Lattner2010-08-291-1/+3
| | | | | | | | | | LICM correctly. When sinking an instruction, it should not add entries for the sunk instruction to the AST, it should remove the entry for the sunk instruction. The blocks being sunk to are not in the loop, so their instructions shouldn't be in the AST (yet)! llvm-svn: 112447
* rework the ownership of subloop alias information: instead ofChris Lattner2010-08-291-16/+25
| | | | | | | | | | keeping them around until the pass is destroyed, keep them around a) just when useful (not for outer loops) and b) destroy them right after we use them. This should reduce memory use and fixes potential bugs where a loop is deleted and another loop gets allocated to the same address. llvm-svn: 112446
* apparently unswitch had the same "Feature". Stop itsChris Lattner2010-08-291-7/+2
| | | | | | claims that it preserves domfrontier if it doesn't really. llvm-svn: 112445
* now that loop passes don't use DomFrontier, there is no reasonChris Lattner2010-08-291-8/+2
| | | | | | | for the unroller to pretend it supports updating it. It still has a horrible hack for DomTree. llvm-svn: 112444
* Optionally rerun dedicated-register filtering after applyingDan Gohman2010-08-291-0/+20
| | | | | | | other filtering techniques, as those may allow it to filter out more obviously unprofitable candidates. llvm-svn: 112441
* Fix several areas in LSR to do a better job keeping the mainDan Gohman2010-08-291-50/+106
| | | | | | | | LSRInstance data structures up to date. This fixes some pessimizations caused by stale data which will be exposed in an upcoming change. llvm-svn: 112440
* Refactor the three main groups of code out ofDan Gohman2010-08-291-5/+28
| | | | | | NarrowSearchSpaceUsingHeuristics into separate functions. llvm-svn: 112439
* Delete a bogus check.Dan Gohman2010-08-291-2/+1
| | | | llvm-svn: 112438
* Add some comments.Dan Gohman2010-08-291-4/+13
| | | | llvm-svn: 112437
* Move this debug output into GenerateAllReuseFormula, to declutterDan Gohman2010-08-291-4/+4
| | | | | | the high-level logic. llvm-svn: 112436
* Delete an unused declaration.Dan Gohman2010-08-291-2/+0
| | | | llvm-svn: 112435
* Do one lookup instead of two.Dan Gohman2010-08-291-3/+4
| | | | llvm-svn: 112434
* licm preserves the cfg, it doesn't have to explicitly say itChris Lattner2010-08-291-1/+1
| | | | | | preserves domfrontier. It does preserve AA though. llvm-svn: 112419
* now that it doesn't use the PromoteMemToReg function, LICM doesn'tChris Lattner2010-08-291-4/+1
| | | | | | | require DomFrontier. Dropping this doesn't actually save any runs of the pass though. llvm-svn: 112418
* completely rewrite the memory promotion algorithm in LICM.Chris Lattner2010-08-291-200/+215
| | | | | | | Among other things, this uses SSAUpdater instead of PromoteMemToReg. llvm-svn: 112417
* use getUniqueExitBlocks instead of a manual set.Chris Lattner2010-08-291-10/+2
| | | | llvm-svn: 112412
OpenPOWER on IntegriCloud