[LLVMdev] OT: intel darwin losing primary target status

Nick Kledzik kledzik at apple.com
Fri Sep 18 14:27:30 PDT 2009

I dug into this.  Based on the .s files in bugzilla, the latest gcc is  
now adding dwarf unwind info to describe the function epilog.  If you  
run dwarfdump --eh-frame on the .o files made with the new compiler,  
you'll see extra dwarf unwind instructions at the end like:

                 DW_CFA_advance_loc4 (64)  #<-- advance to near end of  
                 DW_CFA_restore (rbp)
                 DW_CFA_def_cfa (rsp, 8)

The linker's conversion to compact unwind "runs" the dwarf unwind info  
for a function and then records the state at the end.  Adding unwind  
info for the epilog breaks this.  In the long term, I can add  
heuristics to the linker to detect that what looks like unwind info  
for the epilog and stop processing the dwarf instructions.

The short term fix for gcc is to *not* add epilog unwind information  
for Darwin.

Epilog unwind information is never needed for exception processing.   
Its only use is for debugging or sampling when you want to  
asynchronously make a stack back trace.


On Sep 18, 2009, at 11:40 AM, Jack Howarth wrote:
> I am not sure if some of these problems were latent and only
> exposed by the change, but the mass regressions in the g++
> and libjava testsuites were triggered by the commit...
> Author: rth
> Date: Sat May 30 00:33:46 2009
> New Revision: 147995
> URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=147995

More information about the llvm-dev mailing list