mirror of
https://github.com/RPCS3/llvm.git
synced 2026-07-18 21:24:32 -04:00
Add optional arg to profile count getters to filter
synthetic profile count. Differential Revision: http://reviews.llvm.org/D61025 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@359131 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -557,14 +557,17 @@ BlockFrequencyInfoImplBase::getBlockFreq(const BlockNode &Node) const {
|
||||
|
||||
Optional<uint64_t>
|
||||
BlockFrequencyInfoImplBase::getBlockProfileCount(const Function &F,
|
||||
const BlockNode &Node) const {
|
||||
return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency());
|
||||
const BlockNode &Node,
|
||||
bool AllowSynthetic) const {
|
||||
return getProfileCountFromFreq(F, getBlockFreq(Node).getFrequency(),
|
||||
AllowSynthetic);
|
||||
}
|
||||
|
||||
Optional<uint64_t>
|
||||
BlockFrequencyInfoImplBase::getProfileCountFromFreq(const Function &F,
|
||||
uint64_t Freq) const {
|
||||
auto EntryCount = F.getEntryCount();
|
||||
uint64_t Freq,
|
||||
bool AllowSynthetic) const {
|
||||
auto EntryCount = F.getEntryCount(AllowSynthetic);
|
||||
if (!EntryCount)
|
||||
return None;
|
||||
// Use 128 bit APInt to do the arithmetic to avoid overflow.
|
||||
|
||||
Reference in New Issue
Block a user