From 9e82064924158efccc186e02b369065519b61f65 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 19 Jun 2007 01:48:05 +0000 Subject: 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 --- llvm/lib/CodeGen/VirtRegMap.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'llvm/lib/CodeGen/VirtRegMap.cpp') 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); -- cgit v1.2.3