summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/CodePlacementOpt.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove the old CodePlacementOpt pass.Benjamin Kramer2013-03-291-423/+0
| | | | | | It was superseded by MachineBlockPlacement and disabled by default since LLVM 3.1. llvm-svn: 178349
* Remove the Function::getFnAttributes method in favor of using the AttributeSetBill Wendling2012-12-301-1/+2
| | | | | | | | | directly. This is in preparation for removing the use of the 'Attribute' class as a collection of attributes. That will shift to the AttributeSet class instead. llvm-svn: 171253
* Rename the 'Attributes' class to 'Attribute'. It's going to represent a ↵Bill Wendling2012-12-191-1/+1
| | | | | | single attribute in the future. llvm-svn: 170502
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-5/+5
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Create enums for the different attributes.Bill Wendling2012-10-091-1/+1
| | | | | | | 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. llvm-svn: 165488
* Remove the `hasFnAttr' method from Function.Bill Wendling2012-09-261-1/+1
| | | | | | | The hasFnAttr method has been replaced by querying the Attributes explicitly. No intended functionality change. llvm-svn: 164725
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* Codegen pass definition cleanup. No functionality.Andrew Trick2012-02-081-6/+3
| | | | | | | | | | | | | 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). llvm-svn: 150100
* Fix a ton of comment typos found by codespell. Patch byChris Lattner2011-04-151-1/+1
| | | | | | Luis Felipe Strano Moraes! llvm-svn: 129558
* Fix some typos.Cameron Zwarich2011-03-021-3/+3
| | | | llvm-svn: 126829
* Reapply r110396, with fixes to appease the Linux buildbot gods.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110460
* Revert r110396 to fix buildbots.Owen Anderson2010-08-061-1/+1
| | | | llvm-svn: 110410
* Don't use PassInfo* as a type identifier for passes. Instead, use the ↵Owen Anderson2010-08-051-1/+1
| | | | | | | | address of the static ID member as the sole unique type identifier. Clean up APIs related to this change. llvm-svn: 110396
* 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