From 8ea45231dc6c30d0c4a55ce038a08edccc308a73 Mon Sep 17 00:00:00 2001 From: Jakub Staszak Date: Wed, 3 Aug 2011 21:30:57 +0000 Subject: Add more constantness in BlockFrequencyInfo. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136816 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Analysis/BlockFrequencyInfo.h | 2 +- include/llvm/CodeGen/MachineBlockFrequencyInfo.h | 2 +- lib/Analysis/BlockFrequencyInfo.cpp | 2 +- lib/CodeGen/MachineBlockFrequencyInfo.cpp | 3 ++- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/include/llvm/Analysis/BlockFrequencyInfo.h b/include/llvm/Analysis/BlockFrequencyInfo.h index bd9807dc89..5978d5fa0e 100644 --- a/include/llvm/Analysis/BlockFrequencyInfo.h +++ b/include/llvm/Analysis/BlockFrequencyInfo.h @@ -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; }; } diff --git a/include/llvm/CodeGen/MachineBlockFrequencyInfo.h b/include/llvm/CodeGen/MachineBlockFrequencyInfo.h index 63ab2ef850..416d40bf30 100644 --- a/include/llvm/CodeGen/MachineBlockFrequencyInfo.h +++ b/include/llvm/CodeGen/MachineBlockFrequencyInfo.h @@ -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; }; } diff --git a/lib/Analysis/BlockFrequencyInfo.cpp b/lib/Analysis/BlockFrequencyInfo.cpp index 5bb3540a1f..ee899153e1 100644 --- a/lib/Analysis/BlockFrequencyInfo.cpp +++ b/lib/Analysis/BlockFrequencyInfo.cpp @@ -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); } diff --git a/lib/CodeGen/MachineBlockFrequencyInfo.cpp b/lib/CodeGen/MachineBlockFrequencyInfo.cpp index 4e08ebe6a9..b92cda9614 100644 --- a/lib/CodeGen/MachineBlockFrequencyInfo.cpp +++ b/lib/CodeGen/MachineBlockFrequencyInfo.cpp @@ -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); } -- cgit v1.2.3