[PATCH] D18321: Add support for no-jump-tables flag.
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 22 08:59:19 PDT 2016
hans added inline comments.
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7930
@@ -7929,1 +7929,3 @@
+ if (TM.Options.NoUseJumpTables)
+ return false;
There is already a helper function in this file that decides whether or not to build jump tables: areJTsAllowed(). That's a better place to do this check.
If we really want to disable jump tables, maybe the proper thing to do is to make TLI.isOperationLegalOrCustom(BR_JT) return false. I don't know if that's more or less convenient to do, though.
More information about the llvm-commits