summaryrefslogtreecommitdiff
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-16 02:15:33 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-16 02:15:33 +0000
commit2131eb48875c7059eb04f0a324321e1e15e6597e (patch)
tree423554c263ba3996737533727fa2688d891dace1 /include/llvm/CodeGen
parent644b3840b975cdd7465d16700740dd1dd7034df0 (diff)
downloadllvm-2131eb48875c7059eb04f0a324321e1e15e6597e.tar.gz
llvm-2131eb48875c7059eb04f0a324321e1e15e6597e.tar.bz2
llvm-2131eb48875c7059eb04f0a324321e1e15e6597e.tar.xz
Fix problem when using LiveRangeQuery with block entries.
A value that is live in to a basic block should be returned by valueIn() in LiveRangeQuery(getMBBStartIdx(MBB)), unless it is a PHI-def which should be returned by valueDefined() instead. Current code isn't using this functionality. Future code will. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163990 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/LiveInterval.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h
index 3bce496b2b..b4d0b12523 100644
--- a/include/llvm/CodeGen/LiveInterval.h
+++ b/include/llvm/CodeGen/LiveInterval.h
@@ -499,7 +499,9 @@ namespace llvm {
if (I == E)
return;
// Is this an instruction live-in segment?
- if (SlotIndex::isEarlierInstr(I->start, Idx)) {
+ // If Idx is the start index of a basic block, include live-in segments
+ // that start at Idx.getBaseIndex().
+ if (I->start <= Idx.getBaseIndex()) {
EarlyVal = I->valno;
EndPoint = I->end;
// Move to the potentially live-out segment.