[BFI] Drop AllowSynthetic Parameter
This was never set anywhere to something other than the default outside of the implementation and synthetic profile counts are slated for removal. Reviewers: teresajohnson, mtrofin, david-xl Pull Request: https://github.com/llvm/llvm-project/pull/204767
This commit is contained in:
parent
5794f4e183
commit
ee682b8b05
3 changed files with 17 additions and 23 deletions
|
|
@ -521,12 +521,10 @@ public:
|
|||
Scaled64 getFloatingBlockFreq(const BlockNode &Node) const;
|
||||
|
||||
BlockFrequency getBlockFreq(const BlockNode &Node) const;
|
||||
std::optional<uint64_t>
|
||||
getBlockProfileCount(const Function &F, const BlockNode &Node,
|
||||
bool AllowSynthetic = false) const;
|
||||
std::optional<uint64_t>
|
||||
getProfileCountFromFreq(const Function &F, BlockFrequency Freq,
|
||||
bool AllowSynthetic = false) const;
|
||||
std::optional<uint64_t> getBlockProfileCount(const Function &F,
|
||||
const BlockNode &Node) const;
|
||||
std::optional<uint64_t> getProfileCountFromFreq(const Function &F,
|
||||
BlockFrequency Freq) const;
|
||||
bool isIrrLoopHeader(const BlockNode &Node);
|
||||
|
||||
void setBlockFreq(const BlockNode &Node, BlockFrequency Freq);
|
||||
|
|
@ -1000,18 +998,14 @@ public:
|
|||
return BlockFrequencyInfoImplBase::getBlockFreq(getNode(BB));
|
||||
}
|
||||
|
||||
std::optional<uint64_t>
|
||||
getBlockProfileCount(const Function &F, const BlockT *BB,
|
||||
bool AllowSynthetic = false) const {
|
||||
return BlockFrequencyInfoImplBase::getBlockProfileCount(F, getNode(BB),
|
||||
AllowSynthetic);
|
||||
std::optional<uint64_t> getBlockProfileCount(const Function &F,
|
||||
const BlockT *BB) const {
|
||||
return BlockFrequencyInfoImplBase::getBlockProfileCount(F, getNode(BB));
|
||||
}
|
||||
|
||||
std::optional<uint64_t>
|
||||
getProfileCountFromFreq(const Function &F, BlockFrequency Freq,
|
||||
bool AllowSynthetic = false) const {
|
||||
return BlockFrequencyInfoImplBase::getProfileCountFromFreq(F, Freq,
|
||||
AllowSynthetic);
|
||||
std::optional<uint64_t> getProfileCountFromFreq(const Function &F,
|
||||
BlockFrequency Freq) const {
|
||||
return BlockFrequencyInfoImplBase::getProfileCountFromFreq(F, Freq);
|
||||
}
|
||||
|
||||
bool isIrrLoopHeader(const BlockT *BB) {
|
||||
|
|
|
|||
|
|
@ -207,7 +207,7 @@ BlockFrequencyInfo::getBlockProfileCount(const BasicBlock *BB,
|
|||
if (!BFI)
|
||||
return std::nullopt;
|
||||
|
||||
return BFI->getBlockProfileCount(*getFunction(), BB, AllowSynthetic);
|
||||
return BFI->getBlockProfileCount(*getFunction(), BB);
|
||||
}
|
||||
|
||||
std::optional<uint64_t>
|
||||
|
|
|
|||
|
|
@ -582,14 +582,14 @@ BlockFrequencyInfoImplBase::getBlockFreq(const BlockNode &Node) const {
|
|||
|
||||
std::optional<uint64_t>
|
||||
BlockFrequencyInfoImplBase::getBlockProfileCount(const Function &F,
|
||||
const BlockNode &Node,
|
||||
bool AllowSynthetic) const {
|
||||
return getProfileCountFromFreq(F, getBlockFreq(Node), AllowSynthetic);
|
||||
const BlockNode &Node) const {
|
||||
return getProfileCountFromFreq(F, getBlockFreq(Node));
|
||||
}
|
||||
|
||||
std::optional<uint64_t> BlockFrequencyInfoImplBase::getProfileCountFromFreq(
|
||||
const Function &F, BlockFrequency Freq, bool AllowSynthetic) const {
|
||||
auto EntryCount = F.getEntryCount(AllowSynthetic);
|
||||
std::optional<uint64_t>
|
||||
BlockFrequencyInfoImplBase::getProfileCountFromFreq(const Function &F,
|
||||
BlockFrequency Freq) const {
|
||||
auto EntryCount = F.getEntryCount();
|
||||
if (!EntryCount)
|
||||
return std::nullopt;
|
||||
// Use 128 bit APInt to do the arithmetic to avoid overflow.
|
||||
|
|
|
|||
Loading…
Reference in a new issue