[llvm] 5a2aec3 - NFC. Mark DOTFuncInfo getters as const
Artur Pilipenko via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 3 11:27:26 PDT 2021
Author: Artur Pilipenko
Date: 2021-06-03T11:27:06-07:00
New Revision: 5a2aec3f27abbd11cf4ab40f559bedcd4a1a7987
URL: https://github.com/llvm/llvm-project/commit/5a2aec3f27abbd11cf4ab40f559bedcd4a1a7987
DIFF: https://github.com/llvm/llvm-project/commit/5a2aec3f27abbd11cf4ab40f559bedcd4a1a7987.diff
LOG: NFC. Mark DOTFuncInfo getters as const
This is a preparatory refactoring for introducing new
types of hidden blocks.
Added:
Modified:
llvm/include/llvm/Analysis/CFGPrinter.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/Analysis/CFGPrinter.h b/llvm/include/llvm/Analysis/CFGPrinter.h
index db0f9c8ab7e7..c0cabceb4a54 100644
--- a/llvm/include/llvm/Analysis/CFGPrinter.h
+++ b/llvm/include/llvm/Analysis/CFGPrinter.h
@@ -72,15 +72,15 @@ class DOTFuncInfo {
RawWeights = !!BFI; // Print RawWeights when BFI is available.
}
- const BlockFrequencyInfo *getBFI() { return BFI; }
+ const BlockFrequencyInfo *getBFI() const { return BFI; }
- const BranchProbabilityInfo *getBPI() { return BPI; }
+ const BranchProbabilityInfo *getBPI() const { return BPI; }
- const Function *getFunction() { return this->F; }
+ const Function *getFunction() const { return this->F; }
- uint64_t getMaxFreq() { return MaxFreq; }
+ uint64_t getMaxFreq() const { return MaxFreq; }
- uint64_t getFreq(const BasicBlock *BB) {
+ uint64_t getFreq(const BasicBlock *BB) const {
return BFI->getBlockFreq(BB).getFrequency();
}
More information about the llvm-commits
mailing list