[PATCH] D22141: [BFI] Add option to lazily calculate BFI
Adam Nemet via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 8 15:05:38 PDT 2016
anemet added a comment.
In http://reviews.llvm.org/D22141#478534, @davidxl wrote:
> There are already too many classes related to BFI, so I am not a fan of introducing another LazyBFI.
> I suggest just making BFI lazy itself (when getBlockFreq() is first called ...). In fact I think the laziness handling should be in BlocFrequencyInfoImpl class. By so doing, MBFI can get the laziness automatically as well.
Moving it to MBFI, SGTM but I don't think that forcing the calculation of the frequencies in getBlockFreq is sufficient.
So just to be clear, you're suggesting sprinkling around in the code like this:
in getBlockFreq, getBlockProfileCount, setBlockFreq, getFloatingBlockFreq, print and printBlockFreq?
More information about the llvm-commits