Enable the resource pressure view. This is enabled by default.
+.. option:: -instruction-info
+
+ Enable the instruction info view. This is enabled by default.
+
.. option:: -instruction-tables
Prints resource pressure information based on the static information
--- /dev/null
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -resource-pressure=false -instruction-info=true < %s | FileCheck %s --check-prefix=ENABLED
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -resource-pressure=false -instruction-info=false < %s | FileCheck %s -check-prefix=DISABLED
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -resource-pressure=false -instruction-info < %s | FileCheck %s -check-prefix=ENABLED
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -resource-pressure=false < %s | FileCheck %s -check-prefix=ENABLED
+
+vmulps %xmm0, %xmm1, %xmm2
+vhaddps %xmm2, %xmm2, %xmm3
+vhaddps %xmm3, %xmm3, %xmm4
+
+# DISABLED-NOT: Instruction Info:
+
+# ENABLED: Instruction Info:
+# ENABLED-NEXT: [1]: #uOps
+# ENABLED-NEXT: [2]: Latency
+# ENABLED-NEXT: [3]: RThroughput
+# ENABLED-NEXT: [4]: MayLoad
+# ENABLED-NEXT: [5]: MayStore
+# ENABLED-NEXT: [6]: HasSideEffects
+
+# ENABLED: [1] [2] [3] [4] [5] [6] Instructions:
+# ENABLED-NEXT: 1 2 1.00 vmulps %xmm0, %xmm1, %xmm2
+# ENABLED-NEXT: 1 3 1.00 vhaddps %xmm2, %xmm2, %xmm3
+# ENABLED-NEXT: 1 3 1.00 vhaddps %xmm3, %xmm3, %xmm4
cl::desc("Print instruction tables"),
cl::init(false));
+static cl::opt<bool>
+ PrintInstructionInfoView("instruction-info",
+ cl::desc("Print the instruction info view"),
+ cl::init(true));
+
static const Target *getTarget(const char *ProgName) {
TripleName = Triple::normalize(TripleName);
if (TripleName.empty())
if (PrintInstructionTables) {
mca::InstructionTables IT(STI->getSchedModel(), *IB, *S);
+
+ if (PrintInstructionInfoView) {
+ mca::InstructionInfoView IIV(*STI, *MCII, *S, *IP);
+ IT.addEventListener(&IIV);
+ }
+
mca::ResourcePressureView RPV(*STI, *IP, *S);
- mca::InstructionInfoView IIV(*STI, *MCII, *S, *IP);
- IT.addEventListener(&IIV);
IT.addEventListener(&RPV);
IT.run();
RPV.printView(TOF->os());
Printer->addView(llvm::make_unique<mca::SummaryView>(*S, Width));
- Printer->addView(
- llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, *S, *IP));
+ if (PrintInstructionInfoView)
+ Printer->addView(
+ llvm::make_unique<mca::InstructionInfoView>(*STI, *MCII, *S, *IP));
if (PrintModeVerbose)
Printer->addView(llvm::make_unique<mca::BackendStatistics>(*STI));