[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:
Aiden Grossman 2026-06-23 20:13:58 +00:00 committed by GitHub
parent 5794f4e183
commit ee682b8b05
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 23 deletions

View file

@ -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) {

View file

@ -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>

View file

@ -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.