[llvm-commits] [patch] Change how we handle mandatory unwind tables

Rafael Avila de Espindola rafael.espindola at gmail.com
Tue May 24 08:17:15 PDT 2011


> I can buy that :)  If you are going to go this route, maybe you should make your
> flag a tri-state, representing whether the user (1) said they wanted unwind
> tables ("uwtables"), or (2) said they definitely did not want unwind tables
> ("nouwtables"), or (3) didn't specify anything one way or the other (no flag).
> For example, functions in a file compiled with "-funwind-tables" would get
> flag uwtables; those compiled with "-fno-unwind-tables" would get nouwtables;
> and the rest wouldn't get any special flag.  The compiler is then free to do
> what it likes for those with neither flag.  For example, if doing codegen at
> link time (LTO; yes I know there isn't a way to specify codegen flags at link
> time yet, but probably there should be) and the -funwind-tables flag was passed
> to the linker then guys with no flags would get unwind tables along with
> functions with the uwtables flag (but not those with the nouwtables flag);
> while conversely if -fno-unwind-tables was specified at link time, then link
> time codegen would only generate unwind tables for those functions with the
> uwtables flag, i.e. those that were originally compiled with -funwind-tables.
> Just a thought.

I like not having "eh" in the flag name. The main reason for having abi 
mandated unwind tables is so the external tools can cause an unwind at 
any time.

Unfortunately, I do think I need the 4 possible values. What should the 
optimizer do to mark a uwtables that it was able to show doesn't throw?

> Ciao, Duncan.

Cheers,
Rafael



More information about the llvm-commits mailing list