[llvm-commits] [llvm] r69382 - /llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
Bob Wilson
bob.wilson at apple.com
Fri Apr 17 15:14:12 PDT 2009
On Apr 17, 2009, at 1:46 PM, Anton Korobeynikov wrote:
> Hi, Bob
>
>> +/// AddLiveIn - This helper function adds the specified physical
>> register to the
>> +/// MachineFunction as a live-in value. It also creates a
>> corresponding virtual
>> +/// register for it.
>> +static unsigned AddLiveIn(MachineFunction &MF, unsigned PReg,
>> + const TargetRegisterClass *RC) {
>> + assert(RC->contains(PReg) && "Not the correct regclass!");
>> + unsigned VReg = MF.getRegInfo().createVirtualRegister(RC);
>> + MF.getRegInfo().addLiveIn(PReg, VReg);
>> + return VReg;
>> +}
> The same function exists in x86 backend. And this sequence of actions
> is pretty typical for ISD::FORMAL_NODE lowering. Maybe it's worth to
> place it somewhere in common place?
Maybe. Can you suggest where it ought to go? It isn't obvious to me.
More information about the llvm-commits
mailing list