summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2013-07-05 23:48:07 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2013-07-05 23:48:07 +0000
commite6abacfb8bf3e436f9ff296a09656fff813db934 (patch)
treee63b2cf09a851d7b3ee2324cbe4f00645c25de63 /llvm
parente4055692f4b12ff914f304d6819f469a02f45c5c (diff)
downloadbcm5719-llvm-e6abacfb8bf3e436f9ff296a09656fff813db934.tar.gz
bcm5719-llvm-e6abacfb8bf3e436f9ff296a09656fff813db934.zip
Use modern API to avoid exposing LiveInterval internals.
No functional change intended. llvm-svn: 185733
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/CodeGen/RegisterCoalescer.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/RegisterCoalescer.cpp b/llvm/lib/CodeGen/RegisterCoalescer.cpp
index 70a2462880e..f99f1a3c2f8 100644
--- a/llvm/lib/CodeGen/RegisterCoalescer.cpp
+++ b/llvm/lib/CodeGen/RegisterCoalescer.cpp
@@ -743,16 +743,14 @@ bool RegisterCoalescer::reMaterializeTrivialDef(CoalescerPair &CP,
return false;
LiveInterval &SrcInt = LIS->getInterval(SrcReg);
- SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI).getRegSlot(true);
- LiveInterval::iterator SrcLR = SrcInt.FindLiveRangeContaining(CopyIdx);
- assert(SrcLR != SrcInt.end() && "Live range not found!");
- VNInfo *ValNo = SrcLR->valno;
+ SlotIndex CopyIdx = LIS->getInstructionIndex(CopyMI);
+ VNInfo *ValNo = LiveRangeQuery(SrcInt, CopyIdx).valueIn();
+ assert(ValNo && "CopyMI input register not live");
if (ValNo->isPHIDef() || ValNo->isUnused())
return false;
MachineInstr *DefMI = LIS->getInstructionFromIndex(ValNo->def);
if (!DefMI)
return false;
- assert(DefMI && "Defining instruction disappeared");
if (DefMI->isCopyLike()) {
IsDefCopy = true;
return false;
OpenPOWER on IntegriCloud