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:
Xinliang David Li
2019-04-24 19:51:16 +00:00
parent c28a81a948
commit a67600cb79
9 changed files with 41 additions and 24 deletions
+3 -2
View File
@@ -203,11 +203,12 @@ BlockFrequency BlockFrequencyInfo::getBlockFreq(const BasicBlock *BB) const {
}
Optional<uint64_t>
BlockFrequencyInfo::getBlockProfileCount(const BasicBlock *BB) const {
BlockFrequencyInfo::getBlockProfileCount(const BasicBlock *BB,
bool AllowSynthetic) const {
if (!BFI)
return None;
return BFI->getBlockProfileCount(*getFunction(), BB);
return BFI->getBlockProfileCount(*getFunction(), BB, AllowSynthetic);
}
Optional<uint64_t>