[clang] [llvm] [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
Fri Dec 1 15:26:19 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:
> Was PGO broken in general before D156569? Or is this specific to -symbol-ordering-file and -order_file?
It wasn't broken in general, but it's needed to get `-order_file` working correctly.
> 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()?
I think both remove the `\01` prefix. But the mangler might also prepend `_`/`l_` depending on the linkage, and `getGlobalIdentifier()` does not do this.
https://github.com/llvm/llvm-project/pull/74008
More information about the cfe-commits
mailing list