Skip to content

Commit

Permalink
Rollup merge of rust-lang#120995 - durin42:llvm-19-pgo-coldfuncopt, r…
Browse files Browse the repository at this point in the history
…=cuviper

PassWrapper: adapt for llvm/llvm-project@93cdd1b5cfa3735c

Should be no functional change.

`@rustbot` label: +llvm-main
  • Loading branch information
matthiaskrgr authored Feb 13, 2024
2 parents 21d8fb2 + 9d1bd2e commit 70ea26d
Showing 1 changed file with 15 additions and 0 deletions.
15 changes: 15 additions & 0 deletions compiler/rustc_llvm/llvm-wrapper/PassWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@
#include "llvm/Transforms/Instrumentation.h"
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
#include "llvm/Support/TimeProfiler.h"
#if LLVM_VERSION_GE(19, 0)
#include "llvm/Support/PGOOptions.h"
#endif
#include "llvm/Transforms/Instrumentation/GCOVProfiler.h"
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
Expand Down Expand Up @@ -749,6 +752,9 @@ LLVMRustOptimize(
FS,
#endif
PGOOptions::IRInstr, PGOOptions::NoCSAction,
#if LLVM_VERSION_GE(19, 0)
PGOOptions::ColdFuncOpt::Default,
#endif
DebugInfoForProfiling);
} else if (PGOUsePath) {
assert(!PGOSampleUsePath);
Expand All @@ -758,6 +764,9 @@ LLVMRustOptimize(
FS,
#endif
PGOOptions::IRUse, PGOOptions::NoCSAction,
#if LLVM_VERSION_GE(19, 0)
PGOOptions::ColdFuncOpt::Default,
#endif
DebugInfoForProfiling);
} else if (PGOSampleUsePath) {
PGOOpt = PGOOptions(PGOSampleUsePath, "", "",
Expand All @@ -766,6 +775,9 @@ LLVMRustOptimize(
FS,
#endif
PGOOptions::SampleUse, PGOOptions::NoCSAction,
#if LLVM_VERSION_GE(19, 0)
PGOOptions::ColdFuncOpt::Default,
#endif
DebugInfoForProfiling);
} else if (DebugInfoForProfiling) {
PGOOpt = PGOOptions("", "", "",
Expand All @@ -774,6 +786,9 @@ LLVMRustOptimize(
FS,
#endif
PGOOptions::NoAction, PGOOptions::NoCSAction,
#if LLVM_VERSION_GE(19, 0)
PGOOptions::ColdFuncOpt::Default,
#endif
DebugInfoForProfiling);
}

Expand Down

0 comments on commit 70ea26d

Please sign in to comment.