summaryrefslogtreecommitdiff
path: root/lib/CodeGen/CodePlacementOpt.cpp
Commit message (Collapse)AuthorAge
* Create enums for the different attributes.Bill Wendling2012-10-09
| | | | | | | | We use the enums to query whether an Attributes object has that attribute. The opaque layer is responsible for knowing where that specific attribute is stored. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165488 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the `hasFnAttr' method from Function.Bill Wendling2012-09-26
| | | | | | | | The hasFnAttr method has been replaced by querying the Attributes explicitly. No intended functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@164725 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@157885 91177308-0d34-0410-b5e6-96231b3b80d8
* Codegen pass definition cleanup. No functionality.Andrew Trick2012-02-08
| | | | | | | | | | | | | Moving toward a uniform style of pass definition to allow easier target configuration. Globally declare Pass ID. Globally declare pass initializer. Use INITIALIZE_PASS consistently. Add a call to the initializer from CodeGen.cpp. Remove redundant "createPass" functions and "getPassName" methods. While cleaning up declarations, cleaned up comments (sorry for large diff). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@150100 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-15
| | | | | | | | Luis Felipe Strano Moraes! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@129558 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix some typos.Cameron Zwarich2011-03-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126829 91177308-0d34-0410-b5e6-96231b3b80d8
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110460 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r110396 to fix buildbots.Owen Anderson2010-08-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110410 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-05
| | | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@110396 91177308-0d34-0410-b5e6-96231b3b80d8
* Add some basic debug output.Dan Gohman2010-06-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@105561 91177308-0d34-0410-b5e6-96231b3b80d8
* Make CodePlacementOpt detect special EH control flow byDan Gohman2010-02-18
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@96611 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix several comments which had previously been "the the" where aDan Gohman2010-02-10
| | | | | | | different word was intended. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95795 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix "the the" and similar typos.Dan Gohman2010-02-10
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95781 91177308-0d34-0410-b5e6-96231b3b80d8
* move target-independent opcodes out of TargetInstrInfoChris Lattner2010-02-09
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@95687 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove dead store.Bill Wendling2009-12-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@92157 91177308-0d34-0410-b5e6-96231b3b80d8
* improve portability to avoid conflicting with std::next in c++'0x.Chris Lattner2009-12-03
| | | | | | | Patch by Howard Hinnant! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@90365 91177308-0d34-0410-b5e6-96231b3b80d8
* Move the utility function UpdateTerminator() from CodePlacementOpt() intoJim Grosbach2009-11-12
| | | | | | | | MachineBasicBlock so other passes can utilize it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@86947 91177308-0d34-0410-b5e6-96231b3b80d8
* Re-apply r84295, with fixes to how the loop "top" and "bottom" blocks areDan Gohman2009-10-20
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84598 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r84295, this unbreaks llvm-gcc bootstrap on x86-64/linuxAnton Korobeynikov2009-10-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84516 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix my -Asserts warning fix.Daniel Dunbar2009-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84372 91177308-0d34-0410-b5e6-96231b3b80d8
* Suppress -Asserts warning.Daniel Dunbar2009-10-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84327 91177308-0d34-0410-b5e6-96231b3b80d8
* Enhance CodePlacementOpt's unconditional intra-loop branch elimination logicDan Gohman2009-10-17
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84295 91177308-0d34-0410-b5e6-96231b3b80d8
* Make CodePlacementOpt align loops, rather than loop headers. TheDan Gohman2009-10-15
| | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@84158 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix this comment. The loop header is the loop entry point.Dan Gohman2009-10-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@83437 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix CodePlacementOpt::OptimizeIntraLoopEdges so that its return valueBob Wilson2009-05-18
| | | | | | | correctly indicates whether it changed the code. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@72038 91177308-0d34-0410-b5e6-96231b3b80d8
* Run code placement optimization for targets that want it (arm and x86 for now).Evan Cheng2009-05-13
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71726 91177308-0d34-0410-b5e6-96231b3b80d8
* If header of inner loop is aligned, do not align the outer loop header. We ↵Evan Cheng2009-05-12
| | | | | | don't want to add nops in the outer loop for the sake of aligning the inner loop. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71609 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix pr4195: When iterating through predecessor blocks, break out of the loopBob Wilson2009-05-12
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71536 91177308-0d34-0410-b5e6-96231b3b80d8
* Oops. Don't forget to align single bb loops.Evan Cheng2009-05-09
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71363 91177308-0d34-0410-b5e6-96231b3b80d8
* Enable loop bb placement optimization.Evan Cheng2009-05-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71291 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't align loop header unless the loop back edge is below the header.Evan Cheng2009-05-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71242 91177308-0d34-0410-b5e6-96231b3b80d8
* Reverse branch condition only when there is a conditional branch.Evan Cheng2009-05-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71214 91177308-0d34-0410-b5e6-96231b3b80d8
* Add explicit braces to disambiguate nested if/else. Removes a warning.Nick Lewycky2009-05-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71211 91177308-0d34-0410-b5e6-96231b3b80d8
* Optimize code placement in loop to eliminate unconditional branches or move ↵Evan Cheng2009-05-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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] git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71209 91177308-0d34-0410-b5e6-96231b3b80d8
* Code refactoring.Evan Cheng2009-05-07
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71151 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename "loop aligner" pass to "code placement optimization" pass.Evan Cheng2009-05-07
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@71150 91177308-0d34-0410-b5e6-96231b3b80d8