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

Teresa Johnson via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 1 12:55:16 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);
----------------
teresajohnson wrote:

Was PGO broken in general before D156569? Or is this specific to `-symbol-ordering-file` and `-order_file`?

Also, it looks like some of the main changes here by the mangler for objective C are to strip the "\01" prefix. Is this different than the support to remove the '\1' mangling escape in getGlobalIdentifier()?

Trying to figure out how we keep these interfaces in sync to avoid more issues with ICP...

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


More information about the llvm-commits mailing list