LLVM Assembly Language Question

Hi, are the assembly instructions generated by LLVM for each function (and
not just for each BasicBlock) unique? Thanks.

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.

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?

Thanks

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.

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.

  Perhaps he want to ask if those duplicated instructions will be optimized
out by LLVM or not.

Regards,
chenwj