From 111a018b3638ff73dea24fb357df871eafb047e6 Mon Sep 17 00:00:00 2001 From: Mircea Trofin Date: Wed, 22 Jul 2020 13:05:58 -0700 Subject: [PATCH] [llvm][NFC] const-ed MachineBlockFrequencyInfo::isIrrLoopHeader --- llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h | 2 +- llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h index 0f8d69e..01f83a5 100644 --- a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h +++ b/llvm/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/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp index 1168b01..c836997 100644 --- a/llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/llvm/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); } -- 2.7.4