summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Transforms/Scalar/LoopUnroll.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Correct a few comments.Dan Gohman2007-05-141-5/+5
| | | | llvm-svn: 37034
* This patch extends the LoopUnroll pass to be able to unroll loopsDan Gohman2007-05-111-58/+193
| | | | | | | | | | | | | | | | | with unknown trip counts. This is left off by default, and a command-line option enables it. It also begins to separate loop unrolling into a utility routine; eventually it might be made usable from other passes. It currently works by inserting conditional branches between each unrolled iteration, unless it proves that the trip count is a multiple of a constant integer > 1, which it currently only does in the rare case that the trip count expression is a Mul operator with a ConstantInt operand. Eventually this information might be provided by other sources, for example by a pass that peels/splits the loop for this purpose. llvm-svn: 36990
* Fix various whitespace inconsistencies.Dan Gohman2007-05-081-10/+10
| | | | llvm-svn: 36936
* Correct the comment for ApproximateLoopSize to reflect what it actually does.Dan Gohman2007-05-081-2/+1
| | | | llvm-svn: 36935
* Fix Transforms/LoopUnroll/2007-05-05-UnrollMiscomp.ll and PR1385.Chris Lattner2007-05-051-18/+17
| | | | | | | | If we have a LCSSA, only modify the input value if the inval was defined by an instruction in the loop. If defined by something before the loop, it is still valid. llvm-svn: 36784
* make a temporary for *SI, no functionality change.Chris Lattner2007-05-051-6/+7
| | | | llvm-svn: 36782
* 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
* FixDevang Patel2007-04-161-0/+6
| | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20070416/047888.html llvm-svn: 36182
* Now LoopUnroll is a LoopPass.Devang Patel2007-03-071-36/+7
| | | | llvm-svn: 34996
* Guard against huge loop trip counts in an APInt safe way.Reid Spencer2007-03-021-2/+7
| | | | llvm-svn: 34858
* Apply the VISIBILITY_HIDDEN field to the remaining anonymous classes inReid Spencer2007-02-051-1/+2
| | | | | | | 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-8/+8
| | | | | | 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
* Switch over Transforms/Scalar to use the STATISTIC macro. For each statisticChris Lattner2006-12-191-2/+2
| | | | | | | 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-1/+1
| | | | | | is 'unsigned'. llvm-svn: 32279
* Removed #include <iostream> and replaced with llvm_* streams.Bill Wendling2006-11-261-7/+6
| | | | llvm-svn: 31923
* For PR786:Reid Spencer2006-11-021-2/+1
| | | | | | | | | | 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
* For PR950:Reid Spencer2006-10-201-2/+2
| | | | | | | | This patch implements the first increment for the Signless Types feature. All changes pertain to removing the ConstantSInt and ConstantUInt classes in favor of just using ConstantInt. llvm-svn: 31063
* Clean up a bit.Owen Anderson2006-08-291-51/+32
| | | | llvm-svn: 29950
* Make LoopUnroll fold excessive BasicBlocks. This results in a significant ↵Owen Anderson2006-08-281-9/+89
| | | | | | | | speedup of gccas on 252.eon llvm-svn: 29936
* eliminate RegisterOpt. It does the same thing as RegisterPass.Chris Lattner2006-08-271-1/+1
| | | | llvm-svn: 29925
* Fix a crash related to updating Phi nodes in the original header block. ↵Owen Anderson2006-08-251-1/+2
| | | | | | | | This was causing a crash in 175.vpr llvm-svn: 29887
* Implement unrolling of multiblock loops. This significantly improves theOwen Anderson2006-08-241-127/+125
| | | | | | | | utility of the LoopUnroll pass. Also, add a testcase for multiblock-loop unrolling. llvm-svn: 29859
* Minor comment tweaksChris Lattner2006-07-201-6/+5
| | | | llvm-svn: 29226
* Add an assertion.Owen Anderson2006-07-191-0/+2
| | | | llvm-svn: 29199
* Make LoopUnroll not die on LCSSA Phis. This makes lencod work again.Owen Anderson2006-07-191-0/+6
| | | | llvm-svn: 29198
* Fix a spello in a comment.Reid Spencer2006-06-071-1/+1
| | | | llvm-svn: 28714
* Make iostream #inclusion explicitChris Lattner2006-01-221-1/+1
| | | | llvm-svn: 25514
* Eliminate tabs and trailing spacesJeff Cohen2005-04-231-1/+1
| | | | llvm-svn: 21480
* Remove trailing whitespaceMisha Brukman2005-04-211-8/+8
| | | | llvm-svn: 21427
* Fix a bug where we could corrupt a parent loop's header info if we unrolledChris Lattner2005-03-061-6/+17
| | | | | | | a nested loop. This fixes Transforms/LoopUnroll/2005-03-06-BadLoopInfoUpdate.ll and PR532 llvm-svn: 20493
* Silence VS warnings.Chris Lattner2005-01-081-5/+7
| | | | llvm-svn: 19380
* Do not consider debug intrinsics in the size computations for loop unrolling.Chris Lattner2004-11-221-0/+3
| | | | | | Patch contributed by Michael McCracken! llvm-svn: 18108
* Correction to allow compilation with Visual C++.Reid Spencer2004-10-181-0/+2
| | | | | | Patch contributed by Morten Ofstad. Thanks Morten! llvm-svn: 17123
* Convert code to compile with vc7.1.Reid Spencer2004-09-151-2/+2
| | | | | | Patch contributed by Paolo Invernizzi. Thanks Paolo! llvm-svn: 16368
* Changes For Bug 352Reid Spencer2004-09-011-4/+4
| | | | | | | | Move include/Config and include/Support into include/llvm/Config, include/llvm/ADT and include/llvm/Support. From here on out, all LLVM public header files must be under include/llvm/. llvm-svn: 16137
* Fix a nasty bug that caused us to unroll EXTREMELY large loops due to overflowChris Lattner2004-05-131-3/+3
| | | | | | | | | | | | | | | | | | | | in the size calculation. This is not something you want to see: Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - UNROLLING! The problem was that 2*2147483648 == 0. Now we get: Loop Unroll: F[main] Loop %no_exit Loop Size = 2 Trip Count = 2147483648 - TOO LARGE: 4294967296>100 Thanks to some anonymous person playing with the demo page that repeatedly caused zion to go into swapping land. That's one way to ensure you'll get a quick bugfix. :) Testcase here: Transforms/LoopUnroll/2004-05-13-DontUnrollTooMuch.ll llvm-svn: 13564
* Fix PR325Chris Lattner2004-04-201-1/+1
| | | | llvm-svn: 13081
* Add #includeChris Lattner2004-04-191-0/+1
| | | | llvm-svn: 13057
* Change the ExitBlocks list from being explicitly contained in the LoopChris Lattner2004-04-181-22/+1
| | | | | | | structure to being dynamically computed on demand. This makes updating loop information MUCH easier. llvm-svn: 13045
* Reduce the unrolling limitChris Lattner2004-04-181-1/+1
| | | | llvm-svn: 13040
* If the preheader of the loop was the entry block of the function, make sureChris Lattner2004-04-181-2/+7
| | | | | | | | that the exit block of the loop becomes the new entry block of the function. This was causing a verifier assertion on 252.eon. llvm-svn: 13039
* Be much more careful about how we update instructions outside of the loopChris Lattner2004-04-181-9/+15
| | | | | | | using instructions inside of the loop. This should fix the MishaTest failure from last night. llvm-svn: 13038
* After unrolling our single basic block loop, fold it into the preheader and exitChris Lattner2004-04-181-2/+43
| | | | | | | | | | | | | block. The primary motivation for doing this is that we can now unroll nested loops. This makes a pretty big difference in some cases. For example, in 183.equake, we are now beating the native compiler with the CBE, and we are a lot closer with LLC. I'm now going to play around a bit with the unroll factor and see what effect it really has. llvm-svn: 13034
* Fix a bug: this does not preserve the CFG!Chris Lattner2004-04-181-4/+20
| | | | | | While we're at it, add support for updating loop information correctly. llvm-svn: 13033
* Initial checkin of a simple loop unroller. This pass is extremely basic andChris Lattner2004-04-181-0/+247
limited. Even in it's extremely simple state (it can only *fully* unroll single basic block loops that execute a constant number of times), it already helps improve performance a LOT on some benchmarks, particularly with the native code generators. llvm-svn: 13028
OpenPOWER on IntegriCloud