[LLVMdev] difference in function prologue generated with clang and gcc
anton at korobeynikov.info
Thu Feb 16 05:22:12 PST 2012
> 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
More information about the llvm-dev