[llvm-commits] [llvm] r46016 - in /llvm/trunk/lib: CodeGen/LiveVariables.cpp CodeGen/PHIElimination.cpp CodeGen/TwoAddressInstructionPass.cpp Target/ARM/ARMInstrInfo.cpp
Chris Lattner
clattner at apple.com
Tue Jan 15 14:27:13 PST 2008
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
More information about the llvm-commits
mailing list