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

Krzysztof Parzyszek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 19 11:30:34 PDT 2017

kparzysz added a comment.

In https://reviews.llvm.org/D35578#814919, @mcrosier wrote:

> It sounds like to me you have some cases when you do want lookup tables and other cases that you don't.  What exactly is the determining factor here?

The determining factor is whether the customers want it or not.  Each case has its own specifics, which we do not want to hardcode into the compiler.  At one point, the customers have reported to us that memory loads coming from switch expansion is an undesirable outcome.  We want to provide them with an option to prevent that from happening.


More information about the cfe-commits mailing list