aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/BlockFrequencyImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Analysis/BlockFrequencyImpl.h')
-rw-r--r--include/llvm/Analysis/BlockFrequencyImpl.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/llvm/Analysis/BlockFrequencyImpl.h b/include/llvm/Analysis/BlockFrequencyImpl.h
index 6580fd1e4a..5a22b519f1 100644
--- a/include/llvm/Analysis/BlockFrequencyImpl.h
+++ b/include/llvm/Analysis/BlockFrequencyImpl.h
@@ -314,13 +314,12 @@ class BlockFrequencyImpl {
}
public:
- /// getBlockFreq - Return block frequency. Never return 0, value must be
- /// positive.
+ /// getBlockFreq - Return block frequency. Return 0 if we don't have it.
uint32_t getBlockFreq(BlockT *BB) const {
typename DenseMap<BlockT *, uint32_t>::const_iterator I = Freqs.find(BB);
if (I != Freqs.end())
- return I->second ? I->second : 1;
- return 1;
+ return I->second;
+ return 0;
}
void print(raw_ostream &OS) const {