[LLVMdev] Mapping bytecode to X86
Chris Lattner
sabre at nondot.org
Mon Jun 26 18:04:05 PDT 2006
On Mon, 26 Jun 2006, Fernando Magno Quintao Pereira wrote:
>>> Thank you Chris. I will try to implement the TwoAddress pass to run on
>>> machine code. Why it has not been originally implemented to run on
>>> machine code?
>>
>> I'm not sure what you mean. It definitely does run on machine code.
>
> I was thinking that it only transformed instructions with virtual
> registers because of this code in the TwoAddressInstructionPass.cpp:
>
> unsigned regA = mi->getOperand(0).getReg();
> unsigned regB = mi->getOperand(1).getReg();
>
> assert(MRegisterInfo::isVirtualRegister(regA) &&
> MRegisterInfo::isVirtualRegister(regB) &&
> "cannot update physical register live information");
>
> By machine code I meant code with virtual registers, instead of machine
> (physical) registers; not the passes on machine functions/machine basic
> blocks.
Right. Two address instructions can only use virtual registers, not
physical registers.
-Chris
--
http://nondot.org/sabre/
http://llvm.org/
More information about the llvm-dev
mailing list