[llvm] r329403 - [llvm-mca] Do not separate iterations with a newline in the timeline view.
Andrea Di Biagio via llvm-commits
llvm-commits at lists.llvm.org
Fri Apr 6 08:30:02 PDT 2018
Author: adibiagio
Date: Fri Apr 6 08:30:02 2018
New Revision: 329403
URL: http://llvm.org/viewvc/llvm-project?rev=329403&view=rev
Log:
[llvm-mca] Do not separate iterations with a newline in the timeline view.
Also, update a few tests to minimize the diff in D45369.
No functional change intended.
Modified:
llvm/trunk/test/tools/llvm-mca/AArch64/CortexA57/direct-branch.s
llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s
llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/scheduler-queue-usage.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/dot-product.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/pipes-fpu.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-1.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-2.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-3.s
llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-4.s
llvm/trunk/tools/llvm-mca/TimelineView.cpp
Modified: llvm/trunk/test/tools/llvm-mca/AArch64/CortexA57/direct-branch.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/AArch64/CortexA57/direct-branch.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/AArch64/CortexA57/direct-branch.s (original)
+++ llvm/trunk/test/tools/llvm-mca/AArch64/CortexA57/direct-branch.s Fri Apr 6 08:30:02 2018
@@ -1,4 +1,4 @@
-# RUN: llvm-mca -march=aarch64 -mcpu=cortex-a57 -iterations=600 -timeline < %s | FileCheck %s
+# RUN: llvm-mca -march=aarch64 -mcpu=cortex-a57 -iterations=600 -timeline -timeline-max-iterations=4 < %s | FileCheck %s
b t
@@ -42,13 +42,12 @@
# CHECK: Timeline view:
-# CHECK-NEXT: 012
-# CHECK-NEXT: Index 0123456789
+# CHECK: Index 0123456
-# CHECK: [0,0] DeER . . . b t
-# CHECK: [1,0] D=eER. . . b t
-# CHECK: [2,0] D==eER . . b t
-# CHECK: [3,0] .D==eER . . b t
+# CHECK: [0,0] DeER .. b t
+# CHECK-NEXT: [1,0] D=eER.. b t
+# CHECK-NEXT: [2,0] D==eER. b t
+# CHECK-NEXT: [3,0] .D==eER b t
# CHECK: Average Wait times (based on the timeline view):
@@ -58,4 +57,4 @@
# CHECK-NEXT: [3]: Average time elapsed from WB until retire stage
# CHECK: [0] [1] [2] [3]
-# CHECK-NEXT: 0. 10 4.3 4.3 0.0 b t
+# CHECK-NEXT: 0. 4 2.2 2.2 0.0 b t
Modified: llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s (original)
+++ llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/direct-branch.s Fri Apr 6 08:30:02 2018
@@ -1,5 +1,5 @@
-# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m3 -iterations=300 -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=M3
-# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m1 -iterations=300 -timeline < %s | FileCheck %s -check-prefix=ALL -check-prefix=M1
+# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m3 -iterations=300 -timeline -timeline-max-iterations=3 -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=M3
+# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m1 -iterations=300 -timeline -timeline-max-iterations=3 -resource-pressure=false < %s | FileCheck %s -check-prefix=ALL -check-prefix=M1
b t
@@ -34,4 +34,4 @@
# ALL-NEXT: [3]: Average time elapsed from WB until retire stage
# ALL: [0] [1] [2] [3]
-# ALL-NEXT: 0. 10 0.0 0.0 0.0 b t
+# ALL-NEXT: 0. 3 0.0 0.0 0.0 b t
Modified: llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/scheduler-queue-usage.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/scheduler-queue-usage.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/scheduler-queue-usage.s (original)
+++ llvm/trunk/test/tools/llvm-mca/AArch64/Exynos/scheduler-queue-usage.s Fri Apr 6 08:30:02 2018
@@ -1,5 +1,5 @@
-# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m3 -iterations=1 -verbose < %s | FileCheck %s -check-prefix=ALL
-# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m1 -iterations=1 -verbose < %s | FileCheck %s -check-prefix=ALL
+# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m3 -iterations=1 -verbose -resource-pressure=false -instruction-info=false < %s | FileCheck %s -check-prefix=ALL
+# RUN: llvm-mca -march=aarch64 -mcpu=exynos-m1 -iterations=1 -verbose -resource-pressure=false -instruction-info=false < %s | FileCheck %s -check-prefix=ALL
b t
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/dot-product.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/dot-product.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/dot-product.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/dot-product.s Fri Apr 6 08:30:02 2018
@@ -59,10 +59,10 @@ vhaddps %xmm3, %xmm3, %xmm4
# CHECK: [0,0] DeeER. . . vmulps %xmm0, %xmm1, %xmm2
# CHECK-NEXT: [0,1] D==eeeER . . vhaddps %xmm2, %xmm2, %xmm3
# CHECK-NEXT: [0,2] .D====eeeER . vhaddps %xmm3, %xmm3, %xmm4
-# CHECK: [1,0] .DeeE-----R . vmulps %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: [1,0] .DeeE-----R . vmulps %xmm0, %xmm1, %xmm2
# CHECK-NEXT: [1,1] . D=eeeE---R . vhaddps %xmm2, %xmm2, %xmm3
# CHECK-NEXT: [1,2] . D====eeeER . vhaddps %xmm3, %xmm3, %xmm4
-# CHECK: [2,0] . DeeE-----R . vmulps %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: [2,0] . DeeE-----R . vmulps %xmm0, %xmm1, %xmm2
# CHECK-NEXT: [2,1] . D====eeeER . vhaddps %xmm2, %xmm2, %xmm3
# CHECK-NEXT: [2,2] . D======eeeER vhaddps %xmm3, %xmm3, %xmm4
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/pipes-fpu.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/pipes-fpu.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/pipes-fpu.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/pipes-fpu.s Fri Apr 6 08:30:02 2018
@@ -87,7 +87,7 @@ vsqrtps %ymm0, %ymm2
# CHECK-NEXT: [0,5] . DeeeeeeeeeeeeeeeeeeeeeER . . . . . . . . . vsqrtps %xmm0, %xmm2
# CHECK-NEXT: [0,6] . DeeeE-----------------R . . . . . . . . . vaddps %ymm0, %ymm1, %ymm2
# CHECK-NEXT: [0,7] . D===================eeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeER . vsqrtps %ymm0, %ymm2
-# CHECK: [1,0] . .DeeeeE--------------------------------------------------------R . vpmulld %xmm0, %xmm1, %xmm2
+# CHECK-NEXT: [1,0] . .DeeeeE--------------------------------------------------------R . vpmulld %xmm0, %xmm1, %xmm2
# CHECK-NEXT: [1,1] . . DeE-----------------------------------------------------------R. vpand %xmm0, %xmm1, %xmm2
# CHECK-NEXT: [1,2] . . DeeeE--------------------------------------------------------R. vcvttps2dq %xmm0, %xmm2
# CHECK-NEXT: [1,3] . . DeeE----------------------------------------------------------R vpclmulqdq $0, %xmm0, %xmm1, %xmm2
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-1.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-1.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-1.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-1.s Fri Apr 6 08:30:02 2018
@@ -1,4 +1,4 @@
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=5 -verbose -register-file-stats -timeline < %s | FileCheck %s
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=5 -verbose -instruction-info=false -register-file-stats -timeline < %s | FileCheck %s
vaddps %xmm0, %xmm0, %xmm0
vmulps %xmm0, %xmm0, %xmm0
@@ -34,13 +34,14 @@ vmulps %xmm0, %xmm0, %xmm0
# CHECK: Timeline view:
# CHECK-NEXT: 0123456789
# CHECK-NEXT: Index 0123456789 01234567
+
# CHECK: [0,0] DeeeER . . . . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [0,1] D===eeER . . . . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [1,0] .D====eeeER . . . . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [1,0] .D====eeeER . . . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [1,1] .D=======eeER . . . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [2,0] . D========eeeER . . . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [2,0] . D========eeeER . . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [2,1] . D===========eeER . . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [3,0] . D============eeeER . . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [3,0] . D============eeeER . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [3,1] . D===============eeER . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [4,0] . D================eeeER . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [4,0] . D================eeeER . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [4,1] . D===================eeER vmulps %xmm0, %xmm0, %xmm0
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-2.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-2.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-2.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-2.s Fri Apr 6 08:30:02 2018
@@ -1,4 +1,4 @@
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -register-file-size=5 -iterations=5 -verbose -register-file-stats -timeline < %s | FileCheck %s
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -register-file-size=5 -iterations=5 -verbose -instruction-info=false -register-file-stats -timeline < %s | FileCheck %s
vaddps %xmm0, %xmm0, %xmm0
vmulps %xmm0, %xmm0, %xmm0
@@ -36,11 +36,11 @@ vmulps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: Index 0123456789 01234567
# CHECK: [0,0] DeeeER . . . . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [0,1] D===eeER . . . . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [1,0] .D====eeeER . . . . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [1,0] .D====eeeER . . . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [1,1] .D=======eeER . . . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [2,0] . D========eeeER . . . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [2,0] . D========eeeER . . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [2,1] . D========eeER . . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [3,0] . . D========eeeER . . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [3,0] . . D========eeeER . . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [3,1] . . D========eeER . . vmulps %xmm0, %xmm0, %xmm0
-# CHECK: [4,0] . . . D========eeeER . vaddps %xmm0, %xmm0, %xmm0
+# CHECK-NEXT: [4,0] . . . D========eeeER . vaddps %xmm0, %xmm0, %xmm0
# CHECK-NEXT: [4,1] . . . D========eeER vmulps %xmm0, %xmm0, %xmm0
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-3.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-3.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-3.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-3.s Fri Apr 6 08:30:02 2018
@@ -46,4 +46,4 @@ idiv %eax
# CHECK-NEXT: Index 0123456789 0123456789 0123456789
# CHECK: [0,0] DeeeeeeeeeeeeeeeeeeeeeeeeeER . . . . . . idivl %eax
-# CHECK: [1,0] . . . . . . DeeeeeeeeeeeeeeeeeeeeeeeeeER idivl %eax
+# CHECK-NEXT: [1,0] . . . . . . DeeeeeeeeeeeeeeeeeeeeeeeeeER idivl %eax
Modified: llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-4.s
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-4.s?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-4.s (original)
+++ llvm/trunk/test/tools/llvm-mca/X86/BtVer2/register-files-4.s Fri Apr 6 08:30:02 2018
@@ -1,4 +1,4 @@
-# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=22 -verbose -register-file-stats -timeline -timeline-max-iterations=3 < %s | FileCheck %s
+# RUN: llvm-mca -mtriple=x86_64-unknown-unknown -mcpu=btver2 -iterations=22 -verbose -register-file-stats -resource-pressure=false -timeline -timeline-max-iterations=3 < %s | FileCheck %s
idiv %eax
@@ -45,5 +45,5 @@ idiv %eax
# CHECK-NEXT: 0123456789 0123456789 0123456789 01234567
# CHECK-NEXT: Index 0123456789 0123456789 0123456789 0123456789
# CHECK: [0,0] DeeeeeeeeeeeeeeeeeeeeeeeeeER . . . . . . . . . . . idivl %eax
-# CHECK: [1,0] .D========================eeeeeeeeeeeeeeeeeeeeeeeeeER . . . . . . idivl %eax
-# CHECK: [2,0] . D================================================eeeeeeeeeeeeeeeeeeeeeeeeeER idivl %eax
+# CHECK-NEXT: [1,0] .D========================eeeeeeeeeeeeeeeeeeeeeeeeeER . . . . . . idivl %eax
+# CHECK-NEXT: [2,0] . D================================================eeeeeeeeeeeeeeeeeeeeeeeeeER idivl %eax
Modified: llvm/trunk/tools/llvm-mca/TimelineView.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-mca/TimelineView.cpp?rev=329403&r1=329402&r2=329403&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-mca/TimelineView.cpp (original)
+++ llvm/trunk/tools/llvm-mca/TimelineView.cpp Fri Apr 6 08:30:02 2018
@@ -155,7 +155,7 @@ void TimelineView::printTimelineViewEntr
const TimelineViewEntry &Entry,
unsigned Iteration,
unsigned SourceIndex) const {
- if (SourceIndex == 0)
+ if (Iteration == 0 && SourceIndex == 0)
OS << '\n';
OS << '[' << Iteration << ',' << SourceIndex << "]\t";
for (unsigned I = 0, E = Entry.CycleDispatched; I < E; ++I)
More information about the llvm-commits
mailing list