[llvm-commits] CVS: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp LiveVariables.cpp PHIElimination.cpp TwoAddressInstructionPass.cpp
Evan Cheng
evan.cheng at apple.com
Tue Apr 17 22:05:00 PDT 2007
Changes in directory llvm/lib/CodeGen:
LiveIntervalAnalysis.cpp updated: 1.236 -> 1.237
LiveVariables.cpp updated: 1.72 -> 1.73
PHIElimination.cpp updated: 1.56 -> 1.57
TwoAddressInstructionPass.cpp updated: 1.46 -> 1.47
---
Log message:
VarInfo::UsedBlocks is no longer used. Remove.
---
Diffs of the changes: (+2 -17)
LiveIntervalAnalysis.cpp | 3 +--
LiveVariables.cpp | 9 +--------
PHIElimination.cpp | 3 ---
TwoAddressInstructionPass.cpp | 4 ----
4 files changed, 2 insertions(+), 17 deletions(-)
Index: llvm/lib/CodeGen/LiveIntervalAnalysis.cpp
diff -u llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.236 llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.237
--- llvm/lib/CodeGen/LiveIntervalAnalysis.cpp:1.236 Tue Apr 17 21:30:19 2007
+++ llvm/lib/CodeGen/LiveIntervalAnalysis.cpp Wed Apr 18 00:04:38 2007
@@ -1058,10 +1058,9 @@
for (const unsigned *AS = mri_->getAliasSet(repDstReg); *AS; ++AS)
getInterval(*AS).MergeInClobberRanges(SrcInt);
} else {
- // Merge UsedBlocks info if the destination is a virtual register.
+ // Merge use info if the destination is a virtual register.
LiveVariables::VarInfo& dVI = lv_->getVarInfo(repDstReg);
LiveVariables::VarInfo& sVI = lv_->getVarInfo(repSrcReg);
- dVI.UsedBlocks |= sVI.UsedBlocks;
dVI.NumUses += sVI.NumUses;
}
Index: llvm/lib/CodeGen/LiveVariables.cpp
diff -u llvm/lib/CodeGen/LiveVariables.cpp:1.72 llvm/lib/CodeGen/LiveVariables.cpp:1.73
--- llvm/lib/CodeGen/LiveVariables.cpp:1.72 Tue Apr 17 15:22:11 2007
+++ llvm/lib/CodeGen/LiveVariables.cpp Wed Apr 18 00:04:38 2007
@@ -48,9 +48,6 @@
cerr << " Alive in blocks: ";
for (unsigned i = 0, e = AliveBlocks.size(); i != e; ++i)
if (AliveBlocks[i]) cerr << i << ", ";
- cerr << " Used in blocks: ";
- for (unsigned i = 0, e = UsedBlocks.size(); i != e; ++i)
- if (UsedBlocks[i]) cerr << i << ", ";
cerr << "\n Killed by:";
if (Kills.empty())
cerr << " No instructions.\n";
@@ -73,7 +70,6 @@
}
VarInfo &VI = VirtRegInfo[RegIdx];
VI.AliveBlocks.resize(MF->getNumBlockIDs());
- VI.UsedBlocks.resize(MF->getNumBlockIDs());
return VI;
}
@@ -138,9 +134,6 @@
MachineInstr *MI) {
assert(VRInfo.DefInst && "Register use before def!");
- unsigned BBNum = MBB->getNumber();
-
- VRInfo.UsedBlocks[BBNum] = true;
VRInfo.NumUses++;
// Check to see if this basic block is already a kill block...
@@ -163,7 +156,7 @@
// If this virtual register is already marked as alive in this basic block,
// that means it is alive in at least one of the successor block, it's not
// a kill.
- if (!VRInfo.AliveBlocks[BBNum])
+ if (!VRInfo.AliveBlocks[MBB->getNumber()])
VRInfo.Kills.push_back(MI);
// Update all dominating blocks to mark them known live.
Index: llvm/lib/CodeGen/PHIElimination.cpp
diff -u llvm/lib/CodeGen/PHIElimination.cpp:1.56 llvm/lib/CodeGen/PHIElimination.cpp:1.57
--- llvm/lib/CodeGen/PHIElimination.cpp:1.56 Tue Apr 17 19:36:11 2007
+++ llvm/lib/CodeGen/PHIElimination.cpp Wed Apr 18 00:04:38 2007
@@ -163,8 +163,6 @@
// Realize that the destination register is defined by the PHI copy now, not
// the PHI itself.
LV->getVarInfo(DestReg).DefInst = PHICopy;
-
- LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true;
}
// Adjust the VRegPHIUseCount map to account for the removal of this PHI
@@ -215,7 +213,6 @@
// instruction kills the incoming value.
//
LiveVariables::VarInfo &InRegVI = LV->getVarInfo(SrcReg);
- InRegVI.UsedBlocks[opBlock.getNumber()] = true;
// Loop over all of the successors of the basic block, checking to see
// if the value is either live in the block, or if it is killed in the
Index: llvm/lib/CodeGen/TwoAddressInstructionPass.cpp
diff -u llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.46 llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.47
--- llvm/lib/CodeGen/TwoAddressInstructionPass.cpp:1.46 Sun Mar 18 04:02:31 2007
+++ llvm/lib/CodeGen/TwoAddressInstructionPass.cpp Wed Apr 18 00:04:38 2007
@@ -197,10 +197,6 @@
LiveVariables::VarInfo& varInfo = LV.getVarInfo(regA);
varInfo.DefInst = prevMi;
- // update live variables for regB
- LiveVariables::VarInfo& varInfoB = LV.getVarInfo(regB);
- // regB is used in this BB.
- varInfoB.UsedBlocks[mbbi->getNumber()] = true;
if (LV.removeVirtualRegisterKilled(regB, mbbi, mi))
LV.addVirtualRegisterKilled(regB, prevMi);
More information about the llvm-commits
mailing list