[LLVMdev] LLVM Assembly Language Question

Duncan Sands baldrick at free.fr
Wed Dec 14 08:36:05 PST 2011


On 14/12/11 17:29, Jane Ren wrote:
> No, sorry, I made some typos in my question. I meant to ask
>
> For the instructions generated by LLVM for one particular function, is it
> possible to have duplicated instructions?

I'm not sure what you are asking.  If you look at the assembler for all
but the simplest function you will see the same assembler instructions
occurring several times.  For example "xorl    %esi, %esi" is pretty
popular.

Ciao, Duncan.

>
> Thanks
>
> On Wed, 14 Dec 2011, Duncan Sands wrote:
>
>> Hi Jane,
>>
>>> Hi, are the assembly instructions generated by LLVM for each function (and
>>> not just for each BasicBlock) unique? Thanks.
>>
>> are you asking if LLVM merges identical functions? It does not (it does have
>> an optional IR level pass for doing this though).
>>
>> Ciao, Duncan.
>> _______________________________________________
>> 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