summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodePlacementOpt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make CodePlacementOpt align loops, rather than loop headers. TheDan Gohman2009-10-151-71/+30
| | | | | | | | | | header is just the entry block to the loop, and it needn't be at the top of the loop in the code layout. Remove the code that suppressed loop alignment for outer loops, so that outer loops are aligned. llvm-svn: 84158
* Fix this comment. The loop header is the loop entry point.Dan Gohman2009-10-071-2/+2
| | | | llvm-svn: 83437
* Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return valueBob Wilson2009-05-181-0/+2
| | | | | | correctly indicates whether it changed the code. llvm-svn: 72038
* Run code placement optimization for targets that want it (arm and x86 for now).Evan Cheng2009-05-131-0/+3
| | | | llvm-svn: 71726
* If header of inner loop is aligned, do not align the outer loop header. We ↵Evan Cheng2009-05-121-6/+33
| | | | | | don't want to add nops in the outer loop for the sake of aligning the inner loop. llvm-svn: 71609
* Fix pr4195: When iterating through predecessor blocks, break out of the loopBob Wilson2009-05-121-3/+3
| | | | | | | | | | | after finding the (unique) layout predecessor. Sometimes a block may be listed more than once, and processing it more than once in this loop can lead to inconsistent values for FtTBB/FtFBB, since the AnalyzeBranch method does not clear these values. There's no point in continuing the loop regardless. The testcase for this is reduced from the 2003-05-02-DependentPHI SingleSource test. llvm-svn: 71536
* Oops. Don't forget to align single bb loops.Evan Cheng2009-05-091-1/+1
| | | | llvm-svn: 71363
* Enable loop bb placement optimization.Evan Cheng2009-05-081-9/+0
| | | | llvm-svn: 71291
* Don't align loop header unless the loop back edge is below the header.Evan Cheng2009-05-081-1/+17
| | | | llvm-svn: 71242
* Reverse branch condition only when there is a conditional branch.Evan Cheng2009-05-081-1/+2
| | | | llvm-svn: 71214
* Add explicit braces to disambiguate nested if/else. Removes a warning.Nick Lewycky2009-05-081-1/+2
| | | | llvm-svn: 71211
* Optimize code placement in loop to eliminate unconditional branches or move ↵Evan Cheng2009-05-081-16/+236
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | unconditional branch to the outside of the loop. e.g. /// A: /// ... /// <fallthrough to B> /// /// B: --> loop header /// ... /// jcc <cond> C, [exit] /// /// C: /// ... /// jmp B /// /// ==> /// /// A: /// ... /// jmp B /// /// C: --> new loop header /// ... /// <fallthough to B> /// /// B: /// ... /// jcc <cond> C, [exit] llvm-svn: 71209
* Code refactoring.Evan Cheng2009-05-071-7/+22
| | | | llvm-svn: 71151
* Rename "loop aligner" pass to "code placement optimization" pass.Evan Cheng2009-05-071-0/+82
llvm-svn: 71150
OpenPOWER on IntegriCloud