[llvm] [clang] [PGO][GlobalValue][LTO]In GlobalValues::getGlobalIdentifier, use semicolon as delimiter for local-linkage varibles. (PR #74008)

Ellis Hoag via cfe-commits cfe-commits at lists.llvm.org
Tue Dec 5 13:03:54 PST 2023


================
@@ -300,12 +316,8 @@ getIRPGONameForGlobalObject(const GlobalObject &GO,
                             GlobalValue::LinkageTypes Linkage,
                             StringRef FileName) {
   SmallString<64> Name;
-  if (llvm::GlobalValue::isLocalLinkage(Linkage)) {
-    Name.append(FileName.empty() ? "<unknown>" : FileName);
-    Name.append(";");
-  }
   Mangler().getNameWithPrefix(Name, &GO, /*CannotUsePrivateLabel=*/true);
----------------
ellishg wrote:

I think it makes more sense to use linkage-names for IRPGO, `-order_file`, and ThinLTO. `-order_file` is used in the linker when it only knows linkage-names, so I don't think it makes sense to feed it mangled names.

https://github.com/llvm/llvm-project/pull/74008


More information about the cfe-commits mailing list