[PATCH] D35578: Add -fswitch-tables and -fno-switch-tables flags

Hans Wennborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 09:41:27 PDT 2017


hans added a comment.

In https://reviews.llvm.org/D35578#814590, @sgundapa wrote:

> I will try to address the concerns here:
>
> > What exactly is the motivation? I'm trying to narrow down the justification for adding yet more flags.
>
> (I just typed this message in https://reviews.llvm.org/D35579)
>  For backends with "tightly coupled memory", in scenarios where the data is far away from text pays a good amount of penalty in terms of latency.
>  Hexagon is one such backend. The tables (both lookup and jump) which are being generated are treated as globals with internal linkage and by default
>  will be placed in read only data.


Wouldn't the fix be to make the backend deal with this, then? Either by putting the table with the function text, or or opting out of lookup tables? It seems that might be a better experience for the user.


https://reviews.llvm.org/D35578





More information about the cfe-commits mailing list