aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/Splitter.cpp
diff options
context:
space:
mode:
authorLang Hames <lhames@gmail.com>2010-09-25 12:04:16 +0000
committerLang Hames <lhames@gmail.com>2010-09-25 12:04:16 +0000
commit564956867e85b45ca72cd1d62d0ac0055175a22e (patch)
treec8718a444f43d129a32618cab50863c6670de13a /llvm/lib/CodeGen/Splitter.cpp
parent8b99b8a782cfa1680673acf3e247c242a714992e (diff)
downloadllvm-564956867e85b45ca72cd1d62d0ac0055175a22e.zip
llvm-564956867e85b45ca72cd1d62d0ac0055175a22e.tar.gz
llvm-564956867e85b45ca72cd1d62d0ac0055175a22e.tar.bz2
Removed VNInfo::isDefAccurate(). Def "accuracy" can be checked by testing whether LiveIntervals::getInstructionFromIndex(def) returns NULL.
llvm-svn: 114791
Diffstat (limited to 'llvm/lib/CodeGen/Splitter.cpp')
-rw-r--r--llvm/lib/CodeGen/Splitter.cpp21
1 files changed, 13 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/Splitter.cpp b/llvm/lib/CodeGen/Splitter.cpp
index 1cb2f62..825782d 100644
--- a/llvm/lib/CodeGen/Splitter.cpp
+++ b/llvm/lib/CodeGen/Splitter.cpp
@@ -140,7 +140,6 @@ namespace llvm {
VNInfo *newVal = getNewVNI(preHeaderRange->valno);
newVal->def = copyDefIdx;
newVal->setCopy(copy);
- newVal->setIsDefAccurate(true);
li.removeRange(copyDefIdx, ls.lis->getMBBEndIdx(preHeader), true);
getNewLI()->addRange(LiveRange(copyDefIdx,
@@ -174,12 +173,13 @@ namespace llvm {
// Blow away output range definition.
outRange->valno->def = ls.lis->getInvalidIndex();
- outRange->valno->setIsDefAccurate(false);
li.removeRange(ls.lis->getMBBStartIdx(outBlock), copyDefIdx);
+ SlotIndex newDefIdx = ls.lis->getMBBStartIdx(outBlock);
+ assert(ls.lis->getInstructionFromIndex(newDefIdx) == 0 &&
+ "PHI def index points at actual instruction.");
VNInfo *newVal =
- getNewLI()->getNextValue(ls.lis->getMBBStartIdx(outBlock),
- 0, false, ls.lis->getVNInfoAllocator());
+ getNewLI()->getNextValue(newDefIdx, 0, ls.lis->getVNInfoAllocator());
getNewLI()->addRange(LiveRange(ls.lis->getMBBStartIdx(outBlock),
copyDefIdx, newVal));
@@ -513,8 +513,10 @@ namespace llvm {
if (!insertRange)
continue;
- VNInfo *newVal = li.getNextValue(lis->getMBBStartIdx(preHeader),
- 0, false, lis->getVNInfoAllocator());
+ SlotIndex newDefIdx = lis->getMBBStartIdx(preHeader);
+ assert(lis->getInstructionFromIndex(newDefIdx) == 0 &&
+ "PHI def index points at actual instruction.");
+ VNInfo *newVal = li.getNextValue(newDefIdx, 0, lis->getVNInfoAllocator());
li.addRange(LiveRange(lis->getMBBStartIdx(preHeader),
lis->getMBBEndIdx(preHeader),
newVal));
@@ -611,8 +613,11 @@ namespace llvm {
lis->getMBBEndIdx(splitBlock), true);
}
} else if (intersects) {
- VNInfo *newVal = li.getNextValue(lis->getMBBStartIdx(splitBlock),
- 0, false, lis->getVNInfoAllocator());
+ SlotIndex newDefIdx = lis->getMBBStartIdx(splitBlock);
+ assert(lis->getInstructionFromIndex(newDefIdx) == 0 &&
+ "PHI def index points at actual instruction.");
+ VNInfo *newVal = li.getNextValue(newDefIdx, 0,
+ lis->getVNInfoAllocator());
li.addRange(LiveRange(lis->getMBBStartIdx(splitBlock),
lis->getMBBEndIdx(splitBlock),
newVal));