diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2021-07-29 20:15:26 +0000 |
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2021-07-29 20:15:26 +0000 |
| commit | 344a3780b2e33f6ca763666c380202b18aab72a3 (patch) | |
| tree | f0b203ee6eb71d7fdd792373e3c81eb18d6934dd /llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp | |
| parent | b60736ec1405bb0a8dd40989f67ef4c93da068ab (diff) | |
vendor/llvm-project/llvmorg-13-init-16847-g88e66fa60ae5vendor/llvm-project/llvmorg-12.0.1-rc2-0-ge7dac564cd0evendor/llvm-project/llvmorg-12.0.1-0-gfed41342a82f
Diffstat (limited to 'llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp')
| -rw-r--r-- | llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp index e4fda2472b3a..e4e45b3076be 100644 --- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp +++ b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp @@ -40,12 +40,28 @@ using namespace llvm::bfi_detail; #define DEBUG_TYPE "block-freq" +namespace llvm { cl::opt<bool> CheckBFIUnknownBlockQueries( "check-bfi-unknown-block-queries", cl::init(false), cl::Hidden, cl::desc("Check if block frequency is queried for an unknown block " "for debugging missed BFI updates")); +cl::opt<bool> UseIterativeBFIInference( + "use-iterative-bfi-inference", cl::init(false), cl::Hidden, cl::ZeroOrMore, + cl::desc("Apply an iterative post-processing to infer correct BFI counts")); + +cl::opt<unsigned> IterativeBFIMaxIterationsPerBlock( + "iterative-bfi-max-iterations-per-block", cl::init(1000), cl::Hidden, + cl::desc("Iterative inference: maximum number of update iterations " + "per block")); + +cl::opt<double> IterativeBFIPrecision( + "iterative-bfi-precision", cl::init(1e-12), cl::Hidden, + cl::desc("Iterative inference: delta convergence precision; smaller values " + "typically lead to better results at the cost of worsen runtime")); +} + ScaledNumber<uint64_t> BlockMass::toScaled() const { if (isFull()) return ScaledNumber<uint64_t>(1, 0); |
