From 2a8c1fd20b992c0610c0a16dc9bb375b9c85b827 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 3 Jun 2023 09:37:39 -0700 Subject: [PATCH] [MCA] Modernize Pipeline (NFC) --- llvm/include/llvm/MCA/Pipeline.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/include/llvm/MCA/Pipeline.h b/llvm/include/llvm/MCA/Pipeline.h index 92c3836..18032fd 100644 --- a/llvm/include/llvm/MCA/Pipeline.h +++ b/llvm/include/llvm/MCA/Pipeline.h @@ -56,12 +56,12 @@ class Pipeline { Started, // Pipeline has started running. Paused // Pipeline is paused. }; - State CurrentState; + State CurrentState = State::Created; /// An ordered list of stages that define this instruction pipeline. SmallVector, 8> Stages; std::set Listeners; - unsigned Cycles; + unsigned Cycles = 0; Error runCycle(); bool hasWorkToProcess(); @@ -69,7 +69,7 @@ class Pipeline { void notifyCycleEnd(); public: - Pipeline() : CurrentState(State::Created), Cycles(0) {} + Pipeline() = default; void appendStage(std::unique_ptr S); /// Returns the total number of simulated cycles. -- 2.7.4