[LLVMdev] A question about instruction operands.

Evan Cheng evan.cheng at apple.com
Wed Sep 24 10:26:18 PDT 2008


On Sep 23, 2008, at 9:05 AM, Sanjiv.Gupta at microchip.com wrote:

>>>>>
>>>> It's enclosed inside :
>>>>
>>>> let isTwoAddress = 1 in {
>>>> ...
>>>> }
>>>>
>>>> (you'll need to scroll up a fair amount to find this).
>>>>
>>>>
>>> That means, it gets converted to
>>> dst = src;
>>> dst = dst + 1;
>>>
>>> Right ?
>>>
>>> - Sanjiv
>>>
>> Yes, I believe the two address instruction pass performs exactly this
>> transformation.
>>
> Thanks.
> How do I communicate if my CopyRegToReg instruction clobbers a  
> register
> of another register class? Is it through let Defs = [REG]  { ... }  
> while
> defining the instr pattern?

That won't work. You don't know what physical registers are clobbered  
until you know the register assignments, right? One possibility is to  
add implicit defs when you create these instructions.

Evan

>
>
> - Sanjiv
>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev




More information about the llvm-dev mailing list