summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodePlacementOpt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add some basic debug output.Dan Gohman2010-06-071-0/+4
| | | | llvm-svn: 105561
* Make CodePlacementOpt detect special EH control flow byDan Gohman2010-02-181-7/+8
| | | | | | | | | | checking whether AnalyzeBranch disagrees with the CFG directly, rather than looking for EH_LABEL instructions. EH_LABEL instructions aren't always at the end of the block, due to FP_REG_KILL and other things. This fixes an infinite loop compiling MultiSource/Benchmarks/Bullet. llvm-svn: 96611
* Fix several comments which had previously been "the the" where aDan Gohman2010-02-101-1/+1
| | | | | | different word was intended. llvm-svn: 95795
* Fix "the the" and similar typos.Dan Gohman2010-02-101-1/+1
| | | | llvm-svn: 95781
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-091-1/+1
| | | | | | | | | into TargetOpcodes.h. #include the new TargetOpcodes.h into MachineInstr. Add new inline accessors (like isPHI()) to MachineInstr, and start using them throughout the codebase. llvm-svn: 95687
* Remove dead store.Bill Wendling2009-12-251-1/+0
| | | | llvm-svn: 92157
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-031-4/+5
| | | | | | Patch by Howard Hinnant! llvm-svn: 90365
* Move the utility function UpdateTerminator() from CodePlacementOpt() intoJim Grosbach2009-11-121-61/+3
| | | | | | MachineBasicBlock so other passes can utilize it. llvm-svn: 86947
* Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks areDan Gohman2009-10-201-182/+343
| | | | | | | | | tracked. Instead of trying to manually keep track of these locations while doing complex modifications, just recompute them when they're needed. This fixes a bug in which the TopMBB and BotMBB were not correctly updated, leading to invalid transformations. llvm-svn: 84598
* Revert r84295, this unbreaks llvm-gcc bootstrap on x86-64/linuxAnton Korobeynikov2009-10-191-355/+177
| | | | llvm-svn: 84516
* Fix my -Asserts warning fix.Daniel Dunbar2009-10-171-2/+3
| | | | llvm-svn: 84372
* Suppress -Asserts warning.Daniel Dunbar2009-10-171-2/+2
| | | | llvm-svn: 84327
* Enhance CodePlacementOpt's unconditional intra-loop branch elimination logicDan Gohman2009-10-171-177/+354
| | | | | | | | | | | | to be more general and understand more varieties of loops. Teach CodePlacementOpt to reorganize the basic blocks of a loop so that they are contiguous. This also includes a fair amount of logic for preserving fall-through edges while doing so. This fixes a BranchFolding-ism where blocks which can't be made to use a fall-through edge and don't conveniently fit anywhere nearby get tossed out to the end of the function. llvm-svn: 84295
* 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