OSDN Git Service

Add more constantness in BlockFrequencyInfo.
authorJakub Staszak <jstaszak@apple.com>
Wed, 3 Aug 2011 21:30:57 +0000 (21:30 +0000)
committerJakub Staszak <jstaszak@apple.com>
Wed, 3 Aug 2011 21:30:57 +0000 (21:30 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136816 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Analysis/BlockFrequencyInfo.h
include/llvm/CodeGen/MachineBlockFrequencyInfo.h
lib/Analysis/BlockFrequencyInfo.cpp
lib/CodeGen/MachineBlockFrequencyInfo.cpp

index bd9807d..5978d5f 100644 (file)
@@ -46,7 +46,7 @@ public:
   /// 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.
   ///
-  BlockFrequency getBlockFreq(BasicBlock *BB);
+  BlockFrequency getBlockFreq(BasicBlock *BB) const;
 };
 
 }
index 63ab2ef..416d40b 100644 (file)
@@ -46,7 +46,7 @@ public:
   /// 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.
   ///
-  BlockFrequency getBlockFreq(MachineBasicBlock *MBB);
+  BlockFrequency getBlockFreq(MachineBasicBlock *MBB) const;
 };
 
 }
index 5bb3540..ee89915 100644 (file)
@@ -54,6 +54,6 @@ bool BlockFrequencyInfo::runOnFunction(Function &F) {
 /// 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.
 ///
-BlockFrequency BlockFrequencyInfo::getBlockFreq(BasicBlock *BB) {
+BlockFrequency BlockFrequencyInfo::getBlockFreq(BasicBlock *BB) const {
   return BFI->getBlockFreq(BB);
 }
index 4e08ebe..b92cda9 100644 (file)
@@ -55,6 +55,7 @@ bool MachineBlockFrequencyInfo::runOnMachineFunction(MachineFunction &F) {
 /// 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.
 ///
-BlockFrequency MachineBlockFrequencyInfo::getBlockFreq(MachineBasicBlock *MBB) {
+BlockFrequency MachineBlockFrequencyInfo::
+getBlockFreq(MachineBasicBlock *MBB) const {
   return MBFI->getBlockFreq(MBB);
 }