summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/VirtRegMap.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2007-06-19 01:48:05 +0000
committerDan Gohman <gohman@apple.com>2007-06-19 01:48:05 +0000
commit9e82064924158efccc186e02b369065519b61f65 (patch)
tree6b025947f3a58e365b693205ea99df36c8f515d8 /llvm/lib/CodeGen/VirtRegMap.cpp
parenta7ca624028c678eb123a4bfad051f7c40e094ef1 (diff)
downloadbcm5719-llvm-9e82064924158efccc186e02b369065519b61f65.tar.gz
bcm5719-llvm-9e82064924158efccc186e02b369065519b61f65.zip
Replace M_REMATERIALIZIBLE and the newly-added isOtherReMaterializableLoad
with a general target hook to identify rematerializable instructions. Some instructions are only rematerializable with specific operands, such as loads from constant pools, while others are always rematerializable. This hook allows both to be identified as being rematerializable with the same mechanism. llvm-svn: 37644
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp')
-rw-r--r--llvm/lib/CodeGen/VirtRegMap.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/VirtRegMap.cpp b/llvm/lib/CodeGen/VirtRegMap.cpp
index 95453b0e3d5..1f9c1649d44 100644
--- a/llvm/lib/CodeGen/VirtRegMap.cpp
+++ b/llvm/lib/CodeGen/VirtRegMap.cpp
@@ -663,9 +663,8 @@ void LocalSpiller::RewriteMBB(MachineBasicBlock &MBB, VirtRegMap &VRM,
// If this instruction is being rematerialized, just remove it!
int FrameIdx;
- if ((TID->Flags & M_REMATERIALIZIBLE) ||
- TII->isLoadFromStackSlot(&MI, FrameIdx) ||
- TII->isOtherReMaterializableLoad(&MI)) {
+ if (TII->isTriviallyReMaterializable(&MI) ||
+ TII->isLoadFromStackSlot(&MI, FrameIdx)) {
bool Remove = true;
for (unsigned i = 0, e = MI.getNumOperands(); i != e; ++i) {
MachineOperand &MO = MI.getOperand(i);
OpenPOWER on IntegriCloud