[PATCH] D37835: Add optional profile counts to block frequency dump.

Hiroshi Yamauchi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 13 16:44:13 PDT 2017


yamauchi added inline comments.


================
Comment at: include/llvm/Analysis/BlockFrequencyInfoImpl.h:1286
+        BlockFrequencyInfoImplBase::getBlockProfileCount(
+            *F->getFunction(), getNode(&BB)))
+      OS << ", count = " << ProfileCount.getValue();
----------------
davidxl wrote:
> can you just pass *F instead of *F->getFunction() ?
It requires Function* and F can be either Function* or MachineFunction*. MachineFunction isn't a subtype of Function. Do you see otherwise? I tried several ways to handle this issue with templates, but they didn't seem to work mainly because MachineFunction isn't fully defined in this header file and this is a template function that can't be moved to a .cpp file.


https://reviews.llvm.org/D37835





More information about the llvm-commits mailing list