[LLVMdev] mov instruction in LLVM IR

aparna kotha kotha.aparna at gmail.com
Thu May 28 16:49:37 PDT 2009


you can use an add with zero, if you dont think you are adding redundancy.






On Thu, May 28, 2009 at 7:35 PM, Zoltan Varga <vargaz at gmail.com> wrote:

> Hi,
>
>   A way to handle moves is to have an array mapping virtual regs to the
> llvm instructions
> which compute them. Then a
> dr <- sr
> move can be handled by doing
> reg_to_inst [dr] = reg_to_inst [sr].
>
> And whenever sr is used as an input to an operation, use reg_to_inst [sr]
> instead.
>
>                        Zoltan
>
>
> On Fri, May 29, 2009 at 1:23 AM, Vinod Grover <vgrover528 at gmail.com>wrote:
>
>> The input language is at assembly level, and the location akin to a %temp
>> ( a virtual register if you will) and contains moves from one virtual to
>> another. Though these are not like memory but I could represent them as
>> local variables and do loads and stores; so I dont know how to represent it
>> in C except as local variables.
>>
>> On Thu, May 28, 2009 at 4:06 PM, Mike Stump <mrs at apple.com> wrote:
>>
>>> On May 28, 2009, at 3:46 PM, Vinod Grover wrote:
>>> > We are working on a new front-end for LLVM IR for a low level
>>> > language; The input has mov from one scalar to another and we would
>>> > like to represent these in LLVM IR. being new to LLVM I am not sure
>>> > if there is a way to represent this since I couldnt find a mov instr.
>>>
>>> Do you know how to do the action you seek in C?  If yes, just compile
>>> with clang or llvm-gcc at -O4 and then read the output directly for
>>> the operations to use.
>>> _______________________________________________
>>> 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
>>
>>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20090528/534219c6/attachment.html>


More information about the llvm-dev mailing list