diff options
| author | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-11-28 16:39:48 +0000 | 
|---|---|---|
| committer | Andrea Di Biagio <Andrea_DiBiagio@sn.scee.net> | 2018-11-28 16:39:48 +0000 | 
| commit | 7368fe42075629dc0f446eddfad3eee015297dbb (patch) | |
| tree | 5486a29cf5357fdf77c5f2d11828fbbced6a0555 /llvm/tools/llvm-mca | |
| parent | 893e5bc77484e93d7219eb5aef3534cbe6a14bb5 (diff) | |
| download | bcm5719-llvm-7368fe42075629dc0f446eddfad3eee015297dbb.tar.gz bcm5719-llvm-7368fe42075629dc0f446eddfad3eee015297dbb.zip  | |
Revert [llvm-mca] Return the total number of cycles from method Pipeline::run().
This reverts commits 347767.
llvm-svn: 347775
Diffstat (limited to 'llvm/tools/llvm-mca')
| -rw-r--r-- | llvm/tools/llvm-mca/include/Pipeline.h | 5 | ||||
| -rw-r--r-- | llvm/tools/llvm-mca/lib/Pipeline.cpp | 4 | ||||
| -rw-r--r-- | llvm/tools/llvm-mca/llvm-mca.cpp | 5 | 
3 files changed, 5 insertions, 9 deletions
diff --git a/llvm/tools/llvm-mca/include/Pipeline.h b/llvm/tools/llvm-mca/include/Pipeline.h index 0fd40264569..47ff07b2882 100644 --- a/llvm/tools/llvm-mca/include/Pipeline.h +++ b/llvm/tools/llvm-mca/include/Pipeline.h @@ -67,10 +67,7 @@ class Pipeline {  public:    Pipeline() : Cycles(0) {}    void appendStage(std::unique_ptr<Stage> S); - -  /// Returns the total number of simulated cycles. -  Expected<unsigned> run(); - +  Error run();    void addEventListener(HWEventListener *Listener);  };  } // namespace mca diff --git a/llvm/tools/llvm-mca/lib/Pipeline.cpp b/llvm/tools/llvm-mca/lib/Pipeline.cpp index 0f91060ef3f..309f415913d 100644 --- a/llvm/tools/llvm-mca/lib/Pipeline.cpp +++ b/llvm/tools/llvm-mca/lib/Pipeline.cpp @@ -35,7 +35,7 @@ bool Pipeline::hasWorkToProcess() {    });  } -Expected<unsigned> Pipeline::run() { +Error Pipeline::run() {    assert(!Stages.empty() && "Unexpected empty pipeline found!");    do { @@ -46,7 +46,7 @@ Expected<unsigned> Pipeline::run() {      ++Cycles;    } while (hasWorkToProcess()); -  return Cycles; +  return ErrorSuccess();  }  Error Pipeline::runCycle() { diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index 985889677de..8b792be0101 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -240,9 +240,8 @@ static void processViewOptions() {  // Returns true on success.  static bool runPipeline(mca::Pipeline &P) {    // Handle pipeline errors here. -  Expected<unsigned> Cycles = P.run(); -  if (!Cycles) { -    WithColor::error() << toString(Cycles.takeError()); +  if (auto Err = P.run()) { +    WithColor::error() << toString(std::move(Err));      return false;    }    return true;  | 

