Skip to content

Commit 65ce861

Browse files
committed
Auto merge of #166152 - JonathanBrouwer:rollup-k1eoUpv, r=JonathanBrouwer
Rollup of 4 perf-sensitive pull requests Successful merges: - #165396 (Perf - Separate flag computation & intern functions per `TyKind`) - #165774 (Auto trait finder: Avoid recomputing `ParamEnv` if nothing changed) - #165863 (Avoid instantiating `FnSig` when not necessary) - #166084 (Avoid unnecessary LLVM passes when thin LTO buffer is null)
2 parents 412be32 + ca637b3 commit 65ce861

17 files changed

Lines changed: 507 additions & 230 deletions

File tree

‎compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -997,7 +997,7 @@ extern "C" LLVMRustResult LLVMRustOptimize(
997997
};
998998

999999
ModulePassManager MPM;
1000-
bool NeedThinLTOBufferPasses = true;
1000+
bool NeedThinLTOBufferPasses = ThinLTOBufferRef != nullptr;
10011001
auto ThinLTOBuffer = std::make_unique<LLVMRustBuffer>();
10021002
auto ThinLTOSummaryBuffer = std::make_unique<LLVMRustBuffer>();
10031003
raw_string_ostream ThinLTODataOS(ThinLTOBuffer->data);
@@ -1631,6 +1631,8 @@ extern "C" LLVMRustBuffer *LLVMRustModuleSerialize(LLVMModuleRef M,
16311631
PB.crossRegisterProxies(LAM, FAM, CGAM, MAM);
16321632

16331633
ModulePassManager MPM;
1634+
MPM.addPass(CanonicalizeAliasesPass());
1635+
MPM.addPass(NameAnonGlobalPass());
16341636
#if LLVM_VERSION_GE(23, 0)
16351637
MPM.addPass(AssignGUIDPass());
16361638
#endif

0 commit comments

Comments
 (0)