[PATCH] Add an option to allow JumpInstrTables to set unnamed_addr and jumptable on all address-taken functions

Tom Roeder tmroeder at google.com
Tue Jun 24 12:00:14 PDT 2014


On Mon, Jun 23, 2014 at 12:18 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> Tom Roeder wrote:
>> I don't see why this should have anything to do with a front end
>> component, though it might make sense eventually to have a high-level
>> flag like that in clang that sets a lower-level flag. Currently, I
>> just pass flags directly to LTO through clang with
>>
>> -Wl,--plugin-opt=-jump-table-type=arity
>
>
> Mostly I want to have a single place to decide whether we're going to do the
> jump table transform or not. The reason it goes in the frontend is because
> it actually changes language semantics, the frontend may want to emit
> different IR, or may want to warn the user that "&func1 == my_funcptr" isn't
> going to work when CFI is on. If you did have it in the frontend, I don't
> see why you would also need a plugin option.

That makes sense; I'll look into it.



More information about the llvm-commits mailing list