[llvm] r283440 - [llvm-opt-report] Print line numbers starting from 1
Hal Finkel via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 6 04:11:11 PDT 2016
Author: hfinkel
Date: Thu Oct 6 06:11:11 2016
New Revision: 283440
URL: http://llvm.org/viewvc/llvm-project?rev=283440&view=rev
Log:
[llvm-opt-report] Print line numbers starting from 1
Line numbers should start from 1, not 2.
Modified:
llvm/trunk/test/tools/llvm-opt-report/basic.test
llvm/trunk/test/tools/llvm-opt-report/func-2.test
llvm/trunk/test/tools/llvm-opt-report/func-x.test
llvm/trunk/test/tools/llvm-opt-report/func.test
llvm/trunk/tools/llvm-opt-report/OptReport.cpp
Modified: llvm/trunk/test/tools/llvm-opt-report/basic.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-opt-report/basic.test?rev=283440&r1=283439&r2=283440&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-opt-report/basic.test (original)
+++ llvm/trunk/test/tools/llvm-opt-report/basic.test Thu Oct 6 06:11:11 2016
@@ -2,96 +2,96 @@ RUN: llvm-opt-report -r %p %p/Inputs/or.
RUN: llvm-opt-report -s -r %p %p/Inputs/or.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
; CHECK: < {{.*[/\]}}or.c
-; CHECK-NEXT: 2 | void bar();
-; CHECK-NEXT: 3 | void foo() { bar(); }
-; CHECK-NEXT: 4 |
-; CHECK-NEXT: 5 | #include "or.h"
-; CHECK-NEXT: 6 |
-; CHECK-NEXT: 7 | void Test(int *res, int *c, int *d, int *p, int n) {
-; CHECK-NEXT: 8 | int i;
-; CHECK-NEXT: 9 |
-; CHECK-NEXT: 10 | #pragma clang loop vectorize(assume_safety)
-; CHECK-NEXT: 11 V4,2 | for (i = 0; i < 1600; i++) {
-; CHECK-NEXT: 12 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-; CHECK-NEXT: 13 | }
-; CHECK-NEXT: 14 |
-; CHECK-NEXT: 15 U16 | for (i = 0; i < 16; i++) {
-; CHECK-NEXT: 16 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-; CHECK-NEXT: 17 | }
-; CHECK-NEXT: 18 |
-; CHECK-NEXT: 19 I | foo();
-; CHECK-NEXT: 20 |
-; CHECK-NEXT: 21 | foo(); bar(); foo();
+; CHECK-NEXT: 1 | void bar();
+; CHECK-NEXT: 2 | void foo() { bar(); }
+; CHECK-NEXT: 3 |
+; CHECK-NEXT: 4 | #include "or.h"
+; CHECK-NEXT: 5 |
+; CHECK-NEXT: 6 | void Test(int *res, int *c, int *d, int *p, int n) {
+; CHECK-NEXT: 7 | int i;
+; CHECK-NEXT: 8 |
+; CHECK-NEXT: 9 | #pragma clang loop vectorize(assume_safety)
+; CHECK-NEXT: 10 V4,2 | for (i = 0; i < 1600; i++) {
+; CHECK-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-NEXT: 12 | }
+; CHECK-NEXT: 13 |
+; CHECK-NEXT: 14 U16 | for (i = 0; i < 16; i++) {
+; CHECK-NEXT: 15 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-NEXT: 16 | }
+; CHECK-NEXT: 17 |
+; CHECK-NEXT: 18 I | foo();
+; CHECK-NEXT: 19 |
+; CHECK-NEXT: 20 | foo(); bar(); foo();
; CHECK-NEXT: I | ^
; CHECK-NEXT: I | ^
-; CHECK-NEXT: 22 | }
-; CHECK-NEXT: 23 |
+; CHECK-NEXT: 21 | }
+; CHECK-NEXT: 22 |
; CHECK: < {{.*[/\]}}or.h
-; CHECK-NEXT: 2 | void TestH(int *res, int *c, int *d, int *p, int n) {
-; CHECK-NEXT: 3 | int i;
-; CHECK-NEXT: 4 |
-; CHECK-NEXT: 5 | #pragma clang loop vectorize(assume_safety)
-; CHECK-NEXT: 6 V4,2 | for (i = 0; i < 1600; i++) {
-; CHECK-NEXT: 7 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-; CHECK-NEXT: 8 | }
-; CHECK-NEXT: 9 |
-; CHECK-NEXT: 10 U16 | for (i = 0; i < 16; i++) {
-; CHECK-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-; CHECK-NEXT: 12 | }
-; CHECK-NEXT: 13 |
-; CHECK-NEXT: 14 I | foo();
-; CHECK-NEXT: 15 |
-; CHECK-NEXT: 16 | foo(); bar(); foo();
+; CHECK-NEXT: 1 | void TestH(int *res, int *c, int *d, int *p, int n) {
+; CHECK-NEXT: 2 | int i;
+; CHECK-NEXT: 3 |
+; CHECK-NEXT: 4 | #pragma clang loop vectorize(assume_safety)
+; CHECK-NEXT: 5 V4,2 | for (i = 0; i < 1600; i++) {
+; CHECK-NEXT: 6 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-NEXT: 7 | }
+; CHECK-NEXT: 8 |
+; CHECK-NEXT: 9 U16 | for (i = 0; i < 16; i++) {
+; CHECK-NEXT: 10 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-NEXT: 11 | }
+; CHECK-NEXT: 12 |
+; CHECK-NEXT: 13 I | foo();
+; CHECK-NEXT: 14 |
+; CHECK-NEXT: 15 | foo(); bar(); foo();
; CHECK-NEXT: I | ^
; CHECK-NEXT: I | ^
-; CHECK-NEXT: 17 | }
-; CHECK-NEXT: 18 |
+; CHECK-NEXT: 16 | }
+; CHECK-NEXT: 17 |
; CHECK-SUCCINCT: < {{.*[/\]}}or.c
-CHECK-SUCCINCT-NEXT: 2 | void bar();
-CHECK-SUCCINCT-NEXT: 3 | void foo() { bar(); }
-CHECK-SUCCINCT-NEXT: 4 |
-CHECK-SUCCINCT-NEXT: 5 | #include "or.h"
-CHECK-SUCCINCT-NEXT: 6 |
-CHECK-SUCCINCT-NEXT: 7 | void Test(int *res, int *c, int *d, int *p, int n) {
-CHECK-SUCCINCT-NEXT: 8 | int i;
-CHECK-SUCCINCT-NEXT: 9 |
-CHECK-SUCCINCT-NEXT: 10 | #pragma clang loop vectorize(assume_safety)
-CHECK-SUCCINCT-NEXT: 11 V | for (i = 0; i < 1600; i++) {
-CHECK-SUCCINCT-NEXT: 12 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-CHECK-SUCCINCT-NEXT: 13 | }
-CHECK-SUCCINCT-NEXT: 14 |
-CHECK-SUCCINCT-NEXT: 15 U | for (i = 0; i < 16; i++) {
-CHECK-SUCCINCT-NEXT: 16 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-CHECK-SUCCINCT-NEXT: 17 | }
-CHECK-SUCCINCT-NEXT: 18 |
-CHECK-SUCCINCT-NEXT: 19 I | foo();
-CHECK-SUCCINCT-NEXT: 20 |
-CHECK-SUCCINCT-NEXT: 21 | foo(); bar(); foo();
-CHECK-SUCCINCT-NEXT: I | ^
-CHECK-SUCCINCT-NEXT: I | ^
-CHECK-SUCCINCT-NEXT: 22 | }
-CHECK-SUCCINCT-NEXT: 23 |
+; CHECK-SUCCINCT-NEXT: 1 | void bar();
+; CHECK-SUCCINCT-NEXT: 2 | void foo() { bar(); }
+; CHECK-SUCCINCT-NEXT: 3 |
+; CHECK-SUCCINCT-NEXT: 4 | #include "or.h"
+; CHECK-SUCCINCT-NEXT: 5 |
+; CHECK-SUCCINCT-NEXT: 6 | void Test(int *res, int *c, int *d, int *p, int n) {
+; CHECK-SUCCINCT-NEXT: 7 | int i;
+; CHECK-SUCCINCT-NEXT: 8 |
+; CHECK-SUCCINCT-NEXT: 9 | #pragma clang loop vectorize(assume_safety)
+; CHECK-SUCCINCT-NEXT: 10 V | for (i = 0; i < 1600; i++) {
+; CHECK-SUCCINCT-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-SUCCINCT-NEXT: 12 | }
+; CHECK-SUCCINCT-NEXT: 13 |
+; CHECK-SUCCINCT-NEXT: 14 U | for (i = 0; i < 16; i++) {
+; CHECK-SUCCINCT-NEXT: 15 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-SUCCINCT-NEXT: 16 | }
+; CHECK-SUCCINCT-NEXT: 17 |
+; CHECK-SUCCINCT-NEXT: 18 I | foo();
+; CHECK-SUCCINCT-NEXT: 19 |
+; CHECK-SUCCINCT-NEXT: 20 | foo(); bar(); foo();
+; CHECK-SUCCINCT-NEXT: I | ^
+; CHECK-SUCCINCT-NEXT: I | ^
+; CHECK-SUCCINCT-NEXT: 21 | }
+; CHECK-SUCCINCT-NEXT: 22 |
CHECK-SUCCINCT: < {{.*[/\]}}or.h
-CHECK-SUCCINCT-NEXT: 2 | void TestH(int *res, int *c, int *d, int *p, int n) {
-CHECK-SUCCINCT-NEXT: 3 | int i;
-CHECK-SUCCINCT-NEXT: 4 |
-CHECK-SUCCINCT-NEXT: 5 | #pragma clang loop vectorize(assume_safety)
-CHECK-SUCCINCT-NEXT: 6 V | for (i = 0; i < 1600; i++) {
-CHECK-SUCCINCT-NEXT: 7 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-CHECK-SUCCINCT-NEXT: 8 | }
-CHECK-SUCCINCT-NEXT: 9 |
-CHECK-SUCCINCT-NEXT: 10 U | for (i = 0; i < 16; i++) {
-CHECK-SUCCINCT-NEXT: 11 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
-CHECK-SUCCINCT-NEXT: 12 | }
-CHECK-SUCCINCT-NEXT: 13 |
-CHECK-SUCCINCT-NEXT: 14 I | foo();
-CHECK-SUCCINCT-NEXT: 15 |
-CHECK-SUCCINCT-NEXT: 16 | foo(); bar(); foo();
-CHECK-SUCCINCT-NEXT: I | ^
-CHECK-SUCCINCT-NEXT: I | ^
-CHECK-SUCCINCT-NEXT: 17 | }
-CHECK-SUCCINCT-NEXT: 18 |
+; CHECK-SUCCINCT-NEXT: 1 | void TestH(int *res, int *c, int *d, int *p, int n) {
+; CHECK-SUCCINCT-NEXT: 2 | int i;
+; CHECK-SUCCINCT-NEXT: 3 |
+; CHECK-SUCCINCT-NEXT: 4 | #pragma clang loop vectorize(assume_safety)
+; CHECK-SUCCINCT-NEXT: 5 V | for (i = 0; i < 1600; i++) {
+; CHECK-SUCCINCT-NEXT: 6 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-SUCCINCT-NEXT: 7 | }
+; CHECK-SUCCINCT-NEXT: 8 |
+; CHECK-SUCCINCT-NEXT: 9 U | for (i = 0; i < 16; i++) {
+; CHECK-SUCCINCT-NEXT: 10 | res[i] = (p[i] == 0) ? res[i] : res[i] + d[i];
+; CHECK-SUCCINCT-NEXT: 11 | }
+; CHECK-SUCCINCT-NEXT: 12 |
+; CHECK-SUCCINCT-NEXT: 13 I | foo();
+; CHECK-SUCCINCT-NEXT: 14 |
+; CHECK-SUCCINCT-NEXT: 15 | foo(); bar(); foo();
+; CHECK-SUCCINCT-NEXT: I | ^
+; CHECK-SUCCINCT-NEXT: I | ^
+; CHECK-SUCCINCT-NEXT: 16 | }
+; CHECK-SUCCINCT-NEXT: 17 |
Modified: llvm/trunk/test/tools/llvm-opt-report/func-2.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-opt-report/func-2.test?rev=283440&r1=283439&r2=283440&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-opt-report/func-2.test (original)
+++ llvm/trunk/test/tools/llvm-opt-report/func-2.test Thu Oct 6 06:11:11 2016
@@ -2,48 +2,48 @@ RUN: llvm-opt-report -r %p %p/Inputs/q2.
RUN: llvm-opt-report -s -r %p %p/Inputs/q2.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
; CHECK: < {{.*[/\]}}q2.c
-; CHECK-NEXT: 2 | void bar();
-; CHECK-NEXT: 3 | void foo(int n) {
-; CHECK-NEXT: {{\[\[}}
+; CHECK-NEXT: 1 | void bar();
+; CHECK-NEXT: 2 | void foo(int n) {
+; CHECK-NEXT: {{\[\[}}
; CHECK-NEXT: > quack, quack2:
-; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
+; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
; CHECK-NEXT: U4 | ^
; CHECK-NEXT: U4 | ^
; CHECK-NEXT: > foo:
-; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
-; CHECK-NEXT: {{\]\]}}
-; CHECK-NEXT: 5 | bar();
-; CHECK-NEXT: 6 | }
-; CHECK-NEXT: 7 |
-; CHECK-NEXT: 8 | void quack() {
-; CHECK-NEXT: 9 I | foo(4);
-; CHECK-NEXT: 10 | }
-; CHECK-NEXT: 11 |
-; CHECK-NEXT: 12 | void quack2() {
-; CHECK-NEXT: 13 I | foo(4);
-; CHECK-NEXT: 14 | }
-; CHECK-NEXT: 15 |
+; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
+; CHECK-NEXT: {{\]\]}}
+; CHECK-NEXT: 4 | bar();
+; CHECK-NEXT: 5 | }
+; CHECK-NEXT: 6 |
+; CHECK-NEXT: 7 | void quack() {
+; CHECK-NEXT: 8 I | foo(4);
+; CHECK-NEXT: 9 | }
+; CHECK-NEXT: 10 |
+; CHECK-NEXT: 11 | void quack2() {
+; CHECK-NEXT: 12 I | foo(4);
+; CHECK-NEXT: 13 | }
+; CHECK-NEXT: 14 |
; CHECK-SUCCINCT: < {{.*[/\]}}q2.c
-; CHECK-SUCCINCT-NEXT: 2 | void bar();
-; CHECK-SUCCINCT-NEXT: 3 | void foo(int n) {
-; CHECK-SUCCINCT-NEXT: {{\[\[}}
+; CHECK-SUCCINCT-NEXT: 1 | void bar();
+; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
+; CHECK-SUCCINCT-NEXT: {{\[\[}}
; CHECK-SUCCINCT-NEXT: > quack, quack2:
-; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
+; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
; CHECK-SUCCINCT-NEXT: U | ^
; CHECK-SUCCINCT-NEXT: U | ^
; CHECK-SUCCINCT-NEXT: > foo:
-; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
-; CHECK-SUCCINCT-NEXT: {{\]\]}}
-; CHECK-SUCCINCT-NEXT: 5 | bar();
-; CHECK-SUCCINCT-NEXT: 6 | }
-; CHECK-SUCCINCT-NEXT: 7 |
-; CHECK-SUCCINCT-NEXT: 8 | void quack() {
-; CHECK-SUCCINCT-NEXT: 9 I | foo(4);
-; CHECK-SUCCINCT-NEXT: 10 | }
-; CHECK-SUCCINCT-NEXT: 11 |
-; CHECK-SUCCINCT-NEXT: 12 | void quack2() {
-; CHECK-SUCCINCT-NEXT: 13 I | foo(4);
-; CHECK-SUCCINCT-NEXT: 14 | }
-; CHECK-SUCCINCT-NEXT: 15 |
+; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i) for (int j = 0; j < n; ++j)
+; CHECK-SUCCINCT-NEXT: {{\]\]}}
+; CHECK-SUCCINCT-NEXT: 4 | bar();
+; CHECK-SUCCINCT-NEXT: 5 | }
+; CHECK-SUCCINCT-NEXT: 6 |
+; CHECK-SUCCINCT-NEXT: 7 | void quack() {
+; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
+; CHECK-SUCCINCT-NEXT: 9 | }
+; CHECK-SUCCINCT-NEXT: 10 |
+; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
+; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
+; CHECK-SUCCINCT-NEXT: 13 | }
+; CHECK-SUCCINCT-NEXT: 14 |
Modified: llvm/trunk/test/tools/llvm-opt-report/func-x.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-opt-report/func-x.test?rev=283440&r1=283439&r2=283440&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-opt-report/func-x.test (original)
+++ llvm/trunk/test/tools/llvm-opt-report/func-x.test Thu Oct 6 06:11:11 2016
@@ -2,44 +2,44 @@ RUN: llvm-opt-report -r %p %p/Inputs/qx.
RUN: llvm-opt-report -s -r %p %p/Inputs/qx.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
; CHECK: < {{.*[/\]}}q.cpp
-; CHECK-NEXT: 2 | void bar();
-; CHECK-NEXT: 3 | void foo(int n) {
-; CHECK-NEXT: {{\[\[}}
+; CHECK-NEXT: 1 | void bar();
+; CHECK-NEXT: 2 | void foo(int n) {
+; CHECK-NEXT: {{\[\[}}
; CHECK-NEXT: > foo(int):
-; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i)
+; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i)
; CHECK-NEXT: > quack(), quack2():
-; CHECK-NEXT: 4 U4 | for (int i = 0; i < n; ++i)
-; CHECK-NEXT: {{\]\]}}
-; CHECK-NEXT: 5 | bar();
-; CHECK-NEXT: 6 | }
-; CHECK-NEXT: 7 |
-; CHECK-NEXT: 8 | void quack() {
-; CHECK-NEXT: 9 I | foo(4);
-; CHECK-NEXT: 10 | }
-; CHECK-NEXT: 11 |
-; CHECK-NEXT: 12 | void quack2() {
-; CHECK-NEXT: 13 I | foo(4);
-; CHECK-NEXT: 14 | }
-; CHECK-NEXT: 15 |
+; CHECK-NEXT: 3 U4 | for (int i = 0; i < n; ++i)
+; CHECK-NEXT: {{\]\]}}
+; CHECK-NEXT: 4 | bar();
+; CHECK-NEXT: 5 | }
+; CHECK-NEXT: 6 |
+; CHECK-NEXT: 7 | void quack() {
+; CHECK-NEXT: 8 I | foo(4);
+; CHECK-NEXT: 9 | }
+; CHECK-NEXT: 10 |
+; CHECK-NEXT: 11 | void quack2() {
+; CHECK-NEXT: 12 I | foo(4);
+; CHECK-NEXT: 13 | }
+; CHECK-NEXT: 14 |
; CHECK-SUCCINCT: < {{.*[/\]}}q.cpp
-; CHECK-SUCCINCT-NEXT: 2 | void bar();
-; CHECK-SUCCINCT-NEXT: 3 | void foo(int n) {
-; CHECK-SUCCINCT-NEXT: {{\[\[}}
+; CHECK-SUCCINCT-NEXT: 1 | void bar();
+; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
+; CHECK-SUCCINCT-NEXT: {{\[\[}}
; CHECK-SUCCINCT-NEXT: > foo(int):
-; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i)
+; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i)
; CHECK-SUCCINCT-NEXT: > quack(), quack2():
-; CHECK-SUCCINCT-NEXT: 4 U | for (int i = 0; i < n; ++i)
-; CHECK-SUCCINCT-NEXT: {{\]\]}}
-; CHECK-SUCCINCT-NEXT: 5 | bar();
-; CHECK-SUCCINCT-NEXT: 6 | }
-; CHECK-SUCCINCT-NEXT: 7 |
-; CHECK-SUCCINCT-NEXT: 8 | void quack() {
-; CHECK-SUCCINCT-NEXT: 9 I | foo(4);
-; CHECK-SUCCINCT-NEXT: 10 | }
-; CHECK-SUCCINCT-NEXT: 11 |
-; CHECK-SUCCINCT-NEXT: 12 | void quack2() {
-; CHECK-SUCCINCT-NEXT: 13 I | foo(4);
-; CHECK-SUCCINCT-NEXT: 14 | }
-; CHECK-SUCCINCT-NEXT: 15 |
+; CHECK-SUCCINCT-NEXT: 3 U | for (int i = 0; i < n; ++i)
+; CHECK-SUCCINCT-NEXT: {{\]\]}}
+; CHECK-SUCCINCT-NEXT: 4 | bar();
+; CHECK-SUCCINCT-NEXT: 5 | }
+; CHECK-SUCCINCT-NEXT: 6 |
+; CHECK-SUCCINCT-NEXT: 7 | void quack() {
+; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
+; CHECK-SUCCINCT-NEXT: 9 | }
+; CHECK-SUCCINCT-NEXT: 10 |
+; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
+; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
+; CHECK-SUCCINCT-NEXT: 13 | }
+; CHECK-SUCCINCT-NEXT: 14 |
Modified: llvm/trunk/test/tools/llvm-opt-report/func.test
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-opt-report/func.test?rev=283440&r1=283439&r2=283440&view=diff
==============================================================================
--- llvm/trunk/test/tools/llvm-opt-report/func.test (original)
+++ llvm/trunk/test/tools/llvm-opt-report/func.test Thu Oct 6 06:11:11 2016
@@ -2,44 +2,44 @@ RUN: llvm-opt-report -r %p %p/Inputs/q.y
RUN: llvm-opt-report -s -r %p %p/Inputs/q.yaml | FileCheck -strict-whitespace -check-prefix=CHECK-SUCCINCT %s
; CHECK: < {{.*[/\]}}q.c
-; CHECK-NEXT: 2 | void bar();
-; CHECK-NEXT: 3 | void foo(int n) {
-; CHECK-NEXT: {{\[\[}}
+; CHECK-NEXT: 1 | void bar();
+; CHECK-NEXT: 2 | void foo(int n) {
+; CHECK-NEXT: {{\[\[}}
; CHECK-NEXT: > foo:
-; CHECK-NEXT: 4 | for (int i = 0; i < n; ++i)
+; CHECK-NEXT: 3 | for (int i = 0; i < n; ++i)
; CHECK-NEXT: > quack, quack2:
-; CHECK-NEXT: 4 U4 | for (int i = 0; i < n; ++i)
-; CHECK-NEXT: {{\]\]}}
-; CHECK-NEXT: 5 | bar();
-; CHECK-NEXT: 6 | }
-; CHECK-NEXT: 7 |
-; CHECK-NEXT: 8 | void quack() {
-; CHECK-NEXT: 9 I | foo(4);
-; CHECK-NEXT: 10 | }
-; CHECK-NEXT: 11 |
-; CHECK-NEXT: 12 | void quack2() {
-; CHECK-NEXT: 13 I | foo(4);
-; CHECK-NEXT: 14 | }
-; CHECK-NEXT: 15 |
+; CHECK-NEXT: 3 U4 | for (int i = 0; i < n; ++i)
+; CHECK-NEXT: {{\]\]}}
+; CHECK-NEXT: 4 | bar();
+; CHECK-NEXT: 5 | }
+; CHECK-NEXT: 6 |
+; CHECK-NEXT: 7 | void quack() {
+; CHECK-NEXT: 8 I | foo(4);
+; CHECK-NEXT: 9 | }
+; CHECK-NEXT: 10 |
+; CHECK-NEXT: 11 | void quack2() {
+; CHECK-NEXT: 12 I | foo(4);
+; CHECK-NEXT: 13 | }
+; CHECK-NEXT: 14 |
; CHECK-SUCCINCT: < {{.*[/\]}}q.c
-; CHECK-SUCCINCT-NEXT: 2 | void bar();
-; CHECK-SUCCINCT-NEXT: 3 | void foo(int n) {
-; CHECK-SUCCINCT-NEXT: {{\[\[}}
+; CHECK-SUCCINCT-NEXT: 1 | void bar();
+; CHECK-SUCCINCT-NEXT: 2 | void foo(int n) {
+; CHECK-SUCCINCT-NEXT: {{\[\[}}
; CHECK-SUCCINCT-NEXT: > foo:
-; CHECK-SUCCINCT-NEXT: 4 | for (int i = 0; i < n; ++i)
+; CHECK-SUCCINCT-NEXT: 3 | for (int i = 0; i < n; ++i)
; CHECK-SUCCINCT-NEXT: > quack, quack2:
-; CHECK-SUCCINCT-NEXT: 4 U | for (int i = 0; i < n; ++i)
-; CHECK-SUCCINCT-NEXT: {{\]\]}}
-; CHECK-SUCCINCT-NEXT: 5 | bar();
-; CHECK-SUCCINCT-NEXT: 6 | }
-; CHECK-SUCCINCT-NEXT: 7 |
-; CHECK-SUCCINCT-NEXT: 8 | void quack() {
-; CHECK-SUCCINCT-NEXT: 9 I | foo(4);
-; CHECK-SUCCINCT-NEXT: 10 | }
-; CHECK-SUCCINCT-NEXT: 11 |
-; CHECK-SUCCINCT-NEXT: 12 | void quack2() {
-; CHECK-SUCCINCT-NEXT: 13 I | foo(4);
-; CHECK-SUCCINCT-NEXT: 14 | }
-; CHECK-SUCCINCT-NEXT: 15 |
+; CHECK-SUCCINCT-NEXT: 3 U | for (int i = 0; i < n; ++i)
+; CHECK-SUCCINCT-NEXT: {{\]\]}}
+; CHECK-SUCCINCT-NEXT: 4 | bar();
+; CHECK-SUCCINCT-NEXT: 5 | }
+; CHECK-SUCCINCT-NEXT: 6 |
+; CHECK-SUCCINCT-NEXT: 7 | void quack() {
+; CHECK-SUCCINCT-NEXT: 8 I | foo(4);
+; CHECK-SUCCINCT-NEXT: 9 | }
+; CHECK-SUCCINCT-NEXT: 10 |
+; CHECK-SUCCINCT-NEXT: 11 | void quack2() {
+; CHECK-SUCCINCT-NEXT: 12 I | foo(4);
+; CHECK-SUCCINCT-NEXT: 13 | }
+; CHECK-SUCCINCT-NEXT: 14 |
Modified: llvm/trunk/tools/llvm-opt-report/OptReport.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-opt-report/OptReport.cpp?rev=283440&r1=283439&r2=283440&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-opt-report/OptReport.cpp (original)
+++ llvm/trunk/tools/llvm-opt-report/OptReport.cpp Thu Oct 6 06:11:11 2016
@@ -432,7 +432,7 @@ static bool writeReport(LocationInfoTy &
return RS.str();
};
- OS << llvm::format_decimal(L + 1, LNDigits) << " ";
+ OS << llvm::format_decimal(L, LNDigits) << " ";
OS << (LLI.Inlined.Transformed && InlinedCols < 2 ? "I" : " ");
OS << (LLI.Unrolled.Transformed && UnrolledCols < 2 ?
"U" + UStr(LLI) : " " + USpaces);
More information about the llvm-commits
mailing list