aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorDavid Greene <greened@obbligato.org>2008-05-22 21:16:33 +0000
committerDavid Greene <greened@obbligato.org>2008-05-22 21:16:33 +0000
commit6abf37c8aa70df316db6aa7859a98ae413517f73 (patch)
tree8bdd746a452085dfc3ac711a41696082865c7d2b /lib
parent022e2b3a580e725e7f0a2a60b08ed89ecf5eed80 (diff)
downloadexternal_llvm-6abf37c8aa70df316db6aa7859a98ae413517f73.zip
external_llvm-6abf37c8aa70df316db6aa7859a98ae413517f73.tar.gz
external_llvm-6abf37c8aa70df316db6aa7859a98ae413517f73.tar.bz2
When rewriting defs and uses after spilling, don't set the weight of a
live interval to infinity if the instruction being rewritten is an original remat def instruction. We were only checking against the clone of the remat def which doesn't actually appear in the IR at all. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@51440 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r--lib/CodeGen/LiveIntervalAnalysis.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/CodeGen/LiveIntervalAnalysis.cpp b/lib/CodeGen/LiveIntervalAnalysis.cpp
index 2558b09..4997302 100644
--- a/lib/CodeGen/LiveIntervalAnalysis.cpp
+++ b/lib/CodeGen/LiveIntervalAnalysis.cpp
@@ -1150,7 +1150,9 @@ rewriteInstructionsForSpills(const LiveInterval &li, bool TrySplit,
}
MachineBasicBlock *MBB = MI->getParent();
- if (ImpUse && MI != ReMatDefMI) {
+ // ReMatDefMI is a clone and not in the IR at all, so check
+ // RefMatOrigDefMI too.
+ if (ImpUse && MI != ReMatDefMI && MI != ReMatOrigDefMI) {
// Re-matting an instruction with virtual register use. Update the
// register interval's spill weight to HUGE_VALF to prevent it from
// being spilled.