aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
diff options
context:
space:
mode:
authorshadchin <shadchin@yandex-team.ru>2022-02-10 16:44:39 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:44:39 +0300
commite9656aae26e0358d5378e5b63dcac5c8dbe0e4d0 (patch)
tree64175d5cadab313b3e7039ebaa06c5bc3295e274 /contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
parent2598ef1d0aee359b4b6d5fdd1758916d5907d04f (diff)
downloadydb-e9656aae26e0358d5378e5b63dcac5c8dbe0e4d0.tar.gz
Restoring authorship annotation for <shadchin@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h')
-rw-r--r--contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h40
1 files changed, 20 insertions, 20 deletions
diff --git a/contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
index 251f53ae45..d6a36181f6 100644
--- a/contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
+++ b/contrib/libs/llvm12/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
@@ -65,33 +65,33 @@ public:
/// information. Please note that initial frequency is equal to 1024. It means
/// that we should not rely on the value itself, but only on the comparison to
/// the other block frequencies. We do this to avoid using of floating points.
- /// For example, to get the frequency of a block relative to the entry block,
- /// divide the integral value returned by this function (the
- /// BlockFrequency::getFrequency() value) by getEntryFreq().
+ /// For example, to get the frequency of a block relative to the entry block,
+ /// divide the integral value returned by this function (the
+ /// BlockFrequency::getFrequency() value) by getEntryFreq().
BlockFrequency getBlockFreq(const MachineBasicBlock *MBB) const;
- /// Compute the frequency of the block, relative to the entry block.
- /// This API assumes getEntryFreq() is non-zero.
- float getBlockFreqRelativeToEntryBlock(const MachineBasicBlock *MBB) const {
- return getBlockFreq(MBB).getFrequency() * (1.0f / getEntryFreq());
- }
-
+ /// Compute the frequency of the block, relative to the entry block.
+ /// This API assumes getEntryFreq() is non-zero.
+ float getBlockFreqRelativeToEntryBlock(const MachineBasicBlock *MBB) const {
+ return getBlockFreq(MBB).getFrequency() * (1.0f / getEntryFreq());
+ }
+
Optional<uint64_t> getBlockProfileCount(const MachineBasicBlock *MBB) const;
Optional<uint64_t> getProfileCountFromFreq(uint64_t Freq) const;
- bool isIrrLoopHeader(const MachineBasicBlock *MBB) const;
+ bool isIrrLoopHeader(const MachineBasicBlock *MBB) const;
- /// incrementally calculate block frequencies when we split edges, to avoid
- /// full CFG traversal.
- void onEdgeSplit(const MachineBasicBlock &NewPredecessor,
- const MachineBasicBlock &NewSuccessor,
- const MachineBranchProbabilityInfo &MBPI);
+ /// incrementally calculate block frequencies when we split edges, to avoid
+ /// full CFG traversal.
+ void onEdgeSplit(const MachineBasicBlock &NewPredecessor,
+ const MachineBasicBlock &NewSuccessor,
+ const MachineBranchProbabilityInfo &MBPI);
const MachineFunction *getFunction() const;
const MachineBranchProbabilityInfo *getMBPI() const;
-
- /// Pop up a ghostview window with the current block frequency propagation
- /// rendered using dot.
+
+ /// Pop up a ghostview window with the current block frequency propagation
+ /// rendered using dot.
void view(const Twine &Name, bool isSimple = true) const;
// Print the block frequency Freq to OS using the current functions entry
@@ -103,8 +103,8 @@ public:
raw_ostream &printBlockFreq(raw_ostream &OS,
const MachineBasicBlock *MBB) const;
- /// Divide a block's BlockFrequency::getFrequency() value by this value to
- /// obtain the entry block - relative frequency of said block.
+ /// Divide a block's BlockFrequency::getFrequency() value by this value to
+ /// obtain the entry block - relative frequency of said block.
uint64_t getEntryFreq() const;
};