///
BitVector AliveBlocks;
- /// UsedBlocks - Set of blocks in which this value is actually used. This
- /// is a bit set which uses the basic block number as an index.
- BitVector UsedBlocks;
-
/// NumUses - Number of uses of this register across the entire function.
///
unsigned NumUses;
cerr << " Alive in blocks: ";
for (int i = AliveBlocks.find_first(); i != -1; i = AliveBlocks.find_next(i))
cerr << i << ", ";
- cerr << " Used in blocks: ";
- for (int i = UsedBlocks.find_first(); i != -1; i = UsedBlocks.find_next(i))
- cerr << i << ", ";
cerr << "\n Killed by:";
if (Kills.empty())
cerr << " No instructions.\n";
}
VarInfo &VI = VirtRegInfo[RegIdx];
VI.AliveBlocks.resize(MF->getNumBlockIDs());
- VI.UsedBlocks.resize(MF->getNumBlockIDs());
return VI;
}
unsigned BBNum = MBB->getNumber();
VarInfo& VRInfo = getVarInfo(reg);
- VRInfo.UsedBlocks[BBNum] = true;
VRInfo.NumUses++;
// Check to see if this basic block is already a kill block.
// each for each incoming block), the "def" block and instruction fields
// for the VarInfo is not filled in.
LV->addVirtualRegisterKilled(IncomingReg, PHICopy);
-
- LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true;
}
// Since we are going to be deleting the PHI node, if it is the last use of
// variables information so that it knows the copy source 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 block.
// Update live variables for regB.
if (LV) {
- LiveVariables::VarInfo& varInfoB = LV->getVarInfo(regB);
-
- // regB is used in this BB.
- varInfoB.UsedBlocks[mbbi->getNumber()] = true;
-
if (LV->removeVirtualRegisterKilled(regB, mi))
LV->addVirtualRegisterKilled(regB, prevMI);