diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-06-27 18:47:28 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-06-27 18:47:28 +0000 |
commit | df0c705d7d0147e6a3bd4db607182cfc403ffbc6 (patch) | |
tree | 06369b606cccdf597dc2f66a7966614c155f01ea /llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | |
parent | 77f541ddfdd379974f5f37fce8991df07bd722db (diff) | |
download | bcm5719-llvm-df0c705d7d0147e6a3bd4db607182cfc403ffbc6.tar.gz bcm5719-llvm-df0c705d7d0147e6a3bd4db607182cfc403ffbc6.zip |
If a livein is not used in the block. It's live through.
llvm-svn: 37764
Diffstat (limited to 'llvm/lib/CodeGen/LiveIntervalAnalysis.cpp')
-rw-r--r-- | llvm/lib/CodeGen/LiveIntervalAnalysis.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp index ebab85fb480..369493ff94e 100644 --- a/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp +++ b/llvm/lib/CodeGen/LiveIntervalAnalysis.cpp @@ -625,13 +625,15 @@ void LiveIntervals::handleLiveInRegister(MachineBasicBlock *MBB, exit: // Live-in register might not be used at all. if (end == MIIdx) { - DOUT << " dead"; - if (isAlias) + if (isAlias) { + DOUT << " dead"; end = getDefIndex(MIIdx) + 1; + } else { + DOUT << " live through"; + end = baseIndex; + } } - assert(start < end && "did not find end of interval?"); - LiveRange LR(start, end, interval.getNextValue(~0U, 0)); DOUT << " +" << LR << '\n'; interval.addRange(LR); @@ -662,7 +664,8 @@ void LiveIntervals::computeIntervals() { // Multiple live-ins can alias the same register. for (const unsigned* AS = mri_->getSubRegisters(*LI); *AS; ++AS) if (!hasInterval(*AS)) - handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), true); + handleLiveInRegister(MBB, MIIndex, getOrCreateInterval(*AS), + true); } } |