diff options
author | Bill Wendling <isanbard@gmail.com> | 2007-12-20 01:08:10 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2007-12-20 01:08:10 +0000 |
commit | 65c001e6bce6efba1170a122d457789c1f1e2037 (patch) | |
tree | ac14e02b778538f349dfa0cd347863697e90b14d /llvm/lib/CodeGen/MachineLICM.cpp | |
parent | 134cbefba2c4539ad9487dc3c25f82fffbdee6f9 (diff) | |
download | bcm5719-llvm-65c001e6bce6efba1170a122d457789c1f1e2037.tar.gz bcm5719-llvm-65c001e6bce6efba1170a122d457789c1f1e2037.zip |
Updated comments to reflect what "side effects" means in this situation.
llvm-svn: 45245
Diffstat (limited to 'llvm/lib/CodeGen/MachineLICM.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineLICM.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/llvm/lib/CodeGen/MachineLICM.cpp b/llvm/lib/CodeGen/MachineLICM.cpp index 200ca0bfbce..f0387d0c048 100644 --- a/llvm/lib/CodeGen/MachineLICM.cpp +++ b/llvm/lib/CodeGen/MachineLICM.cpp @@ -249,8 +249,8 @@ void MachineLICM::HoistRegion(MachineDomTreeNode *N) { /// IsLoopInvariantInst - Returns true if the instruction is loop /// invariant. I.e., all virtual register operands are defined outside of the -/// loop, physical registers aren't accessed (explicitly or implicitly), and the -/// instruction is hoistable. +/// loop, physical registers aren't accessed explicitly, and there are no side +/// effects that aren't captured by the operands or other flags. /// bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) { DEBUG({ @@ -281,13 +281,6 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) { DOUT << " * Instruction has side effects.\n"; }); -#if 0 - // FIXME: Don't hoist if this instruction implicitly reads physical registers. - if (I.getInstrDescriptor()->ImplicitUses || - I.getInstrDescriptor()->ImplicitDefs) - return false; -#endif - // The instruction is loop invariant if all of its operands are loop-invariant for (unsigned i = 0, e = I.getNumOperands(); i != e; ++i) { const MachineOperand &MO = I.getOperand(i); @@ -309,7 +302,7 @@ bool MachineLICM::IsLoopInvariantInst(MachineInstr &I) { return false; } - // Don't hoist something that has side effects. + // Don't hoist something that has unmodelled side effects. if (TII->hasUnmodelledSideEffects(&I)) return false; // If we got this far, the instruction is loop invariant! |