From: Andrea Di Biagio Date: Fri, 24 May 2019 13:56:01 +0000 (+0000) Subject: [MCA] Zero-initialize field CRD in InstructionBase. Also run clang-format on a couple... X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=30d9035f31374f6a9ab8b2ca2b5d43191a92ace4;p=llvm [MCA] Zero-initialize field CRD in InstructionBase. Also run clang-format on a couple of files. NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@361637 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/MCA/Instruction.h b/include/llvm/MCA/Instruction.h index c4d0f6aace3..9ac1fffb443 100644 --- a/include/llvm/MCA/Instruction.h +++ b/include/llvm/MCA/Instruction.h @@ -256,8 +256,8 @@ class ReadState { public: ReadState(const ReadDescriptor &Desc, unsigned RegID) : RD(&Desc), RegisterID(RegID), PRFID(0), DependentWrites(0), - CyclesLeft(UNKNOWN_CYCLES), TotalCycles(0), CRD(), - IsReady(true), IsZero(false), IndependentFromDef(false) {} + CyclesLeft(UNKNOWN_CYCLES), TotalCycles(0), CRD(), IsReady(true), + IsZero(false), IndependentFromDef(false) {} const ReadDescriptor &getDescriptor() const { return *RD; } unsigned getSchedClass() const { return RD->SchedClassID; } @@ -409,7 +409,8 @@ class InstructionBase { CriticalRegDep CRD; public: - InstructionBase(const InstrDesc &D) : Desc(D), IsOptimizableMove(false) {} + InstructionBase(const InstrDesc &D) + : Desc(D), IsOptimizableMove(false), CRD() {} SmallVectorImpl &getDefs() { return Defs; } const ArrayRef getDefs() const { return Defs; } diff --git a/tools/llvm-mca/llvm-mca.cpp b/tools/llvm-mca/llvm-mca.cpp index e70c8f627ef..8ce1d03c785 100644 --- a/tools/llvm-mca/llvm-mca.cpp +++ b/tools/llvm-mca/llvm-mca.cpp @@ -68,8 +68,9 @@ static cl::opt OutputFilename("o", cl::desc("Output filename"), cl::value_desc("filename")); static cl::opt - ArchName("march", cl::desc("Target architecture. " - "See -version for available targets"), + ArchName("march", + cl::desc("Target architecture. " + "See -version for available targets"), cl::cat(ToolOptions)); static cl::opt @@ -441,8 +442,8 @@ int main(int argc, char **argv) { WithColor::error() << IE.Message << '\n'; IP->printInst(&IE.Inst, SS, "", *STI); SS.flush(); - WithColor::note() << "instruction: " << InstructionStr - << '\n'; + WithColor::note() + << "instruction: " << InstructionStr << '\n'; })) { // Default case. WithColor::error() << toString(std::move(NewE)); @@ -482,8 +483,8 @@ int main(int argc, char **argv) { mca::PipelinePrinter Printer(*P); if (PrintSummaryView) - Printer.addView(llvm::make_unique( - SM, Insts, DispatchWidth)); + Printer.addView( + llvm::make_unique(SM, Insts, DispatchWidth)); if (EnableBottleneckAnalysis) Printer.addView(llvm::make_unique(SM));