summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-06 18:15:15 +0000
committerJakob Stoklund Olesen <stoklund@2pi.dk>2012-09-06 18:15:15 +0000
commit4aed470376b6e7448f830838b9e58fe8d91c2af2 (patch)
tree74cd6b9f7dddd5e59a21fea65de958fd438d3de9
parent09338a250a7d5f3c7afeeceed934dc48a1678fc3 (diff)
downloadbcm5719-llvm-4aed470376b6e7448f830838b9e58fe8d91c2af2.tar.gz
bcm5719-llvm-4aed470376b6e7448f830838b9e58fe8d91c2af2.zip
Clear kill flags while computing live ranges.
Kill flags are difficult to maintain, and liveness queries are better handled by live intervals. Kill flags are reinserted after register allocation by addKillFlags(). llvm-svn: 163334
-rw-r--r--llvm/lib/CodeGen/LiveRangeCalc.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/LiveRangeCalc.cpp b/llvm/lib/CodeGen/LiveRangeCalc.cpp
index d828f25932e..c3ff4f1b6d2 100644
--- a/llvm/lib/CodeGen/LiveRangeCalc.cpp
+++ b/llvm/lib/CodeGen/LiveRangeCalc.cpp
@@ -65,7 +65,11 @@ void LiveRangeCalc::extendToUses(LiveInterval *LI, unsigned Reg) {
// Visit all operands that read Reg. This may include partial defs.
for (MachineRegisterInfo::reg_nodbg_iterator I = MRI->reg_nodbg_begin(Reg),
E = MRI->reg_nodbg_end(); I != E; ++I) {
- const MachineOperand &MO = I.getOperand();
+ MachineOperand &MO = I.getOperand();
+ // Clear all kill flags. They will be reinserted after register allocation
+ // by LiveIntervalAnalysis::addKillFlags().
+ if (MO.isUse())
+ MO.setIsKill(false);
if (!MO.readsReg())
continue;
// MI is reading Reg. We may have visited MI before if it happens to be
OpenPOWER on IntegriCloud