Where should PROLOGUE_END be set

Hello all,

It seems that different LLVM backends (ARM, MIPS, X86) can output a different line number for PROLOGUE_END in the DWARF line table.

Say I have a function as follows:

1. int my_function( int arg1 )
2. {
3. some_code();
4. ....

At -O0 I am seeing the PROLOGUE_END set on the function definition (1.,
ARM) and on the first line of code (3., X86, MIPS)
At -03 the ARM backend uses line 3 as its PROLOGUE_END.

Is there a 'correct' place for this to be set, or is expected that this can be different?
If it is somehow language defined then I am most interested in an answer related to C99.


It is just defined to be where all of the prologue instructions are done setting up the stack frame for the current function. There is no right answer in terms of source lines, the compiler can say anything it wants to.


Ok that clears things up for me.
Thanks Greg.