OSDN Git Service

[llvm-mca] Simplify eventing by adding an onEvent templated method.
authorMatt Davis <Matthew.Davis@sony.com>
Thu, 12 Jul 2018 16:56:17 +0000 (16:56 +0000)
committerMatt Davis <Matthew.Davis@sony.com>
Thu, 12 Jul 2018 16:56:17 +0000 (16:56 +0000)
commite427001e40beae2f2450db97e7e9921c48dbc182
treedae05c13c89b97535ba12feb1a6830fae8924b2c
parent8840e88391b8e0a1322c05556d5f16dc30048a7e
[llvm-mca] Simplify eventing by adding an onEvent templated method.

Summary:
This patch eliminates some redundancy in iterating across Listeners for the
Instruction and Stall HWEvents, by introducing a template onEvent routine.
This change was suggested by @courbet in https://reviews.llvm.org/D48576.  I
 hope that this patch addresses that suggestion appropriately.  I do like this
change better than what we had previously.

Reviewers: andreadb, courbet, RKSimon

Reviewed By: andreadb, courbet

Subscribers: javed.absar, tschuett, gbedwell, llvm-commits, courbet

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@336916 91177308-0d34-0410-b5e6-96231b3b80d8
22 files changed:
tools/llvm-mca/DispatchStage.cpp
tools/llvm-mca/DispatchStage.h
tools/llvm-mca/DispatchStatistics.cpp
tools/llvm-mca/DispatchStatistics.h
tools/llvm-mca/ExecuteStage.cpp
tools/llvm-mca/HWEventListener.h
tools/llvm-mca/InstructionTables.cpp
tools/llvm-mca/RegisterFileStatistics.cpp
tools/llvm-mca/RegisterFileStatistics.h
tools/llvm-mca/ResourcePressureView.cpp
tools/llvm-mca/ResourcePressureView.h
tools/llvm-mca/RetireControlUnitStatistics.cpp
tools/llvm-mca/RetireControlUnitStatistics.h
tools/llvm-mca/RetireStage.cpp
tools/llvm-mca/SchedulerStatistics.cpp
tools/llvm-mca/SchedulerStatistics.h
tools/llvm-mca/Stage.cpp
tools/llvm-mca/Stage.h
tools/llvm-mca/SummaryView.cpp
tools/llvm-mca/SummaryView.h
tools/llvm-mca/TimelineView.cpp
tools/llvm-mca/TimelineView.h