[PATCH] D70327: [ThinLTO] Promotion handling cleanup (NFC)

Eugene Leviant via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 18 00:10:19 PST 2019


evgeny777 added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/FunctionImportUtils.cpp:272
     auto Name = GV.getName().str();
-    // Once we change the name or linkage it is difficult to determine
-    // again whether we should promote since shouldPromoteLocalToGlobal needs
-    // to locate the summary (based on GUID from name and linkage). Therefore,
-    // use DoPromote result saved above.
-    GV.setName(getName(&GV, DoPromote));
-    GV.setLinkage(getLinkage(&GV, DoPromote));
-    if (!GV.hasLocalLinkage())
-      GV.setVisibility(GlobalValue::HiddenVisibility);
+    GV.setName(getName(&GV, /* DoPromote */ true));
+    GV.setLinkage(getLinkage(&GV, /* DoPromote */ true));
----------------
Can getName() be now called with `false` as second argument? If not may be simplify it as well?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D70327/new/

https://reviews.llvm.org/D70327





More information about the llvm-commits mailing list