summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-10-07 17:38:06 +0000
committerDan Gohman <gohman@apple.com>2009-10-07 17:38:06 +0000
commitbe8137b0b461d5a4bc8c94441d7360e23cc526a7 (patch)
tree99934be77d04a1d8c82af6ed2db6aef4697f9c65 /llvm/lib/Target/XCore/XCoreInstrInfo.cpp
parentdb9493ce6878f65d7abd4d2bf07b04f104bf3732 (diff)
downloadbcm5719-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/XCore/XCoreInstrInfo.cpp')
-rw-r--r--llvm/lib/Target/XCore/XCoreInstrInfo.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/llvm/lib/Target/XCore/XCoreInstrInfo.cpp b/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
index 9461e20b3a3..e616fe68e23 100644
--- a/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
+++ b/llvm/lib/Target/XCore/XCoreInstrInfo.cpp
@@ -116,30 +116,6 @@ XCoreInstrInfo::isStoreToStackSlot(const MachineInstr *MI,
return 0;
}
-/// isInvariantLoad - Return true if the specified instruction (which is marked
-/// mayLoad) is loading from a location whose value is invariant across the
-/// function. For example, loading a value from the constant pool or from
-/// from the argument area of a function if it does not change. This should
-/// only return true of *all* loads the instruction does are invariant (if it
-/// does multiple loads).
-bool
-XCoreInstrInfo::isInvariantLoad(const MachineInstr *MI) const {
- // Loads from constants pools and loads from invariant argument slots are
- // invariant
- int Opcode = MI->getOpcode();
- if (Opcode == XCore::LDWCP_ru6 || Opcode == XCore::LDWCP_lru6) {
- return MI->getOperand(1).isCPI();
- }
- int FrameIndex;
- if (isLoadFromStackSlot(MI, FrameIndex)) {
- const MachineFrameInfo &MFI =
- *MI->getParent()->getParent()->getFrameInfo();
- return MFI.isFixedObjectIndex(FrameIndex) &&
- MFI.isImmutableObjectIndex(FrameIndex);
- }
- return false;
-}
-
//===----------------------------------------------------------------------===//
// Branch Analysis
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud