[llvm-commits] [llvm-gcc-4.2] r49253 - /llvm-gcc-4.2/trunk/gcc/llvm-backend.cpp

Chris Lattner clattner at apple.com
Sun Apr 6 11:01:38 PDT 2008


On Apr 6, 2008, at 1:38 AM, Duncan Sands wrote:

>> Don't remove "unused" EH info when -funwind-tables is on;
>> this is an indication that the unwind info is not for
>> exceptions but for something else, so the compiler
>> shouldn't remove it.

Are you sure?  The man page description is very vague, but it doesn't  
sound like that is the intention:

        -funwind-tables
            Similar to -fexceptions, except that it will just generate  
any needed static data, but will
            not affect the generated code in any other way.  You will  
normally not enable this option;
            instead, a language processor that needs this handling  
would enable it on your behalf.

>
> Out of curiosity, what kind of "something else" might this be?

Some people want "unwind info no matter what".  For example, some  
performance tools want to be able to walk the stack etc with unwind  
info.  I don't think our current nounwind bit is sufficient to model  
this though, and I don't thank that overloading it to do so is a good  
thing.

-funwind-tables shouldn't affect the generated code, and -prune-eh  
should not remove EH info if "funwind-tables" means "unwind info no  
matter what".  However, prune-eh *should* still propagate around the  
nounwind bit and should remove landing pads!

-Chris



More information about the llvm-commits mailing list