mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-06-26 23:24:34 +00:00
Allow getBlockFreq to return 0.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135742 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@ -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 {
|
||||
|
Reference in New Issue
Block a user