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

Matt Davis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 12 09:55:58 PDT 2018


mattd created this revision.
mattd added reviewers: andreadb, courbet, RKSimon.
Herald added subscribers: gbedwell, tschuett.

This patch removes the preExecute and postExecute callbacks, and introduces 
cycleStart/cycleEnd callbacks.

This clears up some of the semantics within the Stage class.  Previously preExecute was
only called once per cycle, and postExecute could have been called multiple
times.

cycleStart/cycleEnd are called only once per simulated cycle.
These new callbacks take the cycle number as input, while that value
is not needed at this time, I figured that future user-defined stages 
might find that data useful.

If we do want to keep pre/post execute callbacks around, I can introduce 
them (I have a separate patch), but I like this simpler version.


https://reviews.llvm.org/D49250

Files:
  tools/llvm-mca/DispatchStage.cpp
  tools/llvm-mca/DispatchStage.h
  tools/llvm-mca/ExecuteStage.cpp
  tools/llvm-mca/ExecuteStage.h
  tools/llvm-mca/FetchStage.cpp
  tools/llvm-mca/FetchStage.h
  tools/llvm-mca/Pipeline.cpp
  tools/llvm-mca/Pipeline.h
  tools/llvm-mca/RetireStage.cpp
  tools/llvm-mca/RetireStage.h
  tools/llvm-mca/Stage.h

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D49250.155201.patch
Type: text/x-patch
Size: 7547 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180712/4e3175d9/attachment.bin>


More information about the llvm-commits mailing list