llvm.org GIT mirror llvm / 5f68f0a
Revert [llvm-mca] Return the total number of cycles from method Pipeline::run(). This reverts commits 347767. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@347775 91177308-0d34-0410-b5e6-96231b3b80d8 Andrea Di Biagio 9 months ago
3 changed file(s) with 5 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
6666 public:
6767 Pipeline() : Cycles(0) {}
6868 void appendStage(std::unique_ptr S);
69
70 /// Returns the total number of simulated cycles.
71 Expected run();
72
69 Error run();
7370 void addEventListener(HWEventListener *Listener);
7471 };
7572 } // namespace mca
3434 });
3535 }
3636
37 Expected Pipeline::run() {
37 Error Pipeline::run() {
3838 assert(!Stages.empty() && "Unexpected empty pipeline found!");
3939
4040 do {
4545 ++Cycles;
4646 } while (hasWorkToProcess());
4747
48 return Cycles;
48 return ErrorSuccess();
4949 }
5050
5151 Error Pipeline::runCycle() {
239239 // Returns true on success.
240240 static bool runPipeline(mca::Pipeline &P) {
241241 // Handle pipeline errors here.
242 Expected Cycles = P.run();
243 if (!Cycles) {
244 WithColor::error() << toString(Cycles.takeError());
242 if (auto Err = P.run()) {
243 WithColor::error() << toString(std::move(Err));
245244 return false;
246245 }
247246 return true;