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

Sumanth Gundapaneni via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 10:09:16 PDT 2017


sgundapa added a comment.

> 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.

That is perfectly reasonable and in fact  i have committed a hexagon change recently to that effect . The llvm flag hexagon-emi-lookup-tables controls the generation of lookup table for hexagon.
The problem is, I don't want the users of the compiler to use a combination of front end and back end flags to get the desired result.
"-fno-jump-tables -mllvm -hexagon-emit-lookup-tables=false". This could be much neater with a "-fno-jump-tables -fno-lookup-tables" or better just "-fno-switch-tables"


https://reviews.llvm.org/D35578





More information about the cfe-commits mailing list