[PATCH] D93656: Moving UniqueInternalLinkageNamesPass to the start of IR pipelines.

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 21 12:28:23 PST 2020


hoy added inline comments.


================
Comment at: llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp:27
+static cl::opt<bool> UniqueDebugAndProfileNames(
+    "unqiue-debug-profile-names", cl::init(false), cl::Hidden,
+    cl::desc("Uniqueify debug and profile symbol Names"));
----------------
tmsriram wrote:
> Can we make it true by default?  Atleast the DW_AT_linkage_name must reflect the new name by default IMO.
Sounds good.


================
Comment at: llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp:51
+          auto Name = MDB.createString(F.getName());
+          SP->replaceRawLinkageName(Name);
+        }
----------------
tmsriram wrote:
> Do we need to check if it had a rawLinkageName before replacing it?  
Good point. `rawLinkageName` is missing for C programs. I think it might still be appropriate to assign a new linkage name in the case so as to differ from the original source function name. What do you think?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D93656



More information about the llvm-commits mailing list