llvm.org GIT mirror llvm / f44c728
VarInfo::UsedBlocks is no longer used. Remove. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36250 91177308-0d34-0410-b5e6-96231b3b80d8 Evan Cheng 13 years ago
5 changed file(s) with 2 addition(s) and 21 deletion(s). Raw diff Collapse all Expand all
7777 /// index.
7878 ///
7979 BitVector AliveBlocks;
80
81 /// UsedBlocks - Set of blocks of which this value is actually used. This
82 /// is a bit set which uses the basic block number as an index.
83 BitVector UsedBlocks;
8480
8581 /// NumUses - Number of uses of this register across the entire function.
8682 ///
10571057 for (const unsigned *AS = mri_->getAliasSet(repDstReg); *AS; ++AS)
10581058 getInterval(*AS).MergeInClobberRanges(SrcInt);
10591059 } else {
1060 // Merge UsedBlocks info if the destination is a virtual register.
1060 // Merge use info if the destination is a virtual register.
10611061 LiveVariables::VarInfo& dVI = lv_->getVarInfo(repDstReg);
10621062 LiveVariables::VarInfo& sVI = lv_->getVarInfo(repSrcReg);
1063 dVI.UsedBlocks |= sVI.UsedBlocks;
10641063 dVI.NumUses += sVI.NumUses;
10651064 }
10661065
4747 cerr << " Alive in blocks: ";
4848 for (unsigned i = 0, e = AliveBlocks.size(); i != e; ++i)
4949 if (AliveBlocks[i]) cerr << i << ", ";
50 cerr << " Used in blocks: ";
51 for (unsigned i = 0, e = UsedBlocks.size(); i != e; ++i)
52 if (UsedBlocks[i]) cerr << i << ", ";
5350 cerr << "\n Killed by:";
5451 if (Kills.empty())
5552 cerr << " No instructions.\n";
7269 }
7370 VarInfo &VI = VirtRegInfo[RegIdx];
7471 VI.AliveBlocks.resize(MF->getNumBlockIDs());
75 VI.UsedBlocks.resize(MF->getNumBlockIDs());
7672 return VI;
7773 }
7874
137133 MachineInstr *MI) {
138134 assert(VRInfo.DefInst && "Register use before def!");
139135
140 unsigned BBNum = MBB->getNumber();
141
142 VRInfo.UsedBlocks[BBNum] = true;
143136 VRInfo.NumUses++;
144137
145138 // Check to see if this basic block is already a kill block...
162155 // If this virtual register is already marked as alive in this basic block,
163156 // that means it is alive in at least one of the successor block, it's not
164157 // a kill.
165 if (!VRInfo.AliveBlocks[BBNum])
158 if (!VRInfo.AliveBlocks[MBB->getNumber()])
166159 VRInfo.Kills.push_back(MI);
167160
168161 // Update all dominating blocks to mark them known live.
162162 // Realize that the destination register is defined by the PHI copy now, not
163163 // the PHI itself.
164164 LV->getVarInfo(DestReg).DefInst = PHICopy;
165
166 LV->getVarInfo(IncomingReg).UsedBlocks[MBB.getNumber()] = true;
167165 }
168166
169167 // Adjust the VRegPHIUseCount map to account for the removal of this PHI
214212 // instruction kills the incoming value.
215213 //
216214 LiveVariables::VarInfo &InRegVI = LV->getVarInfo(SrcReg);
217 InRegVI.UsedBlocks[opBlock.getNumber()] = true;
218215
219216 // Loop over all of the successors of the basic block, checking to see
220217 // if the value is either live in the block, or if it is killed in the
196196 LiveVariables::VarInfo& varInfo = LV.getVarInfo(regA);
197197 varInfo.DefInst = prevMi;
198198
199 // update live variables for regB
200 LiveVariables::VarInfo& varInfoB = LV.getVarInfo(regB);
201 // regB is used in this BB.
202 varInfoB.UsedBlocks[mbbi->getNumber()] = true;
203199 if (LV.removeVirtualRegisterKilled(regB, mbbi, mi))
204200 LV.addVirtualRegisterKilled(regB, prevMi);
205201