[PATCH] D46326: ThinLTO+CFI: short-circuit direct calls to jump table entries

Dmitry Mikulin via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu May 24 14:33:26 PDT 2018


dmikulin marked 4 inline comments as done.
dmikulin added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1469
+      replaceCfiUses(F, FAlias, IsDefinition);
+      if (!F->hasLocalLinkage())
+        F->setVisibility(GlobalVariable::HiddenVisibility);
----------------
vlad.tsyrklevich wrote:
> Why change the visibility to hidden only for !hasLocalLinkage ?
setVisibility() asserts if hasLocalLinkage()


================
Comment at: llvm/lib/Transforms/IPO/LowerTypeTests.cpp:1655
+
+    // Must handle Constants specially, we cannot call replaceUsesOfWith on a
+    // constant because they are uniqued.
----------------
vlad.tsyrklevich wrote:
> Did new changes cause this to be required?
Handling of Constants? No, it's been there before my changes.


https://reviews.llvm.org/D46326





More information about the llvm-commits mailing list