summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLICM.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* More migration to raw_ostream, the water has dried up around the iostream hole.Daniel Dunbar2009-07-251-6/+7
| | | | | | | | | | - Some clients which used DOUT have moved to DEBUG. We are deprecating the "magic" DOUT behavior which avoided calling printing functions when the statement was disabled. In addition to being unnecessary magic, it had the downside of leaving code in -Asserts builds, and of hiding potentially unnecessary computations. llvm-svn: 77019
* MachineLICM CSE should match destination register classes; avoid hoisting ↵Evan Cheng2009-02-271-3/+13
| | | | | | implicit_def's. llvm-svn: 65592
* Machine LICM increases register pressure and it almost always increase code ↵Evan Cheng2009-02-051-0/+4
| | | | | | size. For now, disable it for optimizing for size. llvm-svn: 63856
* Teach machine licm to CSE hoisted instructions.Evan Cheng2009-02-051-23/+88
| | | | llvm-svn: 63854
* Don't call isInvariantLoad twice.Evan Cheng2009-02-041-9/+2
| | | | llvm-svn: 63729
* Don't bother hoisting out a "cheap" instruction if all of its uses are PHIs. ↵Evan Cheng2009-02-041-10/+55
| | | | | | LICM "cheap" instructions are not particularly beneficial to start with. This will just end up making the copies harder to coalesce. llvm-svn: 63728
* For now, only hoist re-materilizable instructions. LICM will increase ↵Evan Cheng2009-02-041-2/+11
| | | | | | register pressure. We want to avoid spilling more instructions if it's possible. llvm-svn: 63725
* Simplify the MachineLICM pass by having it only traverse outerDan Gohman2009-01-151-122/+60
| | | | | | | | | loops, hoisting instructions all the way out in one step rather than hoisting them one nest level at a time. Also, make a few other code simplifications. This speeds up MachineLICM by several fold. llvm-svn: 62283
* Tidy up #includes, deleting a bunch of unnecessary #includes.Dan Gohman2009-01-051-1/+0
| | | | llvm-svn: 61715
* Use isTerminator() instead of isBranch()||isReturn() inDan Gohman2008-12-231-1/+1
| | | | | | | | several places. isTerminator() returns true for a superset of cases, and includes things like FP_REG_KILL, which are nither return or branch but aren't safe to move/remat/etc. llvm-svn: 61373
* Give MachineLICM a name, for -time-passes etc.Dan Gohman2008-12-181-0/+2
| | | | llvm-svn: 61184
* Switch the MachineOperand accessors back to the short names likeDan Gohman2008-10-031-1/+1
| | | | | | isReg, etc., from isRegister, etc. llvm-svn: 57006
* Tidy up several unbeseeming casts from pointer to intptr_t.Dan Gohman2008-09-041-1/+1
| | | | llvm-svn: 55779
* Cosmetic changes to Machine LICM. No functionality change.Bill Wendling2008-08-311-31/+36
| | | | llvm-svn: 55578
* Don't hoist instructions that define a physical register.Bill Wendling2008-08-201-1/+8
| | | | llvm-svn: 55074
* Don't hoist instructions that have implicit uses or defines. Before, it wasBill Wendling2008-08-181-0/+5
| | | | | | hoisting out some "test" and "cmp" instructions. This was obvious badness. llvm-svn: 54908
* Prevent option name conflict.Bill Wendling2008-07-071-1/+1
| | | | llvm-svn: 53166
* Clean up the use of static and anonymous namespaces. This turned upDan Gohman2008-05-131-4/+4
| | | | | | | several things that were neither in an anonymous namespace nor static but not intended to be global. llvm-svn: 51017
* Revert the previous commit. Go ahead and hoist rematerializable instructions.Bill Wendling2008-05-121-4/+0
| | | | llvm-svn: 50990
* One real change - don't hoist something that's trivially rematerializable. It'sBill Wendling2008-05-121-18/+19
| | | | | | | | possible for it to produce worse code than before. The rest of this patch is code cleanup. llvm-svn: 50987
* Minor cleanup. No functionality change.Bill Wendling2008-03-101-6/+8
| | | | llvm-svn: 48142
* Rename PrintableName to Name.Bill Wendling2008-02-261-2/+2
| | | | llvm-svn: 47629
* Change "Name" to "AsmName" in the target register info. Gee, a refactoring toolBill Wendling2008-02-261-2/+2
| | | | | | would have been a Godsend here! llvm-svn: 47625
* Rename MRegisterInfo to TargetRegisterInfo.Dan Gohman2008-02-101-6/+6
| | | | llvm-svn: 46930
* Simplify the side effect stuff a bit more and make licm/sinkingChris Lattner2008-01-101-5/+22
| | | | | | | | | | | | | | | | both work right according to the new flags. This removes the TII::isReallySideEffectFree predicate, and adds TII::isInvariantLoad. It removes NeverHasSideEffects+MayHaveSideEffects and adds UnmodeledSideEffects as machine instr flags. Now the clients can decide everything they need. I think isRematerializable can be implemented in terms of the flags we have now, though I will let others tackle that. llvm-svn: 45843
* rename TargetInstrDescriptor -> TargetInstrDesc.Chris Lattner2008-01-071-4/+4
| | | | | | | Make MachineInstr::getDesc return a reference instead of a pointer, since it can never be null. llvm-svn: 45695
* Rename MachineInstr::getInstrDescriptor -> getDesc(), which reflectsChris Lattner2008-01-071-8/+6
| | | | | | | | | | | | | | | that it is cheap and efficient to get. Move a variety of predicates from TargetInstrInfo into TargetInstrDescriptor, which makes it much easier to query a predicate when you don't have TII around. Now you can use MI->getDesc()->isBranch() instead of going through TII, and this is much more efficient anyway. Not all of the predicates have been moved over yet. Update old code that used MI->getInstrDescriptor()->Flags to use the new predicates in many places. llvm-svn: 45674
* Add that this preserves some analyses.Bill Wendling2008-01-041-1/+3
| | | | llvm-svn: 45573
* Move option to enable machine LICM into LLVMTargetMachine.cpp.Bill Wendling2008-01-041-10/+0
| | | | llvm-svn: 45572
* Call the parent's getAnalysisUsage.Bill Wendling2008-01-041-0/+1
| | | | llvm-svn: 45571
* remove dead #includes and reorder the rest.Chris Lattner2008-01-041-10/+6
| | | | llvm-svn: 45569
* Use the correct MachineRegisterInfo object.Bill Wendling2008-01-021-2/+1
| | | | llvm-svn: 45499
* Remove dead code.Bill Wendling2008-01-021-35/+0
| | | | llvm-svn: 45496
* Use the new architecture to get the containing machine basic block for a machineBill Wendling2008-01-021-28/+28
| | | | | | | instruction. Also, use "splice" to move the new instruction instead of remove/insert (where it was leaking memory anyway). llvm-svn: 45492
* Remove attribution from file headers, per discussion on llvmdev.Chris Lattner2007-12-291-2/+2
| | | | llvm-svn: 45418
* Updated comments to reflect what "side effects" means in this situation.Bill Wendling2007-12-201-10/+3
| | | | llvm-svn: 45245
* Add debugging info. Use the newly created "hasUnmodelledSideEffects" method.Bill Wendling2007-12-181-21/+38
| | | | llvm-svn: 45178
* Need to grow the indexed map. Added debug statements.Bill Wendling2007-12-111-21/+27
| | | | llvm-svn: 44892
* Simplify slightly.Bill Wendling2007-12-111-3/+4
| | | | llvm-svn: 44881
* Blark! How in the world did this work without this?!Bill Wendling2007-12-111-4/+9
| | | | llvm-svn: 44874
* - Update the virtual reg to machine instruction map when hoisting.Bill Wendling2007-12-111-2/+12
| | | | | | - Fix subtle bug when creating initially creating this map. llvm-svn: 44873
* Checking for "zero operands" during the "CanHoistInst()" method isn't necessaryBill Wendling2007-12-111-11/+4
| | | | | | | | because those with side effects will be caught by other checks in here. Also, simplify the check for a BB in a sub loop. llvm-svn: 44871
* Reverting 44702. It wasn't correct to rename them.Bill Wendling2007-12-081-13/+13
| | | | llvm-svn: 44727
* Renaming:Bill Wendling2007-12-081-1/+1
| | | | | | | isTriviallyReMaterializable -> hasNoSideEffects isReallyTriviallyReMaterializable -> isTriviallyReMaterializable llvm-svn: 44702
* Incorporated comments from Evan and Chris:Bill Wendling2007-12-081-58/+54
| | | | | | | http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056043.html http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20071203/056048.html llvm-svn: 44696
* Initial commit of the machine code LICM pass. It successfully hoists this:Bill Wendling2007-12-071-0/+336
_foo: li r2, 0 LBB1_1: ; bb li r5, 0 stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr to: _foo: li r2, 0 li r5, 0 LBB1_1: ; bb stw r5, 0(r3) addi r2, r2, 1 addi r3, r3, 4 cmplw cr0, r2, r4 bne cr0, LBB1_1 ; bb LBB1_2: ; return blr ZOMG!! :-) Moar to come... llvm-svn: 44687
OpenPOWER on IntegriCloud