[block-freq] Add the equivalent methods to MachineBlockFrequencyInfo and BlockFrequencyInfo that were added to BlockFrequencyImpl in r197285 and r197284.
llvm-svn: 197287
This commit is contained in:
parent
f11917614d
commit
fd5c4b2c09
|
@ -50,6 +50,15 @@ public:
|
||||||
/// comparison to the other block frequencies. We do this to avoid using of
|
/// comparison to the other block frequencies. We do this to avoid using of
|
||||||
/// floating points.
|
/// floating points.
|
||||||
BlockFrequency getBlockFreq(const BasicBlock *BB) const;
|
BlockFrequency getBlockFreq(const BasicBlock *BB) const;
|
||||||
|
|
||||||
|
// Print the block frequency Freq to OS using the current functions entry
|
||||||
|
// frequency to convert freq into a relative decimal form.
|
||||||
|
raw_ostream &printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const;
|
||||||
|
|
||||||
|
// Convenience method that attempts to look up the frequency associated with
|
||||||
|
// BB and print it to OS.
|
||||||
|
raw_ostream &printBlockFreq(raw_ostream &OS, const BasicBlock *BB) const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,6 +52,18 @@ public:
|
||||||
|
|
||||||
MachineFunction *getFunction() const;
|
MachineFunction *getFunction() const;
|
||||||
void view() const;
|
void view() const;
|
||||||
|
|
||||||
|
// Print the block frequency Freq to OS using the current functions entry
|
||||||
|
// frequency to convert freq into a relative decimal form.
|
||||||
|
raw_ostream &printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const;
|
||||||
|
|
||||||
|
// Convenience method that attempts to look up the frequency associated with
|
||||||
|
// BB and print it to OS.
|
||||||
|
raw_ostream &printBlockFreq(raw_ostream &OS,
|
||||||
|
const MachineBasicBlock *MBB) const;
|
||||||
|
|
||||||
|
uint64_t getEntryFrequency() const;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -159,3 +159,14 @@ void BlockFrequencyInfo::view() const {
|
||||||
const Function *BlockFrequencyInfo::getFunction() const {
|
const Function *BlockFrequencyInfo::getFunction() const {
|
||||||
return BFI->Fn;
|
return BFI->Fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raw_ostream &BlockFrequencyInfo::
|
||||||
|
printBlockFreq(raw_ostream &OS, const BlockFrequency Freq) const {
|
||||||
|
return BFI->printBlockFreq(OS, Freq);
|
||||||
|
}
|
||||||
|
|
||||||
|
raw_ostream &
|
||||||
|
BlockFrequencyInfo::printBlockFreq(raw_ostream &OS,
|
||||||
|
const BasicBlock *BB) const {
|
||||||
|
return BFI->printBlockFreq(OS, BB);
|
||||||
|
}
|
||||||
|
|
|
@ -168,3 +168,19 @@ getBlockFreq(const MachineBasicBlock *MBB) const {
|
||||||
MachineFunction *MachineBlockFrequencyInfo::getFunction() const {
|
MachineFunction *MachineBlockFrequencyInfo::getFunction() const {
|
||||||
return MBFI->Fn;
|
return MBFI->Fn;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
raw_ostream &
|
||||||
|
MachineBlockFrequencyInfo::printBlockFreq(raw_ostream &OS,
|
||||||
|
const BlockFrequency Freq) const {
|
||||||
|
return MBFI->printBlockFreq(OS, Freq);
|
||||||
|
}
|
||||||
|
|
||||||
|
raw_ostream &
|
||||||
|
MachineBlockFrequencyInfo::printBlockFreq(raw_ostream &OS,
|
||||||
|
const MachineBasicBlock *MBB) const {
|
||||||
|
return MBFI->printBlockFreq(OS, MBB);
|
||||||
|
}
|
||||||
|
|
||||||
|
uint64_t MachineBlockFrequencyInfo::getEntryFrequency() const {
|
||||||
|
return MBFI->getEntryFrequency();
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue