summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp
Commit message (Collapse)AuthorAgeFilesLines
* - Undo previous check and allow loop switch for condtion that is not insideDevang Patel2007-06-281-8/+7
| | | | | | | | loop. - Avoid loop unswich for loop header branch. - While cloning dominators fix typo and handle self dominating blocks. llvm-svn: 37772
* Update LoopUnswitch pass to preserve DomiantorTree.Devang Patel2007-06-281-32/+55
| | | | llvm-svn: 37771
* If a condition is not inside a loop then the condition is suitableDevang Patel2007-06-281-0/+7
| | | | | | to loop unswitch candidate for the loop. llvm-svn: 37770
* Avoid non-trivial loop unswitching while optimizing for size.Devang Patel2007-06-061-3/+12
| | | | llvm-svn: 37446
* Fix PR1333Devang Patel2007-05-091-5/+25
| | | | | | | | Testcases : http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049451.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070507/049452.html llvm-svn: 36955
* Drop 'const'Devang Patel2007-05-031-2/+2
| | | | llvm-svn: 36662
* Use 'static const char' instead of 'static const int'.Devang Patel2007-05-021-2/+2
| | | | | | | Due to darwin gcc bug, one version of darwin linker coalesces static const int, which defauts PassID based pass identification. llvm-svn: 36652
* Do not use typeinfo to identify pass in pass manager.Devang Patel2007-05-011-0/+4
| | | | llvm-svn: 36632
* Now LoopUnswitch is a LoopPass.Devang Patel2007-03-071-86/+17
| | | | llvm-svn: 34992
* Use more efficient test for one value in a ConstantInt.Reid Spencer2007-03-021-2/+2
| | | | llvm-svn: 34859
* Use efficient container SmallPtrSetDevang Patel2007-02-261-3/+4
| | | | llvm-svn: 34640
* Do not unswitch loop on same value again and again.Devang Patel2007-02-261-0/+7
| | | | llvm-svn: 34638
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-2/+3
| | | | | | | the Transforms library. This reduces debug library size by 132 KB, debug binary size by 376 KB, and reduces link time for llvm tools slightly. llvm-svn: 33939
* Switch inliner over to use DenseMap instead of std::map for ValueMap. ThisChris Lattner2007-02-031-5/+5
| | | | | | speeds up the inliner 16%. llvm-svn: 33801
* Adjust #includes to match movement of constant folding code from ↵Chris Lattner2007-01-301-0/+1
| | | | | | transformutils to libanalysis. llvm-svn: 33680
* For PR1043:Reid Spencer2007-01-191-1/+2
| | | | | | | | | | | | | | This is the final patch for this PR. It implements some minor cleanup in the use of IntegerType, to wit: 1. Type::getIntegerTypeMask -> IntegerType::getBitMask 2. Type::Int*Ty changed to IntegerType* from Type* 3. ConstantInt::getType() returns IntegerType* now, not Type* This also fixes PR1120. Patch by Sheng Zhou. llvm-svn: 33370
* fix a bug in a recent patchChris Lattner2007-01-131-1/+1
| | | | llvm-svn: 33164
* Implement review feedback for the ConstantBool->ConstantInt merge. ChrisReid Spencer2007-01-121-6/+7
| | | | | | | | recommended that getBoolValue be replaced with getZExtValue and that get(bool) be replaced by get(const Type*, uint64_t). This implements those changes. llvm-svn: 33110
* Rename BoolTy as Int1Ty. Patch by Sheng Zhou.Reid Spencer2007-01-111-6/+6
| | | | llvm-svn: 33076
* For PR1043:Zhou Sheng2007-01-111-30/+34
| | | | | | | Merge ConstantIntegral and ConstantBool into ConstantInt. Remove ConstantIntegral and ConstantBool from LLVM. llvm-svn: 33073
* For PR950:Reid Spencer2006-12-231-4/+3
| | | | | | | | This patch removes the SetCC instructions and replaces them with the ICmp and FCmp instructions. The SetCondInst instruction has been removed and been replaced with ICmpInst and FCmpInst. llvm-svn: 32751
* Switch over Transforms/Scalar to use the STATISTIC macro. For each statisticChris Lattner2006-12-191-7/+6
| | | | | | | converted, we lose a static initializer. This also allows GCC to emit warnings about unused statistics. llvm-svn: 32690
* Detemplatize the Statistic class. The only type it is instantiated withChris Lattner2006-12-061-5/+5
| | | | | | is 'unsigned'. llvm-svn: 32279
* Removed #include <iostream> and replaced with llvm_* streams.Bill Wendling2006-11-261-18/+17
| | | | llvm-svn: 31923
* For PR786:Reid Spencer2006-11-021-5/+2
| | | | | | | | | | Turn on -Wunused and -Wno-unused-parameter. Clean up most of the resulting fall out by removing unused variables. Remaining warnings have to do with unused functions (I didn't want to delete code without review) and unused variables in generated code. Maintainers should clean up the remaining issues when they see them. All changes pass DejaGnu tests and Olden. llvm-svn: 31380
* Eliminate ConstantBool::True and ConstantBool::False. Instead, provideChris Lattner2006-09-281-9/+10
| | | | | | ConstantBool::getTrue() and ConstantBool::getFalse(). llvm-svn: 30665
* Do not rely on std::sort and std::erase to get list of uniqueDevang Patel2006-08-291-10/+4
| | | | | | | | exit blocks. The output is dependent on addresses of basic block. Add and use Loop::getUniqueExitBlocks. llvm-svn: 29966
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Fix a error that hadn't yet cause any problems, but I'm sure it would haveOwen Anderson2006-07-191-1/+1
| | | | | | somewhere down the road. llvm-svn: 29197
* Switch to a very conservative heuristic for determining when loop-unswitchingOwen Anderson2006-06-281-5/+5
| | | | | | | | | | will be profitable. This is mainly to remove some cases where excessive unswitching would result in long compile times and/or huge generated code. Once someone comes up with a better heuristic that avoids these cases, this should be switched out. llvm-svn: 28962
* Don't unswitch really large loops even if they are mostly filled with emptyChris Lattner2006-06-281-0/+6
| | | | | | blocks. llvm-svn: 28959
* Fix for 2006-06-27-DeadSwitchCase.llOwen Anderson2006-06-271-5/+6
| | | | | | | Be more careful when updating Phi nodes after eliminating dead switch cases. Fix proposed by Chris. llvm-svn: 28947
* Make LoopUnswitch able to unswitch loops with live-out values by taking ↵Owen Anderson2006-06-261-53/+63
| | | | | | | | | advantage of LCSSA. This results several times the number of unswitchings occurring on tests such and timberwolfmc, unix-tbl, and ldecod. llvm-svn: 28912
* Fix Transforms/LoopUnswitch/2006-06-13-SingleEntryPHI.ll, a loop unswitchChris Lattner2006-06-141-1/+13
| | | | | | bug exposed by the recent lcssa work. llvm-svn: 28779
* Reapply my 6/9 changes. The bug Evan saw no longer occurs.Owen Anderson2006-06-121-1/+7
| | | | llvm-svn: 28759
* Back out Owen's 6/9 changes. They broke ↵Evan Cheng2006-06-111-4/+0
| | | | | | MultiSource/Benchmarks/Prolangs-C/bison (and perhaps others). llvm-svn: 28747
* Add LCSSA as a requirement for LoopUnswitch, and assert that LoopUnswitch ↵Owen Anderson2006-06-091-0/+4
| | | | | | | | preserves LCSSA. llvm-svn: 28739
* add the actual cost to the debug infoChris Lattner2006-03-241-2/+4
| | | | llvm-svn: 27051
* Fix Regression/Transforms/LoopUnswitch/2006-02-22-UnswitchCrash.ll, whichChris Lattner2006-02-221-1/+3
| | | | | | | | | caused SPASS to fail building last night. We can't trivially unswitch a loop if the exit block has phi nodes in it, because we don't know which predecessor to use. llvm-svn: 26320
* Add some comments, simplify some code, and fix a bug that caused rewritingChris Lattner2006-02-221-34/+26
| | | | | | to rewrite with the wrong value. llvm-svn: 26311
* improved support for branch folding, still not enabled.Chris Lattner2006-02-181-143/+269
| | | | llvm-svn: 26289
* Implement deletion of dead blocks, currently disabled.Chris Lattner2006-02-181-28/+75
| | | | llvm-svn: 26285
* a previous patch completely disabled trivial unswitching, this fixees it.Chris Lattner2006-02-181-1/+0
| | | | | | Thanks to nate for pointing this out :) llvm-svn: 26280
* initial trivial support for folding branches that have now-constant ↵Chris Lattner2006-02-181-3/+34
| | | | | | destinations. llvm-svn: 26279
* When unswitching a loop, make sure to update loop info with exit blocks inChris Lattner2006-02-181-2/+4
| | | | | | the right loop. llvm-svn: 26277
* Fix loops where the header has an exit, fixing a loop-unswitch crash on craftyChris Lattner2006-02-171-13/+15
| | | | llvm-svn: 26258
* start of some new simplification code, not thoroughly tested, use at your ownChris Lattner2006-02-171-14/+161
| | | | | | risk :) llvm-svn: 26248
* Change SplitBlock to increment a BasicBlock::iterator, not an Instruction*. ↵Chris Lattner2006-02-161-23/+27
| | | | | | | | | | | Apparently they do different things :) This fixes a testcase that nate reduced from spass. Also included are a couple minor code changes that don't affect the generated code at all. llvm-svn: 26235
* Fix VC++ warning.Jeff Cohen2006-02-161-1/+0
| | | | llvm-svn: 26228
* fix a bug where we unswitched the wrong wayChris Lattner2006-02-161-2/+2
| | | | llvm-svn: 26225
OpenPOWER on IntegriCloud