[PATCH] D49250: [llvm-mca] Add cycleBegin/cycleEnd callbacks to mca::Stage.

Andrea Di Biagio via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 14:58:33 PDT 2018


andreadb accepted this revision.
andreadb added a comment.
This revision is now accepted and ready to land.

LGTM if you address the comments below.

Thanks!



================
Comment at: tools/llvm-mca/Stage.h:46
+  /// phase to prepare for the executions during the cycle.
+  virtual void cycleStart(unsigned Cycle) {}
+
----------------
The stage behaviour should never be dependent on the Cycle ID.
In practice (as expected) param Cycle is never used by any stage, and it can be safely removed.


================
Comment at: tools/llvm-mca/Stage.h:49
+  /// Called once at the end of each cycle.
+  virtual void cycleEnd(unsigned Cycle) {}
+
----------------
Same.


https://reviews.llvm.org/D49250





More information about the llvm-commits mailing list