[PATCH] D51903: [llvm-mca] Delay calculation of Cycles per Resources, separate the cycles and resource quantities.
Andrea Di Biagio via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 11 09:59:51 PDT 2018
andreadb accepted this revision.
andreadb added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: tools/llvm-mca/include/HWEventListener.h:64-65
using ResourceRef = std::pair<uint64_t, uint64_t>;
- HWInstructionIssuedEvent(const InstRef &IR,
- llvm::ArrayRef<std::pair<ResourceRef, double>> UR)
+ HWInstructionIssuedEvent(
+ const InstRef &IR,
+ llvm::ArrayRef<std::pair<ResourceRef, ResourceCycles>> UR)
----------------
You can probably add a `using` to give a name to type `std::pair<ResourceRef, ResourceCycles>`. I saw that it is used a few times (not just in this class). We should consider adding it if that makes code a bit more readable.
================
Comment at: tools/llvm-mca/include/Support.h:29
+/// ResourcePressureView to calculate the average resource cycles per
+/// instruction per iteration.
+class ResourceCycles {
----------------
per instruction/iteration.
https://reviews.llvm.org/D51903
More information about the llvm-commits
mailing list