diff options
| author | bors <bors@rust-lang.org> | 2025-09-27 22:30:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2025-09-27 22:30:56 +0000 |
| commit | 848e6746fe03dfd703075c5077312b63877d51d6 (patch) | |
| tree | eba347843510a17e763b7a896a3955759784b546 /compiler/rustc_llvm/llvm-wrapper | |
| parent | 4082d6a3f0347c2fc4b8c8d5a6a38ed7248fa161 (diff) | |
| parent | bd2e18671d4eb0c2cf33965748c270a8ec358557 (diff) | |
| download | rust-848e6746fe03dfd703075c5077312b63877d51d6.tar.gz rust-848e6746fe03dfd703075c5077312b63877d51d6.zip | |
Auto merge of #147104 - matthiaskrgr:rollup-gap1v0w, r=matthiaskrgr
Rollup of 8 pull requests Successful merges: - rust-lang/rust#146037 (Introduce CoerceShared lang item and trait, and basic Reborrow tests) - rust-lang/rust#146732 (tests: relax expectations after llvm change 902ddda120a5) - rust-lang/rust#147018 (re-order normalizations in run-make linker-warning test) - rust-lang/rust#147032 (Fix doctest compilation time display) - rust-lang/rust#147046 (Rename `rust.use-lld` to `rust.bootstrap-override-lld`) - rust-lang/rust#147050 (PassWrapper: update for new PGOOptions args in LLVM 22) - rust-lang/rust#147075 (Make `def_path_hash_to_def_id` not panic when passed an invalid hash) - rust-lang/rust#147076 (update issue number for more_float_constants) r? `@ghost` `@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_llvm/llvm-wrapper')
| -rw-r--r-- | compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp index 013d68fa3e4..2e9fd6754f1 100644 --- a/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp +++ b/compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp @@ -569,25 +569,43 @@ extern "C" LLVMRustResult LLVMRustOptimize( } std::optional<PGOOptions> PGOOpt; +#if LLVM_VERSION_LT(22, 0) auto FS = vfs::getRealFileSystem(); +#endif if (PGOGenPath) { assert(!PGOUsePath && !PGOSampleUsePath); PGOOpt = PGOOptions( +#if LLVM_VERSION_GE(22, 0) + PGOGenPath, "", "", "", PGOOptions::IRInstr, PGOOptions::NoCSAction, +#else PGOGenPath, "", "", "", FS, PGOOptions::IRInstr, PGOOptions::NoCSAction, +#endif PGOOptions::ColdFuncOpt::Default, DebugInfoForProfiling); } else if (PGOUsePath) { assert(!PGOSampleUsePath); PGOOpt = PGOOptions( +#if LLVM_VERSION_GE(22, 0) + PGOUsePath, "", "", "", PGOOptions::IRUse, PGOOptions::NoCSAction, +#else PGOUsePath, "", "", "", FS, PGOOptions::IRUse, PGOOptions::NoCSAction, +#endif PGOOptions::ColdFuncOpt::Default, DebugInfoForProfiling); } else if (PGOSampleUsePath) { PGOOpt = +#if LLVM_VERSION_GE(22, 0) + PGOOptions(PGOSampleUsePath, "", "", "", PGOOptions::SampleUse, +#else PGOOptions(PGOSampleUsePath, "", "", "", FS, PGOOptions::SampleUse, +#endif PGOOptions::NoCSAction, PGOOptions::ColdFuncOpt::Default, DebugInfoForProfiling); } else if (DebugInfoForProfiling) { PGOOpt = PGOOptions( +#if LLVM_VERSION_GE(22, 0) + "", "", "", "", PGOOptions::NoAction, PGOOptions::NoCSAction, +#else "", "", "", "", FS, PGOOptions::NoAction, PGOOptions::NoCSAction, +#endif PGOOptions::ColdFuncOpt::Default, DebugInfoForProfiling); } |
