[PATCH] D18321: Add support for no-jump-tables
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 29 08:48:09 PDT 2016
hans added inline comments.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7961
@@ +7960,3 @@
+ const SwitchInst *SI) {
+ // return false if function containing SI has NoUseJumpTable Attribute set
+ const Function *fn = SI->getParent()->getParent();
----------------
I don't think the comment adds value here; it's very clear that this is what the code below does.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7962
@@ +7961,3 @@
+ // return false if function containing SI has NoUseJumpTable Attribute set
+ const Function *fn = SI->getParent()->getParent();
+ if (fn->hasFnAttribute("no-jump-tables") &&
----------------
The variable should be named Fn.
================
Comment at: lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp:7964
@@ +7963,3 @@
+ if (fn->hasFnAttribute("no-jump-tables") &&
+ fn->getFnAttribute("no-jump-tables").getValueAsString() == "true")
+ return false;
----------------
Would just
if (Fn->getFnAttribute("no-jump-tables").getValueAsString() == "true")
work?
http://reviews.llvm.org/D18321
More information about the llvm-commits
mailing list