Rollup merge of #120995 - durin42:llvm-19-pgo-coldfuncopt, r=cuviper
PassWrapper: adapt for llvm/llvm-project@93cdd1b5cf Should be no functional change. `@rustbot` label: +llvm-main
This commit is contained in:
commit
70ea26d349
1 changed files with 15 additions and 0 deletions
|
@ -43,6 +43,9 @@
|
||||||
#include "llvm/Transforms/Instrumentation.h"
|
#include "llvm/Transforms/Instrumentation.h"
|
||||||
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
|
#include "llvm/Transforms/Instrumentation/AddressSanitizer.h"
|
||||||
#include "llvm/Support/TimeProfiler.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/GCOVProfiler.h"
|
||||||
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
|
#include "llvm/Transforms/Instrumentation/InstrProfiling.h"
|
||||||
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
|
#include "llvm/Transforms/Instrumentation/ThreadSanitizer.h"
|
||||||
|
@ -749,6 +752,9 @@ LLVMRustOptimize(
|
||||||
FS,
|
FS,
|
||||||
#endif
|
#endif
|
||||||
PGOOptions::IRInstr, PGOOptions::NoCSAction,
|
PGOOptions::IRInstr, PGOOptions::NoCSAction,
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
PGOOptions::ColdFuncOpt::Default,
|
||||||
|
#endif
|
||||||
DebugInfoForProfiling);
|
DebugInfoForProfiling);
|
||||||
} else if (PGOUsePath) {
|
} else if (PGOUsePath) {
|
||||||
assert(!PGOSampleUsePath);
|
assert(!PGOSampleUsePath);
|
||||||
|
@ -758,6 +764,9 @@ LLVMRustOptimize(
|
||||||
FS,
|
FS,
|
||||||
#endif
|
#endif
|
||||||
PGOOptions::IRUse, PGOOptions::NoCSAction,
|
PGOOptions::IRUse, PGOOptions::NoCSAction,
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
PGOOptions::ColdFuncOpt::Default,
|
||||||
|
#endif
|
||||||
DebugInfoForProfiling);
|
DebugInfoForProfiling);
|
||||||
} else if (PGOSampleUsePath) {
|
} else if (PGOSampleUsePath) {
|
||||||
PGOOpt = PGOOptions(PGOSampleUsePath, "", "",
|
PGOOpt = PGOOptions(PGOSampleUsePath, "", "",
|
||||||
|
@ -766,6 +775,9 @@ LLVMRustOptimize(
|
||||||
FS,
|
FS,
|
||||||
#endif
|
#endif
|
||||||
PGOOptions::SampleUse, PGOOptions::NoCSAction,
|
PGOOptions::SampleUse, PGOOptions::NoCSAction,
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
PGOOptions::ColdFuncOpt::Default,
|
||||||
|
#endif
|
||||||
DebugInfoForProfiling);
|
DebugInfoForProfiling);
|
||||||
} else if (DebugInfoForProfiling) {
|
} else if (DebugInfoForProfiling) {
|
||||||
PGOOpt = PGOOptions("", "", "",
|
PGOOpt = PGOOptions("", "", "",
|
||||||
|
@ -774,6 +786,9 @@ LLVMRustOptimize(
|
||||||
FS,
|
FS,
|
||||||
#endif
|
#endif
|
||||||
PGOOptions::NoAction, PGOOptions::NoCSAction,
|
PGOOptions::NoAction, PGOOptions::NoCSAction,
|
||||||
|
#if LLVM_VERSION_GE(19, 0)
|
||||||
|
PGOOptions::ColdFuncOpt::Default,
|
||||||
|
#endif
|
||||||
DebugInfoForProfiling);
|
DebugInfoForProfiling);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue