diff options
author | Dan Gohman <gohman@apple.com> | 2007-06-19 01:48:05 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2007-06-19 01:48:05 +0000 |
commit | 82a87a01723c095176c6940bcc63d3a7c8007b4b (patch) | |
tree | cb6bdf78002b48d594f2803783ba8c3d361d8a01 /lib/CodeGen/VirtRegMap.cpp | |
parent | eaa91b0a1fc68984aae51f3c4b0cf29b38f89dac (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@37644 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegMap.cpp')
-rw-r--r-- | lib/CodeGen/VirtRegMap.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/CodeGen/VirtRegMap.cpp b/lib/CodeGen/VirtRegMap.cpp index 95453b0e3d..1f9c1649d4 100644 --- a/lib/CodeGen/VirtRegMap.cpp +++ b/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); |