Index: test/tools/llvm-mca/X86/option-all-stats-1.s =================================================================== --- test/tools/llvm-mca/X86/option-all-stats-1.s +++ test/tools/llvm-mca/X86/option-all-stats-1.s @@ -1,8 +1,8 @@ # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=FULLREPORT # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats=true < %s | FileCheck %s -check-prefix=ALL -check-prefix=FULLREPORT -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats=false < %s | FileCheck %s -check-prefix=ALL -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 < %s | FileCheck %s -check-prefix=ALL +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=NOREPORT +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 < %s | FileCheck %s -check-prefix=ALL -check-prefix=DEFAULT add %eax, %eax @@ -35,12 +35,60 @@ # FULLREPORT-NEXT: SQ - Store queue full: 0 # FULLREPORT-NEXT: GROUP - Static restrictions on the dispatch group: 0 +# DEFAULT: Resources: +# DEFAULT-NEXT: [0] - JALU0 +# DEFAULT-NEXT: [1] - JALU1 +# DEFAULT-NEXT: [2] - JDiv +# DEFAULT-NEXT: [3] - JFPA +# DEFAULT-NEXT: [4] - JFPM +# DEFAULT-NEXT: [5] - JFPU0 +# DEFAULT-NEXT: [6] - JFPU1 +# DEFAULT-NEXT: [7] - JLAGU +# DEFAULT-NEXT: [8] - JMul +# DEFAULT-NEXT: [9] - JSAGU +# DEFAULT-NEXT: [10] - JSTC +# DEFAULT-NEXT: [11] - JVALU0 +# DEFAULT-NEXT: [12] - JVALU1 +# DEFAULT-NEXT: [13] - JVIMUL + +# NOREPORT: Resources: +# NOREPORT-NEXT: [0] - JALU0 +# NOREPORT-NEXT: [1] - JALU1 +# NOREPORT-NEXT: [2] - JDiv +# NOREPORT-NEXT: [3] - JFPA +# NOREPORT-NEXT: [4] - JFPM +# NOREPORT-NEXT: [5] - JFPU0 +# NOREPORT-NEXT: [6] - JFPU1 +# NOREPORT-NEXT: [7] - JLAGU +# NOREPORT-NEXT: [8] - JMul +# NOREPORT-NEXT: [9] - JSAGU +# NOREPORT-NEXT: [10] - JSTC +# NOREPORT-NEXT: [11] - JVALU0 +# NOREPORT-NEXT: [12] - JVALU1 +# NOREPORT-NEXT: [13] - JVIMUL + # FULLREPORT: Dispatch Logic - number of cycles where we saw N micro opcodes dispatched: # FULLREPORT-NEXT: [# dispatched], [# cycles] # FULLREPORT-NEXT: 0, 22 (21.4%) # FULLREPORT-NEXT: 1, 62 (60.2%) # FULLREPORT-NEXT: 2, 19 (18.4%) +# DEFAULT: Resource pressure per iteration: +# DEFAULT-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] +# DEFAULT-NEXT: 0.50 0.50 - - - - - - - - - - - - + +# NOREPORT: Resource pressure per iteration: +# NOREPORT-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] +# NOREPORT-NEXT: 0.50 0.50 - - - - - - - - - - - - + +# DEFAULT: Resource pressure by instruction: +# DEFAULT-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: +# DEFAULT-NEXT: 0.50 0.50 - - - - - - - - - - - - addl %eax, %eax + +# NOREPORT: Resource pressure by instruction: +# NOREPORT-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: +# NOREPORT-NEXT: 0.50 0.50 - - - - - - - - - - - - addl %eax, %eax + # FULLREPORT: Schedulers - number of cycles where we saw N instructions issued: # FULLREPORT-NEXT: [# issued], [# cycles] # FULLREPORT-NEXT: 0, 3 (2.9%) Index: test/tools/llvm-mca/X86/option-all-stats-2.s =================================================================== --- test/tools/llvm-mca/X86/option-all-stats-2.s +++ test/tools/llvm-mca/X86/option-all-stats-2.s @@ -1,102 +1,161 @@ # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats -dispatch-stats=false < %s | FileCheck %s -check-prefix=ALL -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=FULL -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats -dispatch-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=FULL -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -dispatch-stats -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=FULL -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -dispatch-stats=false -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=FULL +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats -dispatch-stats=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=NODISPATCH +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=DISPATCH +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-stats -dispatch-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=DISPATCH +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -dispatch-stats -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=DISPATCH +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -dispatch-stats=false -all-stats < %s | FileCheck %s -check-prefix=ALL -check-prefix=DISPATCH add %eax, %eax -# ALL: Iterations: 100 -# ALL-NEXT: Instructions: 100 -# ALL-NEXT: Total Cycles: 103 -# ALL-NEXT: Total uOps: 100 - -# ALL: Dispatch Width: 2 -# ALL-NEXT: uOps Per Cycle: 0.97 -# ALL-NEXT: IPC: 0.97 -# ALL-NEXT: Block RThroughput: 0.5 - -# ALL: Instruction Info: -# ALL-NEXT: [1]: #uOps -# ALL-NEXT: [2]: Latency -# ALL-NEXT: [3]: RThroughput -# ALL-NEXT: [4]: MayLoad -# ALL-NEXT: [5]: MayStore -# ALL-NEXT: [6]: HasSideEffects (U) - -# ALL: [1] [2] [3] [4] [5] [6] Instructions: -# ALL-NEXT: 1 1 0.50 addl %eax, %eax - -# FULL: Dynamic Dispatch Stall Cycles: -# FULL-NEXT: RAT - Register unavailable: 0 -# FULL-NEXT: RCU - Retire tokens unavailable: 0 -# FULL-NEXT: SCHEDQ - Scheduler full: 61 (59.2%) -# FULL-NEXT: LQ - Load queue full: 0 -# FULL-NEXT: SQ - Store queue full: 0 -# FULL-NEXT: GROUP - Static restrictions on the dispatch group: 0 - -# FULL: Dispatch Logic - number of cycles where we saw N micro opcodes dispatched: -# FULL-NEXT: [# dispatched], [# cycles] -# FULL-NEXT: 0, 22 (21.4%) -# FULL-NEXT: 1, 62 (60.2%) -# FULL-NEXT: 2, 19 (18.4%) - -# FULL: Schedulers - number of cycles where we saw N instructions issued: -# FULL-NEXT: [# issued], [# cycles] -# FULL-NEXT: 0, 3 (2.9%) -# FULL-NEXT: 1, 100 (97.1%) - -# FULL: Scheduler's queue usage: -# FULL-NEXT: [1] Resource name. -# FULL-NEXT: [2] Average number of used buffer entries. -# FULL-NEXT: [3] Maximum number of used buffer entries. -# FULL-NEXT: [4] Total number of buffer entries. - -# FULL: [1] [2] [3] [4] -# FULL-NEXT: JALU01 15 20 20 -# FULL-NEXT: JFPU01 0 0 18 -# FULL-NEXT: JLSAGU 0 0 12 - -# FULL: Retire Control Unit - number of cycles where we saw N instructions retired: -# FULL-NEXT: [# retired], [# cycles] -# FULL-NEXT: 0, 3 (2.9%) -# FULL-NEXT: 1, 100 (97.1%) - -# FULL: Register File statistics: -# FULL-NEXT: Total number of mappings created: 200 -# FULL-NEXT: Max number of mappings used: 44 - -# FULL: * Register File #1 -- JFpuPRF: -# FULL-NEXT: Number of physical registers: 72 -# FULL-NEXT: Total number of mappings created: 0 -# FULL-NEXT: Max number of mappings used: 0 - -# FULL: * Register File #2 -- JIntegerPRF: -# FULL-NEXT: Number of physical registers: 64 -# FULL-NEXT: Total number of mappings created: 200 -# FULL-NEXT: Max number of mappings used: 44 - -# FULL: Resources: -# FULL-NEXT: [0] - JALU0 -# FULL-NEXT: [1] - JALU1 -# FULL-NEXT: [2] - JDiv -# FULL-NEXT: [3] - JFPA -# FULL-NEXT: [4] - JFPM -# FULL-NEXT: [5] - JFPU0 -# FULL-NEXT: [6] - JFPU1 -# FULL-NEXT: [7] - JLAGU -# FULL-NEXT: [8] - JMul -# FULL-NEXT: [9] - JSAGU -# FULL-NEXT: [10] - JSTC -# FULL-NEXT: [11] - JVALU0 -# FULL-NEXT: [12] - JVALU1 -# FULL-NEXT: [13] - JVIMUL - -# FULL: Resource pressure per iteration: -# FULL-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] -# FULL-NEXT: 0.50 0.50 - - - - - - - - - - - - - -# FULL: Resource pressure by instruction: -# FULL-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: -# FULL-NEXT: 0.50 0.50 - - - - - - - - - - - - addl %eax, %eax +# ALL: Iterations: 100 +# ALL-NEXT: Instructions: 100 +# ALL-NEXT: Total Cycles: 103 +# ALL-NEXT: Total uOps: 100 + +# ALL: Dispatch Width: 2 +# ALL-NEXT: uOps Per Cycle: 0.97 +# ALL-NEXT: IPC: 0.97 +# ALL-NEXT: Block RThroughput: 0.5 + +# ALL: Instruction Info: +# ALL-NEXT: [1]: #uOps +# ALL-NEXT: [2]: Latency +# ALL-NEXT: [3]: RThroughput +# ALL-NEXT: [4]: MayLoad +# ALL-NEXT: [5]: MayStore +# ALL-NEXT: [6]: HasSideEffects (U) + +# ALL: [1] [2] [3] [4] [5] [6] Instructions: +# ALL-NEXT: 1 1 0.50 addl %eax, %eax + +# DISPATCH: Dynamic Dispatch Stall Cycles: +# DISPATCH-NEXT: RAT - Register unavailable: 0 +# DISPATCH-NEXT: RCU - Retire tokens unavailable: 0 +# DISPATCH-NEXT: SCHEDQ - Scheduler full: 61 (59.2%) +# DISPATCH-NEXT: LQ - Load queue full: 0 +# DISPATCH-NEXT: SQ - Store queue full: 0 +# DISPATCH-NEXT: GROUP - Static restrictions on the dispatch group: 0 + +# NODISPATCH: Schedulers - number of cycles where we saw N instructions issued: +# NODISPATCH-NEXT: [# issued], [# cycles] +# NODISPATCH-NEXT: 0, 3 (2.9%) +# NODISPATCH-NEXT: 1, 100 (97.1%) + +# DISPATCH: Dispatch Logic - number of cycles where we saw N micro opcodes dispatched: +# DISPATCH-NEXT: [# dispatched], [# cycles] +# DISPATCH-NEXT: 0, 22 (21.4%) +# DISPATCH-NEXT: 1, 62 (60.2%) +# DISPATCH-NEXT: 2, 19 (18.4%) + +# NODISPATCH: Scheduler's queue usage: +# NODISPATCH-NEXT: [1] Resource name. +# NODISPATCH-NEXT: [2] Average number of used buffer entries. +# NODISPATCH-NEXT: [3] Maximum number of used buffer entries. +# NODISPATCH-NEXT: [4] Total number of buffer entries. + +# NODISPATCH: [1] [2] [3] [4] +# NODISPATCH-NEXT: JALU01 15 20 20 +# NODISPATCH-NEXT: JFPU01 0 0 18 +# NODISPATCH-NEXT: JLSAGU 0 0 12 + +# DISPATCH: Schedulers - number of cycles where we saw N instructions issued: +# DISPATCH-NEXT: [# issued], [# cycles] +# DISPATCH-NEXT: 0, 3 (2.9%) +# DISPATCH-NEXT: 1, 100 (97.1%) + +# NODISPATCH: Retire Control Unit - number of cycles where we saw N instructions retired: +# NODISPATCH-NEXT: [# retired], [# cycles] +# NODISPATCH-NEXT: 0, 3 (2.9%) +# NODISPATCH-NEXT: 1, 100 (97.1%) + +# DISPATCH: Scheduler's queue usage: +# DISPATCH-NEXT: [1] Resource name. +# DISPATCH-NEXT: [2] Average number of used buffer entries. +# DISPATCH-NEXT: [3] Maximum number of used buffer entries. +# DISPATCH-NEXT: [4] Total number of buffer entries. + +# DISPATCH: [1] [2] [3] [4] +# DISPATCH-NEXT: JALU01 15 20 20 +# DISPATCH-NEXT: JFPU01 0 0 18 +# DISPATCH-NEXT: JLSAGU 0 0 12 + +# NODISPATCH: Register File statistics: +# NODISPATCH-NEXT: Total number of mappings created: 200 +# NODISPATCH-NEXT: Max number of mappings used: 44 + +# NODISPATCH: * Register File #1 -- JFpuPRF: +# NODISPATCH-NEXT: Number of physical registers: 72 +# NODISPATCH-NEXT: Total number of mappings created: 0 +# NODISPATCH-NEXT: Max number of mappings used: 0 + +# DISPATCH: Retire Control Unit - number of cycles where we saw N instructions retired: +# DISPATCH-NEXT: [# retired], [# cycles] +# DISPATCH-NEXT: 0, 3 (2.9%) +# DISPATCH-NEXT: 1, 100 (97.1%) + +# NODISPATCH: * Register File #2 -- JIntegerPRF: +# NODISPATCH-NEXT: Number of physical registers: 64 +# NODISPATCH-NEXT: Total number of mappings created: 200 +# NODISPATCH-NEXT: Max number of mappings used: 44 + +# DISPATCH: Register File statistics: +# DISPATCH-NEXT: Total number of mappings created: 200 +# DISPATCH-NEXT: Max number of mappings used: 44 + +# DISPATCH: * Register File #1 -- JFpuPRF: +# DISPATCH-NEXT: Number of physical registers: 72 +# DISPATCH-NEXT: Total number of mappings created: 0 +# DISPATCH-NEXT: Max number of mappings used: 0 + +# NODISPATCH: Resources: +# NODISPATCH-NEXT: [0] - JALU0 +# NODISPATCH-NEXT: [1] - JALU1 +# NODISPATCH-NEXT: [2] - JDiv +# NODISPATCH-NEXT: [3] - JFPA +# NODISPATCH-NEXT: [4] - JFPM +# NODISPATCH-NEXT: [5] - JFPU0 +# NODISPATCH-NEXT: [6] - JFPU1 +# NODISPATCH-NEXT: [7] - JLAGU +# NODISPATCH-NEXT: [8] - JMul +# NODISPATCH-NEXT: [9] - JSAGU +# NODISPATCH-NEXT: [10] - JSTC +# NODISPATCH-NEXT: [11] - JVALU0 +# NODISPATCH-NEXT: [12] - JVALU1 +# NODISPATCH-NEXT: [13] - JVIMUL + +# DISPATCH: * Register File #2 -- JIntegerPRF: +# DISPATCH-NEXT: Number of physical registers: 64 +# DISPATCH-NEXT: Total number of mappings created: 200 +# DISPATCH-NEXT: Max number of mappings used: 44 + +# NODISPATCH: Resource pressure per iteration: +# NODISPATCH-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] +# NODISPATCH-NEXT: 0.50 0.50 - - - - - - - - - - - - + +# NODISPATCH: Resource pressure by instruction: +# NODISPATCH-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: +# NODISPATCH-NEXT: 0.50 0.50 - - - - - - - - - - - - addl %eax, %eax + +# DISPATCH: Resources: +# DISPATCH-NEXT: [0] - JALU0 +# DISPATCH-NEXT: [1] - JALU1 +# DISPATCH-NEXT: [2] - JDiv +# DISPATCH-NEXT: [3] - JFPA +# DISPATCH-NEXT: [4] - JFPM +# DISPATCH-NEXT: [5] - JFPU0 +# DISPATCH-NEXT: [6] - JFPU1 +# DISPATCH-NEXT: [7] - JLAGU +# DISPATCH-NEXT: [8] - JMul +# DISPATCH-NEXT: [9] - JSAGU +# DISPATCH-NEXT: [10] - JSTC +# DISPATCH-NEXT: [11] - JVALU0 +# DISPATCH-NEXT: [12] - JVALU1 +# DISPATCH-NEXT: [13] - JVIMUL + +# DISPATCH: Resource pressure per iteration: +# DISPATCH-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] +# DISPATCH-NEXT: 0.50 0.50 - - - - - - - - - - - - + +# DISPATCH: Resource pressure by instruction: +# DISPATCH-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: +# DISPATCH-NEXT: 0.50 0.50 - - - - - - - - - - - - addl %eax, %eax Index: test/tools/llvm-mca/X86/option-all-views-1.s =================================================================== --- test/tools/llvm-mca/X86/option-all-views-1.s +++ test/tools/llvm-mca/X86/option-all-views-1.s @@ -1,33 +1,33 @@ # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views < %s | FileCheck %s -check-prefix=DEFAULTREPORT -check-prefix=FULLREPORT -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=true < %s | FileCheck %s -check-prefix=DEFAULTREPORT -check-prefix=FULLREPORT +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views < %s | FileCheck %s -check-prefix=REPORT -check-prefix=FULLREPORT +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=true < %s | FileCheck %s -check-prefix=REPORT -check-prefix=FULLREPORT # RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -all-views=false < %s | FileCheck %s -check-prefix=NOREPORT -allow-empty -# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 < %s | FileCheck %s -check-prefix=DEFAULTREPORT +# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 < %s | FileCheck %s -check-prefix=REPORT -check-prefix=DEFAULTREPORT add %eax, %eax # NOREPORT-NOT: {{.}} -# DEFAULTREPORT: Iterations: 100 -# DEFAULTREPORT-NEXT: Instructions: 100 -# DEFAULTREPORT-NEXT: Total Cycles: 103 -# DEFAULTREPORT-NEXT: Total uOps: 100 +# REPORT: Iterations: 100 +# REPORT-NEXT: Instructions: 100 +# REPORT-NEXT: Total Cycles: 103 +# REPORT-NEXT: Total uOps: 100 -# DEFAULTREPORT: Dispatch Width: 2 -# DEFAULTREPORT-NEXT: uOps Per Cycle: 0.97 -# DEFAULTREPORT-NEXT: IPC: 0.97 -# DEFAULTREPORT-NEXT: Block RThroughput: 0.5 +# REPORT: Dispatch Width: 2 +# REPORT-NEXT: uOps Per Cycle: 0.97 +# REPORT-NEXT: IPC: 0.97 +# REPORT-NEXT: Block RThroughput: 0.5 -# DEFAULTREPORT: Instruction Info: -# DEFAULTREPORT-NEXT: [1]: #uOps -# DEFAULTREPORT-NEXT: [2]: Latency -# DEFAULTREPORT-NEXT: [3]: RThroughput -# DEFAULTREPORT-NEXT: [4]: MayLoad -# DEFAULTREPORT-NEXT: [5]: MayStore -# DEFAULTREPORT-NEXT: [6]: HasSideEffects (U) +# REPORT: Instruction Info: +# REPORT-NEXT: [1]: #uOps +# REPORT-NEXT: [2]: Latency +# REPORT-NEXT: [3]: RThroughput +# REPORT-NEXT: [4]: MayLoad +# REPORT-NEXT: [5]: MayStore +# REPORT-NEXT: [6]: HasSideEffects (U) -# DEFAULTREPORT: [1] [2] [3] [4] [5] [6] Instructions: -# DEFAULTREPORT-NEXT: 1 1 0.50 addl %eax, %eax +# REPORT: [1] [2] [3] [4] [5] [6] Instructions: +# REPORT-NEXT: 1 1 0.50 addl %eax, %eax # FULLREPORT: Dynamic Dispatch Stall Cycles: # FULLREPORT-NEXT: RAT - Register unavailable: 0 @@ -37,12 +37,36 @@ # FULLREPORT-NEXT: SQ - Store queue full: 0 # FULLREPORT-NEXT: GROUP - Static restrictions on the dispatch group: 0 +# DEFAULTREPORT: Resources: +# DEFAULTREPORT-NEXT: [0] - JALU0 +# DEFAULTREPORT-NEXT: [1] - JALU1 +# DEFAULTREPORT-NEXT: [2] - JDiv +# DEFAULTREPORT-NEXT: [3] - JFPA +# DEFAULTREPORT-NEXT: [4] - JFPM +# DEFAULTREPORT-NEXT: [5] - JFPU0 +# DEFAULTREPORT-NEXT: [6] - JFPU1 +# DEFAULTREPORT-NEXT: [7] - JLAGU +# DEFAULTREPORT-NEXT: [8] - JMul +# DEFAULTREPORT-NEXT: [9] - JSAGU +# DEFAULTREPORT-NEXT: [10] - JSTC +# DEFAULTREPORT-NEXT: [11] - JVALU0 +# DEFAULTREPORT-NEXT: [12] - JVALU1 +# DEFAULTREPORT-NEXT: [13] - JVIMUL + # FULLREPORT: Dispatch Logic - number of cycles where we saw N micro opcodes dispatched: # FULLREPORT-NEXT: [# dispatched], [# cycles] # FULLREPORT-NEXT: 0, 22 (21.4%) # FULLREPORT-NEXT: 1, 62 (60.2%) # FULLREPORT-NEXT: 2, 19 (18.4%) +# DEFAULTREPORT: Resource pressure per iteration: +# DEFAULTREPORT-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] +# DEFAULTREPORT-NEXT: 0.50 0.50 - - - - - - - - - - - - + +# DEFAULTREPORT: Resource pressure by instruction: +# DEFAULTREPORT-NEXT: [0] [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] Instructions: +# DEFAULTREPORT-NEXT: 0.50 0.50 - - - - - - - - - - - - addl %eax, %eax + # FULLREPORT: Schedulers - number of cycles where we saw N instructions issued: # FULLREPORT-NEXT: [# issued], [# cycles] # FULLREPORT-NEXT: 0, 3 (2.9%) Index: test/tools/llvm-mca/X86/register-file-statistics.s =================================================================== --- test/tools/llvm-mca/X86/register-file-statistics.s +++ test/tools/llvm-mca/X86/register-file-statistics.s @@ -1,37 +1,37 @@ # NOTE: Assertions have been autogenerated by utils/update_mca_test_checks.py # RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,BTVER2 %s # RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=znver1 -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,ZNVER1 %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,SNB %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=ivybridge -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,IVB %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,HSW %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,BDW %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=knl -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,KNL %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,SKX %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,SKX-AVX512 %s -# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=slm -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL,SLM %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=sandybridge -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=ivybridge -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=haswell -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=broadwell -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=knl -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=skylake-avx512 -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s +# RUN: llvm-mca %s -mtriple=x86_64-unknown-unknown -mcpu=slm -iterations=1 -all-stats=false -all-views=false -register-file-stats < %s | FileCheck --check-prefixes=ALL %s xor %eax, %ebx -# ALL: Register File statistics: -# ALL-NEXT: Total number of mappings created: 2 -# ALL-NEXT: Max number of mappings used: 2 +# ALL: Register File statistics: +# ALL-NEXT: Total number of mappings created: 2 +# ALL-NEXT: Max number of mappings used: 2 -# BTVER2: * Register File #1 -- JFpuPRF: -# BTVER2-NEXT: Number of physical registers: 72 -# BTVER2-NEXT: Total number of mappings created: 0 -# BTVER2-NEXT: Max number of mappings used: 0 +# BTVER2: * Register File #1 -- JFpuPRF: +# BTVER2-NEXT: Number of physical registers: 72 +# BTVER2-NEXT: Total number of mappings created: 0 +# BTVER2-NEXT: Max number of mappings used: 0 -# ZNVER1: * Register File #1 -- ZnFpuPRF: -# ZNVER1-NEXT: Number of physical registers: 160 -# ZNVER1-NEXT: Total number of mappings created: 0 -# ZNVER1-NEXT: Max number of mappings used: 0 +# ZNVER1: * Register File #1 -- ZnFpuPRF: +# ZNVER1-NEXT: Number of physical registers: 160 +# ZNVER1-NEXT: Total number of mappings created: 0 +# ZNVER1-NEXT: Max number of mappings used: 0 -# BTVER2: * Register File #2 -- JIntegerPRF: -# BTVER2-NEXT: Number of physical registers: 64 -# BTVER2-NEXT: Total number of mappings created: 2 -# BTVER2-NEXT: Max number of mappings used: 2 +# BTVER2: * Register File #2 -- JIntegerPRF: +# BTVER2-NEXT: Number of physical registers: 64 +# BTVER2-NEXT: Total number of mappings created: 2 +# BTVER2-NEXT: Max number of mappings used: 2 -# ZNVER1: * Register File #2 -- ZnIntegerPRF: -# ZNVER1-NEXT: Number of physical registers: 168 -# ZNVER1-NEXT: Total number of mappings created: 2 -# ZNVER1-NEXT: Max number of mappings used: 2 +# ZNVER1: * Register File #2 -- ZnIntegerPRF: +# ZNVER1-NEXT: Number of physical registers: 168 +# ZNVER1-NEXT: Total number of mappings created: 2 +# ZNVER1-NEXT: Max number of mappings used: 2 Index: utils/update_mca_test_checks.py =================================================================== --- utils/update_mca_test_checks.py +++ utils/update_mca_test_checks.py @@ -321,6 +321,9 @@ _warn('Multiple prefixes generating same output: {} ' '(discarding {})'.format(','.join(s), ','.join(s[1:]))) + if block_text and not current_set: + raise Error( + 'block not captured by existing prefixes:\n\n{}'.format(block_text)) block_infos[block_num][block_text] = sorted(list(current_set)) # If we have multiple block_texts, try to break them down further to avoid @@ -341,10 +344,12 @@ def _write_block(output, block, not_prefix_set, common_prefix, prefix_pad): """ Write an individual block, with correct padding on the prefixes. + Returns a set of all of the prefixes that it has written. """ end_prefix = ': ' previous_prefix = None num_lines_of_prefix = 0 + written_prefixes = set() for prefix, line in block: if prefix in not_prefix_set: @@ -364,6 +369,7 @@ num_lines_of_prefix = 0 previous_prefix = prefix + written_prefixes.add(prefix) output.append( '{} {}{}{} {}'.format(COMMENT_CHAR, prefix, @@ -373,6 +379,7 @@ end_prefix = '-NEXT:' output.append('') + return written_prefixes def _write_output(test_path, input_lines, prefix_list, block_infos, # noqa @@ -416,6 +423,7 @@ output_lines.append('') output_check_lines = [] + used_prefixes = set() for block_num in range(len(block_infos)): for block_text in sorted(block_infos[block_num]): if not block_text: @@ -423,22 +431,26 @@ if type(block_infos[block_num]) is list: # The block is of the type output from _break_down_block(). - _write_block(output_check_lines, - block_infos[block_num], - not_prefix_set, - common_prefix, - prefix_pad) + used_prefixes |= _write_block(output_check_lines, + block_infos[block_num], + not_prefix_set, + common_prefix, + prefix_pad) break elif block_infos[block_num][block_text]: # _break_down_block() was unable to do do anything so output the block # as-is. lines = block_text.split('\n') for prefix in block_infos[block_num][block_text]: - _write_block(output_check_lines, - [(prefix, line) for line in lines], - not_prefix_set, - common_prefix, - prefix_pad) + used_prefixes |= _write_block(output_check_lines, + [(prefix, line) for line in lines], + not_prefix_set, + common_prefix, + prefix_pad) + + unused_prefixes = (prefix_set - not_prefix_set) - used_prefixes + if unused_prefixes: + raise Error('unused prefixes: {}'.format(sorted(unused_prefixes))) if output_check_lines: output_lines.insert(0, ADVERT)