diff options
author | Dan Gohman <gohman@apple.com> | 2009-10-07 17:38:06 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-10-07 17:38:06 +0000 |
commit | be8137b0b461d5a4bc8c94441d7360e23cc526a7 (patch) | |
tree | 99934be77d04a1d8c82af6ed2db6aef4697f9c65 /llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | |
parent | db9493ce6878f65d7abd4d2bf07b04f104bf3732 (diff) | |
download | bcm5719-llvm-be8137b0b461d5a4bc8c94441d7360e23cc526a7.tar.gz bcm5719-llvm-be8137b0b461d5a4bc8c94441d7360e23cc526a7.zip |
Replace TargetInstrInfo::isInvariantLoad and its target-specific
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
Diffstat (limited to 'llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp')
-rw-r--r-- | llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp index b7dfab5ea33..236711cc0bc 100644 --- a/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp +++ b/llvm/lib/Target/SystemZ/SystemZInstrInfo.cpp @@ -266,30 +266,6 @@ unsigned SystemZInstrInfo::isStoreToStackSlot(const MachineInstr *MI, return 0; } -bool SystemZInstrInfo::isInvariantLoad(const MachineInstr *MI) const { - for (unsigned i = 0, e = MI->getNumOperands(); i != e; ++i) { - const MachineOperand &MO = MI->getOperand(i); - // Loads from constant pools are trivially invariant. - if (MO.isCPI()) - return true; - - if (MO.isGlobal()) - return isGVStub(MO.getGlobal(), TM); - - // If this is a load from an invariant stack slot, the load is a constant. - if (MO.isFI()) { - const MachineFrameInfo &MFI = - *MI->getParent()->getParent()->getFrameInfo(); - int Idx = MO.getIndex(); - return MFI.isFixedObjectIndex(Idx) && MFI.isImmutableObjectIndex(Idx); - } - } - - // All other instances of these instructions are presumed to have other - // issues. - return false; -} - bool SystemZInstrInfo::spillCalleeSavedRegisters(MachineBasicBlock &MBB, MachineBasicBlock::iterator MI, |