[llvm] 111a018 - [llvm][NFC] const-ed MachineBlockFrequencyInfo::isIrrLoopHeader

Mircea Trofin via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 22 13:06:45 PDT 2020


Author: Mircea Trofin
Date: 2020-07-22T13:06:34-07:00
New Revision: 111a018b3638ff73dea24fb357df871eafb047e6

URL: https://github.com/llvm/llvm-project/commit/111a018b3638ff73dea24fb357df871eafb047e6
DIFF: https://github.com/llvm/llvm-project/commit/111a018b3638ff73dea24fb357df871eafb047e6.diff

LOG: [llvm][NFC] const-ed MachineBlockFrequencyInfo::isIrrLoopHeader

Added: 
    

Modified: 
    llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
    llvm/lib/CodeGen/MachineBlockFrequencyInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
index 0f8d69ebd7da..01f83a507cb2 100644
--- a/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
+++ b/llvm/include/llvm/CodeGen/MachineBlockFrequencyInfo.h
@@ -64,7 +64,7 @@ class MachineBlockFrequencyInfo : public MachineFunctionPass {
   Optional<uint64_t> getBlockProfileCount(const MachineBasicBlock *MBB) const;
   Optional<uint64_t> 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 1168b01a835f..c83699706014 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);
 }


        


More information about the llvm-commits mailing list