[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
Evan Cheng
evan.cheng at apple.com
Wed Jun 27 11:47:51 PDT 2007
Changes in directory llvm/lib/CodeGen:
LiveIntervalAnalysis.cpp updated: 1.249 -> 1.250
---
Log message:
If a livein is not used in the block. It's live through.
---
Diffs of the changes: (+8 -5)
LiveIntervalAnalysis.cpp | 13 ++++++++-----
1 files changed, 8 insertions(+), 5 deletions(-)
Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.249 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.250
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.249 Tue Jun 26 20:16:36 2007
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Jun 27 13:47:28 2007
@@ -625,13 +625,15 @@
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 @@
// 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);
}
}
More information about the llvm-commits
mailing list