llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT--> @llvm/pr-subscribers-llvm-analysis Author: Aiden Grossman (boomanaiden154) <details> <summary>Changes</summary> This was never set anywhere to something other than the default outside of the implementation and synthetic profile counts are slated for removal. --- Full diff: https://github.com/llvm/llvm-project/pull/204767.diff 3 Files Affected: - (modified) llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h (+10-16) - (modified) llvm/lib/Analysis/BlockFrequencyInfo.cpp (+1-1) - (modified) llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp (+6-6) ``````````diff diff --git a/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h b/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h index c21eeb56c632e..5db6efe9136ef 100644 --- a/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h +++ b/llvm/include/llvm/Analysis/BlockFrequencyInfoImpl.h @@ -521,12 +521,10 @@ class LLVM_ABI BlockFrequencyInfoImplBase { 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 @@ template <class BT> class BlockFrequencyInfoImpl : BlockFrequencyInfoImplBase { 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) { diff --git a/llvm/lib/Analysis/BlockFrequencyInfo.cpp b/llvm/lib/Analysis/BlockFrequencyInfo.cpp index df99ec299a409..9a2bd2c91d11a 100644 --- a/llvm/lib/Analysis/BlockFrequencyInfo.cpp +++ b/llvm/lib/Analysis/BlockFrequencyInfo.cpp @@ -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> diff --git a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp index 9f6e53ba15b6a..36af4f146ca42 100644 --- a/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp +++ b/llvm/lib/Analysis/BlockFrequencyInfoImpl.cpp @@ -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. `````````` </details> https://github.com/llvm/llvm-project/pull/204767 _______________________________________________ llvm-branch-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
