summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/MachineLICM.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Remove includes of Support/Compiler.h that are no longer needed after theNick Lewycky2009-10-251-1/+0
| | | | | | VISIBILITY_HIDDEN removal. llvm-svn: 85043
* Remove VISIBILITY_HIDDEN from class/struct found inside anonymous namespaces.Nick Lewycky2009-10-251-1/+1
| | | | | | | Chris claims we should never have visibility_hidden inside any .cpp file but that's still not true even after this commit. llvm-svn: 85042
* Factor out LiveIntervalAnalysis' code to determine whether an instructionDan Gohman2009-10-091-3/+1
| | | | | | | | | | | | | | is trivially rematerializable and integrate it into TargetInstrInfo::isTriviallyReMaterializable. This way, all places that need to know whether an instruction is rematerializable will get the same answer. This enables the useful parts of the aggressive-remat option by default -- using AliasAnalysis to determine whether a memory location is invariant, and removes the questionable parts -- rematting operations with virtual register inputs that may not be live everywhere. llvm-svn: 83687
* isTriviallyReMaterializable checks theDan Gohman2009-10-091-1/+1
| | | | | | | TargetInstrDesc::isRematerializable flag, so it isn't necessary to do this check in its callers. llvm-svn: 83671
* Give Dan and my recent changes, machine LICM is now code size neutral.Evan Cheng2009-10-091-4/+0
| | | | llvm-svn: 83624
* Fix a logic error that caused non-rematable loop invariants loads to be ↵Evan Cheng2009-10-091-2/+1
| | | | | | licm'ed out of loop. llvm-svn: 83622
* Replace TargetInstrInfo::isInvariantLoad and its target-specificDan Gohman2009-10-071-3/+5
| | | | | | | | | implementations with a new MachineInstr::isInvariantLoad, which uses MachineMemOperands and is target-independent. This brings MachineLICM and other functionality to targets which previously lacked an isInvariantLoad implementation. llvm-svn: 83475
* Don't hoist or sink instructions with physreg uses if the physreg isDan Gohman2009-09-261-3/+12
| | | | | | | allocatable. Even if it doesn't appear to have any defs, it may latter on after register allocation. llvm-svn: 82834
* Unbreak MachineLICM for instructions that reference RIP on x86-64 too.Dan Gohman2009-09-251-2/+21
| | | | llvm-svn: 82825
* Convert DOUT to DEBUG(errs()...).Bill Wendling2009-08-221-9/+8
| | | | llvm-svn: 79754
* Tidy #includes.Dan Gohman2009-08-111-1/+0
| | | | llvm-svn: 78677
* 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
OpenPOWER on IntegriCloud