OSDN Git Service

[llvm-mca] Add cycleBegin/cycleEnd callbacks to mca::Stage.
authorMatt Davis <Matthew.Davis@sony.com>
Thu, 12 Jul 2018 22:59:53 +0000 (22:59 +0000)
committerMatt Davis <Matthew.Davis@sony.com>
Thu, 12 Jul 2018 22:59:53 +0000 (22:59 +0000)
commit5c43c4ce5f126cfea39bec1d7ce42612340cdf49
tree6dc4226b20c86c8f5237605e9a1245869228ca6b
parentb9bc17351ee1bcf34b1c63555f3c262bcbb0e7ce
[llvm-mca] Add cycleBegin/cycleEnd callbacks to mca::Stage.

Summary:
This patch  clears up some of the semantics within the Stage class.  Now, preExecute
can be called multiple times per simulated cycle.  Previously preExecute was
only called once per cycle, and postExecute could have been called multiple
times.

Now, cycleStart/cycleEnd are called only once per simulated cycle.
preExecute/postExecute can be called multiple times per cycle.  This
occurs because multiple execution events can occur during a single cycle.

When stages are executed (Pipeline::runCycle), the postExecute hook will
be called only if all Stages return a success from their 'execute' callback.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb

Subscribers: tschuett, gbedwell, llvm-commits

Differential Revision: https://reviews.llvm.org/D49250

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336959 91177308-0d34-0410-b5e6-96231b3b80d8
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