OSDN Git Service

Reapply "[llvm-mca] Return the total number of cycles from method Pipeline::run()."
authorAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 28 Nov 2018 19:31:19 +0000 (19:31 +0000)
committerAndrea Di Biagio <Andrea_DiBiagio@sn.scee.net>
Wed, 28 Nov 2018 19:31:19 +0000 (19:31 +0000)
commit3d1a12c18cbd1d0e1e156719aa7c4d80b5115889
tree043bdd6ba11bfecc2cc0c5f7234b358c1acefde4
parentd5ee5db9d4a572098ec541c28aac9278a647f0ac
Reapply "[llvm-mca] Return the total number of cycles from method Pipeline::run()."

This reapplies r347767 (originally reviewed at: https://reviews.llvm.org/D55000)
with a fix for the missing std::move of the Error returned by the call to
Pipeline::runCycle().

Below is the original commit message from r347767.

If a user only cares about the overall latency, then the best/quickest way is to
change method Pipeline::run() so that it returns the total number of cycles to
the caller.

When the simulation pipeline is run, the number of cycles (or an error) is
returned from method Pipeline::run().
The advantage is that no hardware event listener is needed for computing that
latency. So, the whole process should be faster (and simpler - at least for that
particular use case).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347795 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-mca/include/Pipeline.h
tools/llvm-mca/lib/Pipeline.cpp
tools/llvm-mca/llvm-mca.cpp