llvm.org GIT mirror llvm / 4e27d3a
Fix a problem Duraid noticed, where we weren't removing values from the kills list when doing two-address and phi node lowering during register allocation. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@23043 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 15 years ago
1 changed file(s) with 20 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
212212 /// removeVirtualRegistersKilled - Remove all killed info for the specified
213213 /// instruction.
214214 void removeVirtualRegistersKilled(MachineInstr *MI) {
215 RegistersKilled.erase(MI);
215 std::map >::iterator I =
216 RegistersKilled.find(MI);
217 if (I != RegistersKilled.end()) {
218 std::vector &Regs = I->second;
219 for (unsigned i = 0, e = Regs.size(); i != e; ++i) {
220 bool removed = getVarInfo(Regs[i]).removeKill(MI);
221 assert(removed && "kill not in register's VarInfo?");
222 }
223 RegistersKilled.erase(I);
224 }
216225 }
217226
218227 /// addVirtualRegisterDead - Add information about the fact that the specified
255264 /// removeVirtualRegistersDead - Remove all of the specified dead
256265 /// registers from the live variable information.
257266 void removeVirtualRegistersDead(MachineInstr *MI) {
258 RegistersDead.erase(MI);
267 std::map >::iterator I =
268 RegistersDead.find(MI);
269 if (I != RegistersDead.end()) {
270 std::vector &Regs = I->second;
271 for (unsigned i = 0, e = Regs.size(); i != e; ++i) {
272 bool removed = getVarInfo(Regs[i]).removeKill(MI);
273 assert(removed && "kill not in register's VarInfo?");
274 }
275 RegistersDead.erase(I);
276 }
259277 }
260278
261279 virtual void getAnalysisUsage(AnalysisUsage &AU) const {