Index: clang/lib/CodeGen/BackendUtil.cpp =================================================================== --- clang/lib/CodeGen/BackendUtil.cpp +++ clang/lib/CodeGen/BackendUtil.cpp @@ -83,7 +83,6 @@ #include "llvm/Transforms/Utils/EntryExitInstrumenter.h" #include "llvm/Transforms/Utils/NameAnonGlobals.h" #include "llvm/Transforms/Utils/SymbolRewriter.h" -#include "llvm/Transforms/Utils/UniqueInternalLinkageNames.h" #include using namespace clang; using namespace llvm; @@ -790,12 +789,6 @@ if (!CodeGenOpts.RewriteMapFiles.empty()) addSymbolRewriterPass(CodeGenOpts, &MPM); - // Add UniqueInternalLinkageNames Pass which renames internal linkage symbols - // with unique names. - if (CodeGenOpts.UniqueInternalLinkageNames) { - MPM.add(createUniqueInternalLinkageNamesPass()); - } - if (Optional Options = getGCOVOptions(CodeGenOpts, LangOpts)) { MPM.add(createGCOVProfilerPass(*Options)); if (CodeGenOpts.getDebugInfo() == codegenoptions::NoDebugInfo) @@ -1148,7 +1141,6 @@ // non-integrated assemblers don't recognize .cgprofile section. PTO.CallGraphProfile = !CodeGenOpts.DisableIntegratedAS; PTO.Coroutines = LangOpts.Coroutines; - PTO.UniqueLinkageNames = CodeGenOpts.UniqueInternalLinkageNames; PassInstrumentationCallbacks PIC; StandardInstrumentations SI(CodeGenOpts.DebugPassManager); Index: clang/lib/CodeGen/CGCall.cpp =================================================================== --- clang/lib/CodeGen/CGCall.cpp +++ clang/lib/CodeGen/CGCall.cpp @@ -2085,6 +2085,16 @@ } } + // Add "sample-profile-suffix-elision-policy" attribute for internal linkage + // functions with -funique-internal-linkage-names. + if (TargetDecl && CodeGenOpts.UniqueInternalLinkageNames) { + if (auto *Fn = dyn_cast(TargetDecl)) { + if (this->getFunctionLinkage(Fn) == llvm::GlobalValue::InternalLinkage) + FuncAttrs.addAttribute("sample-profile-suffix-elision-policy", + "selected"); + } + } + // Collect non-call-site function IR attributes from declaration-specific // information. if (!AttrOnCallSite) { Index: clang/lib/CodeGen/CodeGenModule.h =================================================================== --- clang/lib/CodeGen/CodeGenModule.h +++ clang/lib/CodeGen/CodeGenModule.h @@ -28,6 +28,7 @@ #include "clang/Basic/SanitizerBlacklist.h" #include "clang/Basic/TargetInfo.h" #include "clang/Basic/XRayLists.h" +#include "clang/Lex/PreprocessorOptions.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/SetVector.h" #include "llvm/ADT/SmallPtrSet.h" @@ -72,7 +73,6 @@ class LangOptions; class CodeGenOptions; class HeaderSearchOptions; -class PreprocessorOptions; class DiagnosticsEngine; class AnnotateAttr; class CXXDestructorDecl; @@ -308,6 +308,7 @@ const TargetInfo &Target; std::unique_ptr ABI; llvm::LLVMContext &VMContext; + std::string ModuleNameHash = ""; std::unique_ptr TBAA; @@ -583,6 +584,8 @@ /// Return true iff an Objective-C runtime has been configured. bool hasObjCRuntime() { return !!ObjCRuntime; } + const std::string &getModuleNameHash() const { return ModuleNameHash; } + /// Return a reference to the configured OpenCL runtime. CGOpenCLRuntime &getOpenCLRuntime() { assert(OpenCLRuntime != nullptr); Index: clang/lib/CodeGen/CodeGenModule.cpp =================================================================== --- clang/lib/CodeGen/CodeGenModule.cpp +++ clang/lib/CodeGen/CodeGenModule.cpp @@ -180,6 +180,31 @@ // CoverageMappingModuleGen object. if (CodeGenOpts.CoverageMapping) CoverageMapping.reset(new CoverageMappingModuleGen(*this, *CoverageInfo)); + + // Generate the module name hash here if needed. + if (CodeGenOpts.UniqueInternalLinkageNames && + !getModule().getSourceFileName().empty()) { + std::string Path = getModule().getSourceFileName(); + // Check if a path substitution is needed from the MacroPrefixMap. + for (const auto &Entry : PPO.MacroPrefixMap) + if (Path.rfind(Entry.first, 0) != std::string::npos) { + Path = Entry.second + Path.substr(Entry.first.size()); + break; + } + llvm::MD5 Md5; + Md5.update(Path); + llvm::MD5::MD5Result R; + Md5.final(R); + SmallString<32> Str; + llvm::MD5::stringifyResult(R, Str); + // Convert MD5hash to Decimal. Demangler suffixes can either contain + // numbers or characters but not both. + llvm::APInt IntHash = llvm::APInt(128, Str.str(), 16); + // Prepend "__uniq" before the hash for tools like profilers to understand + // that this symbol is of internal linkage type. + ModuleNameHash = (Twine(".__uniq.") + + Twine(IntHash.toString(10, false))).str(); + } } CodeGenModule::~CodeGenModule() {} @@ -1142,7 +1167,7 @@ } } -static std::string getMangledNameImpl(const CodeGenModule &CGM, GlobalDecl GD, +static std::string getMangledNameImpl(CodeGenModule &CGM, GlobalDecl GD, const NamedDecl *ND, bool OmitMultiVersionMangling = false) { SmallString<256> Buffer; @@ -1183,6 +1208,20 @@ } } + // Check if the module name hash should be appended for internal linkage + // symbols. + const Decl *D = GD.getDecl(); + if (!CGM.getModuleNameHash().empty() && + ((isa(D) && + CGM.getFunctionLinkage(GD) == llvm::GlobalValue::InternalLinkage) || + (isa(D) && CGM.getContext().GetGVALinkageForVariable( + cast(D)) == GVA_Internal))) { + assert(CGM.getCodeGenOpts().UniqueInternalLinkageNames && + "Hash computed when not explicitly requested"); + Out << CGM.getModuleNameHash(); + } + + return std::string(Out.str()); } Index: clang/test/CodeGen/unique-internal-linkage-names.cpp =================================================================== --- clang/test/CodeGen/unique-internal-linkage-names.cpp +++ clang/test/CodeGen/unique-internal-linkage-names.cpp @@ -58,10 +58,10 @@ // UNIQUE: @_ZN12_GLOBAL__N_16anon_mE.__uniq.{{[0-9]+}} = internal global // UNIQUE: define internal i32 @_ZL3foov.__uniq.{{[0-9]+}}() // UNIQUE: define internal i32 @_ZN12_GLOBAL__N_14getMEv.__uniq.{{[0-9]+}} -// UNIQUE: define weak_odr i32 ()* @_ZL4mverv.resolver() +// UNIQUE: define weak_odr i32 ()* @_ZL4mverv.__uniq.{{[0-9]+}}.resolver() // UNIQUE: define internal i32 @_ZL4mverv.__uniq.{{[0-9]+}}() // UNIQUE: define internal i32 @_ZL4mverv.sse4.2.__uniq.{{[0-9]+}} // UNIQUEO1: define internal i32 @_ZL3foov.__uniq.{{[0-9]+}}() -// UNIQUEO1: define weak_odr i32 ()* @_ZL4mverv.resolver() +// UNIQUEO1: define weak_odr i32 ()* @_ZL4mverv.__uniq.{{[0-9]+}}.resolver() // UNIQUEO1: define internal i32 @_ZL4mverv.__uniq.{{[0-9]+}}() // UNIQUEO1: define internal i32 @_ZL4mverv.sse4.2.__uniq.{{[0-9]+}} Index: llvm/include/llvm/InitializePasses.h =================================================================== --- llvm/include/llvm/InitializePasses.h +++ llvm/include/llvm/InitializePasses.h @@ -317,7 +317,6 @@ void initializeMustExecutePrinterPass(PassRegistry&); void initializeMustBeExecutedContextPrinterPass(PassRegistry&); void initializeNameAnonGlobalLegacyPassPass(PassRegistry&); -void initializeUniqueInternalLinkageNamesLegacyPassPass(PassRegistry &); void initializeNaryReassociateLegacyPassPass(PassRegistry&); void initializeNewGVNLegacyPassPass(PassRegistry&); void initializeObjCARCAAWrapperPassPass(PassRegistry&); Index: llvm/include/llvm/Passes/PassBuilder.h =================================================================== --- llvm/include/llvm/Passes/PassBuilder.h +++ llvm/include/llvm/Passes/PassBuilder.h @@ -127,9 +127,6 @@ /// Tuning option to enable/disable function merging. Its default value is /// false. bool MergeFunctions; - - /// Uniquefy function linkage name. Its default value is false. - bool UniqueLinkageNames; }; /// This class provides access to building LLVM's passes. Index: llvm/include/llvm/Transforms/Utils.h =================================================================== --- llvm/include/llvm/Transforms/Utils.h +++ llvm/include/llvm/Transforms/Utils.h @@ -25,12 +25,6 @@ // ModulePass *createMetaRenamerPass(); -//===----------------------------------------------------------------------===// -// createUniqueInternalLinkageNamesPass - Make internal linkage symbol names -// unique. -// -ModulePass *createUniqueInternalLinkageNamesPass(); - //===----------------------------------------------------------------------===// // // LowerInvoke - This pass removes invoke instructions, converting them to call Index: llvm/include/llvm/Transforms/Utils/UniqueInternalLinkageNames.h =================================================================== --- llvm/include/llvm/Transforms/Utils/UniqueInternalLinkageNames.h +++ /dev/null @@ -1,31 +0,0 @@ -//===-- UniqueInternalLinkageNames.h - Uniq. Int. Linkage Names -*- C++ -*-===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file implements unique naming of internal linkage symbols with option -// -funique-internal-linkage-symbols. -// -//===----------------------------------------------------------------------===// - -#ifndef LLVM_TRANSFORMS_UTILS_UNIQUEINTERNALLINKAGENAMES_H -#define LLVM_TRANSFORMS_UTILS_UNIQUEINTERNALLINKAGENAMES_H - -#include "llvm/IR/Module.h" -#include "llvm/IR/PassManager.h" - -namespace llvm { - -/// Simple pass that provides a name to every anonymous globals. -class UniqueInternalLinkageNamesPass - : public PassInfoMixin { -public: - PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM); -}; - -} // end namespace llvm - -#endif // LLVM_TRANSFORMS_UTILS_UNIQUEINTERNALLINKAGENAMES_H Index: llvm/lib/Passes/PassBuilder.cpp =================================================================== --- llvm/lib/Passes/PassBuilder.cpp +++ llvm/lib/Passes/PassBuilder.cpp @@ -231,7 +231,6 @@ #include "llvm/Transforms/Utils/SymbolRewriter.h" #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" #include "llvm/Transforms/Utils/UnifyLoopExits.h" -#include "llvm/Transforms/Utils/UniqueInternalLinkageNames.h" #include "llvm/Transforms/Vectorize/LoadStoreVectorizer.h" #include "llvm/Transforms/Vectorize/LoopVectorize.h" #include "llvm/Transforms/Vectorize/SLPVectorizer.h" @@ -285,7 +284,6 @@ LicmMssaNoAccForPromotionCap = SetLicmMssaNoAccForPromotionCap; CallGraphProfile = true; MergeFunctions = false; - UniqueLinkageNames = false; } extern cl::opt ExtraVectorizerPasses; @@ -996,11 +994,6 @@ ThinOrFullLTOPhase Phase) { ModulePassManager MPM(DebugLogging); - // Add UniqueInternalLinkageNames Pass which renames internal linkage - // symbols with unique names. - if (PTO.UniqueLinkageNames) - MPM.addPass(UniqueInternalLinkageNamesPass()); - // Place pseudo probe instrumentation as the first pass of the pipeline to // minimize the impact of optimization changes. if (PGOOpt && PGOOpt->PseudoProbeForProfiling && @@ -1797,11 +1790,6 @@ ModulePassManager MPM(DebugLogging); - // Add UniqueInternalLinkageNames Pass which renames internal linkage - // symbols with unique names. - if (PTO.UniqueLinkageNames) - MPM.addPass(UniqueInternalLinkageNamesPass()); - if (PGOOpt && (PGOOpt->Action == PGOOptions::IRInstr || PGOOpt->Action == PGOOptions::IRUse)) addPGOInstrPassesForO0( Index: llvm/lib/Passes/PassRegistry.def =================================================================== --- llvm/lib/Passes/PassRegistry.def +++ llvm/lib/Passes/PassRegistry.def @@ -108,7 +108,6 @@ MODULE_PASS("strip-nondebug", StripNonDebugSymbolsPass()) MODULE_PASS("strip-nonlinetable-debuginfo", StripNonLineTableDebugInfoPass()) MODULE_PASS("synthetic-counts-propagation", SyntheticCountsPropagation()) -MODULE_PASS("unique-internal-linkage-names", UniqueInternalLinkageNamesPass()) MODULE_PASS("verify", VerifierPass()) MODULE_PASS("wholeprogramdevirt", WholeProgramDevirtPass()) MODULE_PASS("dfsan", DataFlowSanitizerPass()) Index: llvm/lib/Transforms/Utils/CMakeLists.txt =================================================================== --- llvm/lib/Transforms/Utils/CMakeLists.txt +++ llvm/lib/Transforms/Utils/CMakeLists.txt @@ -66,7 +66,6 @@ SymbolRewriter.cpp UnifyFunctionExitNodes.cpp UnifyLoopExits.cpp - UniqueInternalLinkageNames.cpp Utils.cpp ValueMapper.cpp VNCoercion.cpp Index: llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp =================================================================== --- llvm/lib/Transforms/Utils/UniqueInternalLinkageNames.cpp +++ /dev/null @@ -1,118 +0,0 @@ -//===- UniqueInternalLinkageNames.cpp - Unique Internal Linkage Sym Names -===// -// -// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. -// See https://llvm.org/LICENSE.txt for license information. -// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception -// -//===----------------------------------------------------------------------===// -// -// This file implements unique naming of internal linkage symbols with option -// -funique-internal-linkage-symbols. -// -//===----------------------------------------------------------------------===// - -#include "llvm/Transforms/Utils/UniqueInternalLinkageNames.h" -#include "llvm/ADT/SmallString.h" -#include "llvm/IR/DebugInfoMetadata.h" -#include "llvm/IR/MDBuilder.h" -#include "llvm/IR/Module.h" -#include "llvm/InitializePasses.h" -#include "llvm/Support/CommandLine.h" -#include "llvm/Support/MD5.h" -#include "llvm/Transforms/Utils/ModuleUtils.h" - -using namespace llvm; - -static bool uniqueifyInternalLinkageNames(Module &M) { - llvm::MD5 Md5; - Md5.update(M.getSourceFileName()); - llvm::MD5::MD5Result R; - Md5.final(R); - SmallString<32> Str; - llvm::MD5::stringifyResult(R, Str); - // Convert MD5hash to Decimal. Demangler suffixes can either contain numbers - // or characters but not both. - APInt IntHash = APInt(128, Str.str(), 16); - // Prepend "__uniq" before the hash for tools like profilers to understand that - // this symbol is of internal linkage type. - std::string ModuleNameHash = (Twine(".__uniq.") + Twine(IntHash.toString(10, false))).str(); - bool Changed = false; - MDBuilder MDB(M.getContext()); - - // Append the module hash to all internal linkage functions. - for (auto &F : M) { - if (F.hasInternalLinkage()) { - F.setName(F.getName() + ModuleNameHash); - F.addFnAttr("sample-profile-suffix-elision-policy", "selected"); - // Replace linkage names in the debug metadata. - if (DISubprogram *SP = F.getSubprogram()) { - if (SP->getRawLinkageName()) { - auto *Name = MDB.createString(F.getName()); - SP->replaceRawLinkageName(Name); - if (DISubprogram *SPDecl = SP->getDeclaration()) { - if (SPDecl->getRawLinkageName()) - SPDecl->replaceRawLinkageName(Name); - } - } - } - Changed = true; - } - } - - // Append the module hash to all internal linkage globals. - for (auto &GV : M.globals()) { - if (GV.hasInternalLinkage()) { - GV.setName(GV.getName() + ModuleNameHash); - Changed = true; - } - } - return Changed; -} - -namespace { - -// Legacy pass that provides a name to every anon globals. -class UniqueInternalLinkageNamesLegacyPass : public ModulePass { - -public: - /// Pass identification, replacement for typeid - static char ID; - - /// Specify pass name for debug output - StringRef getPassName() const override { - return "Unique Internal Linkage Names"; - } - - explicit UniqueInternalLinkageNamesLegacyPass() : ModulePass(ID) { - initializeUniqueInternalLinkageNamesLegacyPassPass( - *PassRegistry::getPassRegistry()); - } - - bool runOnModule(Module &M) override { - return uniqueifyInternalLinkageNames(M); - } -}; - -char UniqueInternalLinkageNamesLegacyPass::ID = 0; -} // anonymous namespace - -PreservedAnalyses -UniqueInternalLinkageNamesPass::run(Module &M, ModuleAnalysisManager &AM) { - if (!uniqueifyInternalLinkageNames(M)) - return PreservedAnalyses::all(); - - return PreservedAnalyses::none(); -} - -INITIALIZE_PASS_BEGIN(UniqueInternalLinkageNamesLegacyPass, - "unique-internal-linkage-names", - "Uniqueify internal linkage names", false, false) -INITIALIZE_PASS_END(UniqueInternalLinkageNamesLegacyPass, - "unique-internal-linkage-names", - "Uniqueify Internal linkage names", false, false) - -namespace llvm { -ModulePass *createUniqueInternalLinkageNamesPass() { - return new UniqueInternalLinkageNamesLegacyPass(); -} -} // namespace llvm Index: llvm/lib/Transforms/Utils/Utils.cpp =================================================================== --- llvm/lib/Transforms/Utils/Utils.cpp +++ llvm/lib/Transforms/Utils/Utils.cpp @@ -45,7 +45,6 @@ initializeInjectTLIMappingsLegacyPass(Registry); initializeFixIrreduciblePass(Registry); initializeUnifyLoopExitsLegacyPassPass(Registry); - initializeUniqueInternalLinkageNamesLegacyPassPass(Registry); } /// LLVMInitializeTransformUtils - C binding for initializeTransformUtilsPasses. Index: llvm/test/Transforms/UniqueInternalLinkageNames/unique-internal-linkage-names.ll =================================================================== --- llvm/test/Transforms/UniqueInternalLinkageNames/unique-internal-linkage-names.ll +++ /dev/null @@ -1,51 +0,0 @@ -; RUN: opt -S -passes='default' -new-pm-pseudo-probe-for-profiling -new-pm-unique-internal-linkage-names -debug-pass-manager < %s 2>&1 | FileCheck %s --check-prefix=O0 --check-prefix=UNIQUE -; RUN: opt -S -passes='default' -new-pm-pseudo-probe-for-profiling -new-pm-unique-internal-linkage-names -debug-pass-manager < %s 2>&1 | FileCheck %s --check-prefix=O2 --check-prefix=UNIQUE -; RUN: opt -S -passes='default' -new-pm-pseudo-probe-for-profiling -new-pm-unique-internal-linkage-names -debug-pass-manager < %s 2>&1 | FileCheck %s --check-prefix=O2 --check-prefix=UNIQUE -; RUN: opt -S -passes='thinlto-pre-link' -new-pm-pseudo-probe-for-profiling -new-pm-unique-internal-linkage-names -debug-pass-manager < %s 2>&1 | FileCheck %s --check-prefix=O2 --check-prefix=UNIQUE -; RUN: opt -S -passes='thinlto-pre-link' -new-pm-pseudo-probe-for-profiling -new-pm-unique-internal-linkage-names -debug-pass-manager < %s 2>&1 | FileCheck %s --check-prefix=O2 --check-prefix=UNIQUE -; RUN: opt -S -passes=unique-internal-linkage-names < %s -o - | FileCheck %s --check-prefix=DBG - -define internal i32 @foo() !dbg !15 { -entry: - ret i32 0 -} - -define dso_local i32 (...)* @bar() { -entry: - ret i32 (...)* bitcast (i32 ()* @foo to i32 (...)*) -} - -define internal i32 @go() !dbg !19 { -entry: - ret i32 0 -} - -!llvm.dbg.cu = !{!0} -!llvm.module.flags = !{!3, !4, !5} - -!0 = distinct !DICompileUnit(language: DW_LANG_C99, file: !1, enums: !2) -!1 = !DIFile(filename: "test.c", directory: "") -!2 = !{} -!3 = !{i32 7, !"Dwarf Version", i32 4} -!4 = !{i32 2, !"Debug Info Version", i32 3} -!5 = !{i32 1, !"wchar_size", i32 4} -!13 = !DIBasicType(name: "int", size: 32, encoding: DW_ATE_signed) -!15 = distinct !DISubprogram(name: "foo", linkageName: "foo", scope: !1, file: !1, line: 5, type: !16, scopeLine: 5, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, declaration: !18, retainedNodes: !2) -!16 = !DISubroutineType(types: !17) -!17 = !{!13} -!18 = !DISubprogram(name: "foo", linkageName: "foo", scope: !1, isDefinition: false, flags: DIFlagPrototyped, spFlags: DISPFlagOptimized) -!19 = distinct !DISubprogram(name: "go", scope: !1, file: !1, line: 5, type: !16, scopeLine: 5, spFlags: DISPFlagLocalToUnit | DISPFlagDefinition, unit: !0, declaration: !18, retainedNodes: !2) - -; O0: Running pass: UniqueInternalLinkageNamesPass - -;; Check UniqueInternalLinkageNamesPass is scheduled before SampleProfileProbePass. -; O2: Running pass: UniqueInternalLinkageNamesPass -; O2: Running pass: SampleProfileProbePass - -; UNIQUE: define internal i32 @foo.__uniq.{{[0-9]+}}() [[ATTR:#[0-9]+]] -; UNIQUE: ret {{.*}} @foo.__uniq.{{[0-9]+}} {{.*}} -; UNIQUE: attributes [[ATTR]] = {{{.*}} "sample-profile-suffix-elision-policy"="selected" {{.*}}} - -; DBG: distinct !DISubprogram(name: "foo", linkageName: "foo.__uniq.{{[0-9]+}}", scope: ![[#]] -; DBG: !DISubprogram(name: "foo", linkageName: "foo.__uniq.{{[0-9]+}}", scope: ![[#]] -; DBG: distinct !DISubprogram(name: "go", scope: ![[#]] Index: llvm/test/Transforms/UniqueInternalLinkageNames/unique_symbol_names.ll =================================================================== --- llvm/test/Transforms/UniqueInternalLinkageNames/unique_symbol_names.ll +++ /dev/null @@ -1,14 +0,0 @@ -; RUN: opt -S -unique-internal-linkage-names < %s | FileCheck %s -; RUN: opt -S -passes=unique-internal-linkage-names < %s | FileCheck %s - -source_filename = "foo.c" - -@glob = internal global i32 0 - -define internal i32 @foo() { -entry: - ret i32 0 -} - -; CHECK: @glob.__uniq.142098474322525230676991677820000238157 = internal global -; CHECK: define internal i32 @foo.__uniq.142098474322525230676991677820000238157() Index: llvm/tools/opt/NewPMDriver.cpp =================================================================== --- llvm/tools/opt/NewPMDriver.cpp +++ llvm/tools/opt/NewPMDriver.cpp @@ -137,10 +137,6 @@ static cl::opt PseudoProbeForProfiling( "new-pm-pseudo-probe-for-profiling", cl::init(false), cl::Hidden, cl::desc("Emit pseudo probes to enable PGO profile generation.")); -static cl::opt UniqueInternalLinkageNames( - "new-pm-unique-internal-linkage-names", cl::init(false), cl::Hidden, - cl::desc("Uniqueify Internal Linkage Symbol Names by appending the MD5 " - "hash of the module path.")); /// @}} template @@ -292,7 +288,6 @@ // option has been enabled. PTO.LoopUnrolling = !DisableLoopUnrolling; PTO.Coroutines = Coroutines; - PTO.UniqueLinkageNames = UniqueInternalLinkageNames; PassBuilder PB(DebugPM, TM, PTO, P, &PIC); registerEPCallbacks(PB); Index: llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn =================================================================== --- llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn +++ llvm/utils/gn/secondary/llvm/lib/Transforms/Utils/BUILD.gn @@ -73,7 +73,6 @@ "SymbolRewriter.cpp", "UnifyFunctionExitNodes.cpp", "UnifyLoopExits.cpp", - "UniqueInternalLinkageNames.cpp", "Utils.cpp", "VNCoercion.cpp", "ValueMapper.cpp",