mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-26 04:32:44 +01:00
[PGO] Make -disable-preinline work with NPM
Fixes cspgo_profile_summary.ll under NPM. Reviewed By: xur Differential Revision: https://reviews.llvm.org/D91826
This commit is contained in:
parent
e7321a134d
commit
2bf127ff66
@ -322,6 +322,8 @@ extern cl::opt<bool> EnableKnowledgeRetention;
|
||||
|
||||
extern cl::opt<bool> EnableMatrix;
|
||||
|
||||
extern cl::opt<bool> DisablePreInliner;
|
||||
|
||||
const PassBuilder::OptimizationLevel PassBuilder::OptimizationLevel::O0 = {
|
||||
/*SpeedLevel*/ 0,
|
||||
/*SizeLevel*/ 0};
|
||||
@ -822,7 +824,7 @@ void PassBuilder::addPGOInstrPasses(ModulePassManager &MPM,
|
||||
// the size grows, so let's be conservative here and skip this simplification
|
||||
// at -Os/Oz. We will not do this inline for context sensistive PGO (when
|
||||
// IsCS is true).
|
||||
if (!Level.isOptimizingForSize() && !IsCS) {
|
||||
if (!Level.isOptimizingForSize() && !IsCS && !DisablePreInliner) {
|
||||
InlineParams IP;
|
||||
|
||||
IP.DefaultThreshold = PreInlineThreshold;
|
||||
|
@ -111,7 +111,7 @@ static cl::opt<bool> UseLoopVersioningLICM(
|
||||
"enable-loop-versioning-licm", cl::init(false), cl::Hidden,
|
||||
cl::desc("Enable the experimental Loop Versioning LICM pass"));
|
||||
|
||||
static cl::opt<bool>
|
||||
cl::opt<bool>
|
||||
DisablePreInliner("disable-preinline", cl::init(false), cl::Hidden,
|
||||
cl::desc("Disable pre-instrumentation inliner"));
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
; Test the profile summary for context sensitive PGO (CSPGO)
|
||||
|
||||
; RUN: llvm-profdata merge %S/Inputs/cspgo.proftext -o %t.profdata
|
||||
; RUN: opt < %s -passes='default<O2>' -disable-preinline -pgo-instrument-entry=false -pgo-kind=pgo-instr-use-pipeline -profile-file=%t.profdata -S | FileCheck %s --check-prefix=PGOSUMMARY
|
||||
; RUN: opt < %s -O2 -disable-preinline -pgo-instrument-entry=false -pgo-kind=pgo-instr-use-pipeline -profile-file=%t.profdata -S | FileCheck %s --check-prefix=PGOSUMMARY
|
||||
; RUN: opt < %s -O2 -disable-preinline -pgo-instrument-entry=false -pgo-kind=pgo-instr-use-pipeline -profile-file=%t.profdata -S -cspgo-kind=cspgo-instr-use-pipeline| FileCheck %s --check-prefix=CSPGOSUMMARY
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user