diff options
author | Jakub Staszak <kubastaszak@gmail.com> | 2011-12-20 20:03:10 +0000 |
---|---|---|
committer | Jakub Staszak <kubastaszak@gmail.com> | 2011-12-20 20:03:10 +0000 |
commit | 96f8c551e3da84528e60298823c5ae3a30153bf8 (patch) | |
tree | 4d545b2d441f5f7e7f1785ef993312b3bd4b0aa0 /llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp | |
parent | c8ebeff9a1f07562dcdf7f649c05d734362d21cd (diff) | |
download | bcm5719-llvm-96f8c551e3da84528e60298823c5ae3a30153bf8.tar.gz bcm5719-llvm-96f8c551e3da84528e60298823c5ae3a30153bf8.zip |
Add some constantness to BranchProbabilityInfo and BlockFrequnencyInfo.
llvm-svn: 146986
Diffstat (limited to 'llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp')
-rw-r--r-- | llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp index dc45e46bb6a..0cc1af07952 100644 --- a/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp +++ b/llvm/lib/CodeGen/MachineBranchProbabilityInfo.cpp @@ -29,7 +29,7 @@ char MachineBranchProbabilityInfo::ID = 0; void MachineBranchProbabilityInfo::anchor() { } uint32_t MachineBranchProbabilityInfo:: -getSumForBlock(MachineBasicBlock *MBB, uint32_t &Scale) const { +getSumForBlock(const MachineBasicBlock *MBB, uint32_t &Scale) const { // First we compute the sum with 64-bits of precision, ensuring that cannot // overflow by bounding the number of weights considered. Hopefully no one // actually needs 2^32 successors. @@ -61,8 +61,8 @@ getSumForBlock(MachineBasicBlock *MBB, uint32_t &Scale) const { } uint32_t -MachineBranchProbabilityInfo::getEdgeWeight(MachineBasicBlock *Src, - MachineBasicBlock *Dst) const { +MachineBranchProbabilityInfo::getEdgeWeight(const MachineBasicBlock *Src, + const MachineBasicBlock *Dst) const { uint32_t Weight = Src->getSuccWeight(Dst); if (!Weight) return DEFAULT_WEIGHT; |