diff options
Diffstat (limited to 'llvm/tools/llvm-mca/llvm-mca.cpp')
-rw-r--r-- | llvm/tools/llvm-mca/llvm-mca.cpp | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/llvm/tools/llvm-mca/llvm-mca.cpp b/llvm/tools/llvm-mca/llvm-mca.cpp index 0501336..1826491 100644 --- a/llvm/tools/llvm-mca/llvm-mca.cpp +++ b/llvm/tools/llvm-mca/llvm-mca.cpp @@ -219,6 +219,11 @@ static cl::opt<bool> ShowEncoding( cl::desc("Print encoding information in the instruction info view"), cl::cat(ViewOptions), cl::init(false)); +static cl::opt<bool> ShowBarriers( + "show-barriers", + cl::desc("Print memory barrier information in the instruction info view"), + cl::cat(ViewOptions), cl::init(false)); + static cl::opt<bool> DisableCustomBehaviour( "disable-cb", cl::desc( @@ -504,7 +509,7 @@ int main(int argc, char **argv) { // (which does nothing). IPP = std::make_unique<mca::InstrPostProcess>(*STI, *MCII); - std::vector<std::unique_ptr<mca::Instruction>> LoweredSequence; + SmallVector<std::unique_ptr<mca::Instruction>> LoweredSequence; for (const MCInst &MCI : Insts) { Expected<std::unique_ptr<mca::Instruction>> Inst = IB.createInstruction(MCI); @@ -548,7 +553,8 @@ int main(int argc, char **argv) { // Create the views for this pipeline, execute, and emit a report. if (PrintInstructionInfoView) { Printer.addView(std::make_unique<mca::InstructionInfoView>( - *STI, *MCII, CE, ShowEncoding, Insts, *IP)); + *STI, *MCII, CE, ShowEncoding, Insts, *IP, LoweredSequence, + ShowBarriers)); } Printer.addView( std::make_unique<mca::ResourcePressureView>(*STI, *IP, Insts)); @@ -624,7 +630,8 @@ int main(int argc, char **argv) { if (PrintInstructionInfoView) Printer.addView(std::make_unique<mca::InstructionInfoView>( - *STI, *MCII, CE, ShowEncoding, Insts, *IP)); + *STI, *MCII, CE, ShowEncoding, Insts, *IP, LoweredSequence, + ShowBarriers)); // Fetch custom Views that are to be placed after the InstructionInfoView. // Refer to the comment paired with the CB->getStartViews(*IP, Insts); line |