diff options
author | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-09-15 16:29:49 +0000 |
---|---|---|
committer | Jakob Stoklund Olesen <stoklund@2pi.dk> | 2012-09-15 16:29:49 +0000 |
commit | 9ae03fa69f6bc19acd8043414160320c1da0c3da (patch) | |
tree | 7a6204900d95121aceaef0ff50f998f62b6de443 /include/llvm | |
parent | 85aadc07d5c5688250b1af6d5bcb3e419fdb8862 (diff) | |
download | external_llvm-9ae03fa69f6bc19acd8043414160320c1da0c3da.zip external_llvm-9ae03fa69f6bc19acd8043414160320c1da0c3da.tar.gz external_llvm-9ae03fa69f6bc19acd8043414160320c1da0c3da.tar.bz2 |
Make LiveRangeQuery work for PHIDefs as well.
If a PHI value happens to be live out from the layout predecessor of its
def block, the def slot index will be in the middle of the segment:
%vreg11 = [192r,240B:0)[352r,416B:2)[416B,496r:1) 0@192r 1@480B-phi %2@352r
A LiveRangeQuery for 480 should return NULL from valueIn() since the
PHI value is defined at the block entry, not live in to the block.
No test case, future code depends on this functionality.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@163971 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm')
-rw-r--r-- | include/llvm/CodeGen/LiveInterval.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/llvm/CodeGen/LiveInterval.h b/include/llvm/CodeGen/LiveInterval.h index d7b8f44..3bce496 100644 --- a/include/llvm/CodeGen/LiveInterval.h +++ b/include/llvm/CodeGen/LiveInterval.h @@ -508,6 +508,12 @@ namespace llvm { if (++I == E) return; } + // Special case: A PHIDef value can have its def in the middle of a + // segment if the value happens to be live out of the layout + // predecessor. + // Such a value is not live-in. + if (EarlyVal->def == Idx.getBaseIndex()) + EarlyVal = 0; } // I now points to the segment that may be live-through, or defined by // this instr. Ignore segments starting after the current instr. |