[PATCH] D28535: Scale frequencies of a set of blocks
Chandler Carruth via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 10 15:03:33 PST 2017
chandlerc added inline comments.
================
Comment at: lib/Analysis/BlockFrequencyInfo.cpp:182
+ for (auto *BB : BlocksToScale) {
+
+ APInt BBFreq(128, BFI->getBlockFreq(BB).getFrequency());
----------------
Extraneous blank line.
================
Comment at: lib/Analysis/BlockFrequencyInfo.cpp:183
+
+ APInt BBFreq(128, BFI->getBlockFreq(BB).getFrequency());
+
----------------
This does 2+N heap allocations where N is the number of basic blocks passed in.... Can we do something more efficient?
Can we use some of the other scaling infrastructure that is already used in BFI such as ScaledNumber?
At the very least, please don't declare a new APInt inside the loop.
https://reviews.llvm.org/D28535
More information about the llvm-commits
mailing list