On Jan 15, 2008, at 2:02 PM, Owen Anderson wrote: > URL: http://llvm.org/viewvc/llvm-project?rev=46016&view=rev > Log: > Remove DefInst from LiveVariables::VarInfo. Use the facilities on > MachineRegisterInfo instead.
Woot, > +void LiveVariables::MarkVirtRegAliveInBlock(unsigned reg, > MachineBasicBlock *MBB, > std::vector<MachineBasicBlock*> > &WorkList) { > unsigned BBNum = MBB->getNumber(); > > + VarInfo& VRInfo = getVarInfo(reg); > + > // Check to see if this basic block is one of the killing blocks. > If so, > // remove it... > for (unsigned i = 0, e = VRInfo.Kills.size(); i != e; ++i) > @@ -129,8 +126,9 @@ > VRInfo.Kills.erase(VRInfo.Kills.begin()+i); // Erase entry > break; > } > + > + MachineRegisterInfo& MRI = MBB->getParent()->getRegInfo(); > + if (MBB == MRI.getVRegDef(reg)->getParent()) return; // > Terminate recursion This is a performance sensitive routine, how about passing the defining MBB down so that you only call getVRegDef once per vreg, instead of once per block is it live across? -Chris _______________________________________________ llvm-commits mailing list llvm-commits@cs.uiuc.edu http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits