diff --git a/llvm/test/tools/llvm-profgen/cs-preinline-cost.test b/llvm/test/tools/llvm-profgen/cs-preinline-cost.test --- a/llvm/test/tools/llvm-profgen/cs-preinline-cost.test +++ b/llvm/test/tools/llvm-profgen/cs-preinline-cost.test @@ -1,6 +1,6 @@ ; REQUIRES: asserts ; Test default using size of profile as a proxy -; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-preinline-cost.perfscript --binary=%S/Inputs/cs-preinline-cost.perfbin --csspgo-preinliner --debug-only=cs-preinliner --output=/dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT +; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-preinline-cost.perfscript --binary=%S/Inputs/cs-preinline-cost.perfbin --csspgo-preinliner --debug-only=cs-preinliner --use-context-cost-for-preinliner=0 --output=/dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-DEFAULT ; Test use-context-cost-for-preinliner using inlinee's byte size as context-sensitive inline cost ; RUN: llvm-profgen --format=text --perfscript=%S/Inputs/cs-preinline-cost.perfscript --binary=%S/Inputs/cs-preinline-cost.perfbin --csspgo-preinliner --debug-only=cs-preinliner --use-context-cost-for-preinliner --output=/dev/null 2>&1 | FileCheck %s --check-prefix=CHECK-CSCOST diff --git a/llvm/tools/llvm-profgen/CSPreInliner.cpp b/llvm/tools/llvm-profgen/CSPreInliner.cpp --- a/llvm/tools/llvm-profgen/CSPreInliner.cpp +++ b/llvm/tools/llvm-profgen/CSPreInliner.cpp @@ -45,7 +45,7 @@ "estimated global top-down inline decisions")); cl::opt UseContextCostForPreInliner( - "use-context-cost-for-preinliner", cl::Hidden, cl::init(false), + "use-context-cost-for-preinliner", cl::Hidden, cl::init(true), cl::desc("Use context-sensitive byte size cost for preinliner decisions")); static cl::opt SamplePreInlineReplay(