[PATCH] D87802: [MBFIWrapper] Add a new function getBlockProfileCount

Guozhi Wei via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 12:00:54 PDT 2020


Carrot added inline comments.


================
Comment at: llvm/lib/CodeGen/MBFIWrapper.cpp:42
+
+  return MBFI.getBlockProfileCount(MBB);
+}
----------------
davidxl wrote:
> If the code reaches here, will the call simply return 0 (according to its implementation)?
See the function getBlockFreq and setBlockFreq, when code reaches here, it means MBB frequency is not changed, so its profile count is not impacted, so we can simply query the underlying MBFI for profile count.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D87802/new/

https://reviews.llvm.org/D87802



More information about the llvm-commits mailing list