[PATCH] D35579: [SimplifyCFG] Generate lookup tables based on a function attribute

Hans Wennborg via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 18:30:33 PDT 2017


hans added a comment.

"Generate lookup tables based on a function attribute" is not very descriptive. How about "Make the no-jump-tables attribute also disable switch lookup tables"?

Also it makes me sad that the attribute isn't documented anywhere. Would you like to look into that, possible as a follow-up patch?



================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:5155
+  Function *Fn = SI->getParent()->getParent();
+  StringRef FuncName = Fn->getName();
+  // Only build lookup table when we have a target that supports it or the
----------------
There doesn't seem to be any need to move FuncName up here anymore, since it's not used until further down.


https://reviews.llvm.org/D35579





More information about the llvm-commits mailing list