[LLVMdev] difference in function prologue generated with clang and gcc

anonymous
Thu, 16 Feb 2012 18:39:57 -0000

Hello Anton,
Thanks for the reply. I have not specified optimization level explicitly
during compilation. For GCC default is O0 ie., no optimization. Do you mean
that clang uses other optimization level other than O0 ?
Could you please clarify ?

On Thu, Feb 16, 2012 at 6:52 PM, Anton Korobeynikov <anton at
korobeynikov.info
> wrote:

> Hello
>
> > The prologue length in .debug_line is 157 for clang generated one,
> whereas
> > it is 34 for gcc generated one. I am curious about the results of
making
> > prologue generated by clang look similar with one generated by gcc.
> > Could anyone let me know why this difference exists and if it is for
good
> > /better purposes than for gcc. ?
> 1. This is not function prologue length. It's the header (aka
> 'prologue') length of .debug_line section
> 2. The length of function prologue is 3 instructions in case of clang
> (12 bytes) and 2 instruction (8 bytes) in case of gcc
> 3. Comparison of code size of unoptimized code does not make any sense.
>
> Hope this makes the stuff clear.
>
> --
> With best regards, Anton Korobeynikov
> Faculty of Mathematics and Mechanics, Saint Petersburg State University
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20120217/ac6e3b63/attachment.html>