diff --git a/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/include/llvm/CodeGen/MachineBlockFrequencyInfo.h index 0f8d69ebd7d..01f83a507cb 100644 --- a/include/llvm/CodeGen/MachineBlockFrequencyInfo.h +++ b/include/llvm/CodeGen/MachineBlockFrequencyInfo.h @@ -64,7 +64,7 @@ public: Optional getBlockProfileCount(const MachineBasicBlock *MBB) const; Optional getProfileCountFromFreq(uint64_t Freq) const; - bool isIrrLoopHeader(const MachineBasicBlock *MBB); + bool isIrrLoopHeader(const MachineBasicBlock *MBB) const; void setBlockFreq(const MachineBasicBlock *MBB, uint64_t Freq); diff --git a/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/lib/CodeGen/MachineBlockFrequencyInfo.cpp index 1168b01a835..c8369970601 100644 --- a/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -241,8 +241,8 @@ MachineBlockFrequencyInfo::getProfileCountFromFreq(uint64_t Freq) const { return MBFI ? MBFI->getProfileCountFromFreq(F, Freq) : None; } -bool -MachineBlockFrequencyInfo::isIrrLoopHeader(const MachineBasicBlock *MBB) { +bool MachineBlockFrequencyInfo::isIrrLoopHeader( + const MachineBasicBlock *MBB) const { assert(MBFI && "Expected analysis to be available"); return MBFI->isIrrLoopHeader(MBB); }