[llvm] [LV] Mark functions in legacy cost model const (NFC) (PR #216282)
Florian Hahn via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 14 02:25:03 PDT 2026
================
@@ -2496,8 +2488,8 @@ uint64_t LoopVectorizationCostModel::getPredBlockCostDivisor(
return 1;
uint64_t HeaderFreq =
- getBFI().getBlockFreq(TheLoop->getHeader()).getFrequency();
- uint64_t BBFreq = getBFI().getBlockFreq(BB).getFrequency();
+ GetBFI().getBlockFreq(TheLoop->getHeader()).getFrequency();
----------------
fhahn wrote:
> /// Returns the BlockFrequencyInfo for the function if cached, otherwise
> /// fetches it via GetBFI. Avoids an indirect call to the std::function.
I think the comment still applies, we need to go through `std::function` on each call?
https://github.com/llvm/llvm-project/pull/216282
More information about the llvm-commits
mailing list