From 145449b1e420787bb99721a429341fa6be3adfb6 Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Sun, 3 Jul 2022 16:10:23 +0200 Subject: Vendor import of llvm-project main llvmorg-15-init-15358-g53dc0f107877. --- llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp') diff --git a/llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp b/llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp index ea0e8343eb88..a2588b8cec7d 100644 --- a/llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp +++ b/llvm/lib/Transforms/Utils/SampleProfileLoaderBaseUtil.cpp @@ -11,6 +11,10 @@ //===----------------------------------------------------------------------===// #include "llvm/Transforms/Utils/SampleProfileLoaderBaseUtil.h" +#include "llvm/Analysis/ProfileSummaryInfo.h" +#include "llvm/IR/Constants.h" +#include "llvm/IR/Module.h" +#include "llvm/Transforms/Utils/ModuleUtils.h" namespace llvm { @@ -35,9 +39,13 @@ cl::opt NoWarnSampleUnused( "samples but without debug information to use those samples. ")); cl::opt SampleProfileUseProfi( - "sample-profile-use-profi", cl::init(false), cl::Hidden, cl::ZeroOrMore, + "sample-profile-use-profi", cl::Hidden, cl::desc("Use profi to infer block and edge counts.")); +cl::opt SampleProfileInferEntryCount( + "sample-profile-infer-entry-count", cl::init(true), cl::Hidden, + cl::desc("Use profi to infer function entry count.")); + namespace sampleprofutil { /// Return true if the given callsite is hot wrt to hot cutoff threshold. -- cgit v1.2.3