aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CodePlacementOpt.cpp
AgeCommit message (Collapse)AuthorFilesLines
2010-08-06Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson1-1/+1
llvm-svn: 110460
2010-08-06Revert r110396 to fix buildbots.Owen Anderson1-1/+1
llvm-svn: 110410
2010-08-05Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson1-1/+1
address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
2010-06-07Add some basic debug output.Dan Gohman1-0/+4
llvm-svn: 105561
2010-02-18Make CodePlacementOpt detect special EH control flow byDan Gohman1-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
2010-02-10Fix several comments which had previously been "the the" where aDan Gohman1-1/+1
different word was intended. llvm-svn: 95795
2010-02-10Fix "the the" and similar typos.Dan Gohman1-1/+1
llvm-svn: 95781
2010-02-09move target-independent opcodes out of TargetInstrInfoChris Lattner1-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
2009-12-25Remove dead store.Bill Wendling1-1/+0
llvm-svn: 92157
2009-12-03improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner1-4/+5
Patch by Howard Hinnant! llvm-svn: 90365
2009-11-12Move the utility function UpdateTerminator() from CodePlacementOpt() intoJim Grosbach1-61/+3
MachineBasicBlock so other passes can utilize it. llvm-svn: 86947
2009-10-20Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks areDan Gohman1-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
2009-10-19Revert r84295, this unbreaks llvm-gcc bootstrap on x86-64/linuxAnton Korobeynikov1-355/+177
llvm-svn: 84516
2009-10-17Fix my -Asserts warning fix.Daniel Dunbar1-2/+3
llvm-svn: 84372
2009-10-17Suppress -Asserts warning.Daniel Dunbar1-2/+2
llvm-svn: 84327
2009-10-17Enhance CodePlacementOpt's unconditional intra-loop branch elimination logicDan Gohman1-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
2009-10-15Make CodePlacementOpt align loops, rather than loop headers. TheDan Gohman1-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
2009-10-07Fix this comment. The loop header is the loop entry point.Dan Gohman1-2/+2
llvm-svn: 83437
2009-05-18Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return valueBob Wilson1-0/+2
correctly indicates whether it changed the code. llvm-svn: 72038
2009-05-13Run code placement optimization for targets that want it (arm and x86 for now).Evan Cheng1-0/+3
llvm-svn: 71726
2009-05-12If header of inner loop is aligned, do not align the outer loop header. We ↵Evan Cheng1-6/+33
don't want to add nops in the outer loop for the sake of aligning the inner loop. llvm-svn: 71609
2009-05-12Fix pr4195: When iterating through predecessor blocks, break out of the loopBob Wilson1-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
2009-05-09Oops. Don't forget to align single bb loops.Evan Cheng1-1/+1
llvm-svn: 71363
2009-05-08Enable loop bb placement optimization.Evan Cheng1-9/+0
llvm-svn: 71291
2009-05-08Don't align loop header unless the loop back edge is below the header.Evan Cheng1-1/+17
llvm-svn: 71242
2009-05-08Reverse branch condition only when there is a conditional branch.Evan Cheng1-1/+2
llvm-svn: 71214
2009-05-08Add explicit braces to disambiguate nested if/else. Removes a warning.Nick Lewycky1-1/+2
llvm-svn: 71211
2009-05-08Optimize code placement in loop to eliminate unconditional branches or move ↵Evan Cheng1-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
2009-05-07Code refactoring.Evan Cheng1-7/+22
llvm-svn: 71151
2009-05-07Rename "loop aligner" pass to "code placement optimization" pass.Evan Cheng1-0/+82
llvm-svn: 71150