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

Chad Rosier via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 19 06:53:51 PDT 2017


mcrosier added a comment.

In https://reviews.llvm.org/D35578#813629, @Quuxplusone wrote:

> If the goal is fine-grained control over the heuristics for compiling switch statements, perhaps one should enumerate all the possible ways to lower switch statements --- jump-tables, lookup-tables, if-trees, if-chains, (more?) --- and add a separate flag for each of them.


In general, I would argue against such an approach without good justification.  More is not always better as exposing such fine grain control is going to place a maintenance burden on the compiler developers with minimal improvement from the users perspective.


https://reviews.llvm.org/D35578





More information about the llvm-commits mailing list