[llvm-mca] Register listeners with stages; remove Pipeline dependency from Stage.
authorMatt Davis <Matthew.Davis@sony.com>
Wed, 27 Jun 2018 16:09:33 +0000 (16:09 +0000)
committerMatt Davis <Matthew.Davis@sony.com>
Wed, 27 Jun 2018 16:09:33 +0000 (16:09 +0000)
commit7b5a36ec72571607f6af3d12f72703fb27ad5677
tree482d7219401abb20d699f99016e13fe1f01f5956
parent7eb8119798b017b9b972f985b784d11f284c7024
[llvm-mca] Register listeners with  stages; remove Pipeline dependency from Stage.

Summary:
This patch removes a few callbacks from Pipeline.  It comes at the cost of
registering Listeners with all Stages.  Not all stages need listeners or issue
callbacks, this registration is a bit redundant.  However, as we build-out the
API, this redundancy can disappear.

The main purpose here is to move callback code from the Pipeline and into the
stages that actually issue those callbacks. This removes the back-pointer to
the Pipeline that was put into a few Stage subclasses.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb, courbet

Subscribers: tschuett, gbedwell, llvm-commits

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

llvm-svn: 335748
llvm/tools/llvm-mca/DispatchStage.cpp
llvm/tools/llvm-mca/DispatchStage.h
llvm/tools/llvm-mca/ExecuteStage.cpp
llvm/tools/llvm-mca/ExecuteStage.h
llvm/tools/llvm-mca/Pipeline.cpp
llvm/tools/llvm-mca/Pipeline.h
llvm/tools/llvm-mca/RetireStage.cpp
llvm/tools/llvm-mca/RetireStage.h
llvm/tools/llvm-mca/Stage.cpp
llvm/tools/llvm-mca/Stage.h
llvm/tools/llvm-mca/llvm-mca.cpp