[llvm] 0cefd53 - [gcov][test] Change some legacy PM tests to new PM and remove others

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 14 19:12:19 PDT 2022


Author: Fangrui Song
Date: 2022-04-14T19:12:14-07:00
New Revision: 0cefd53d6eed5d5ed5d117580d4feecf6d1b74b7

URL: https://github.com/llvm/llvm-project/commit/0cefd53d6eed5d5ed5d117580d4feecf6d1b74b7
DIFF: https://github.com/llvm/llvm-project/commit/0cefd53d6eed5d5ed5d117580d4feecf6d1b74b7.diff

LOG: [gcov][test] Change some legacy PM tests to new PM and remove others

Added: 
    

Modified: 
    llvm/test/Transforms/GCOVProfiling/exit-block.ll
    llvm/test/Transforms/GCOVProfiling/function-numbering.ll
    llvm/test/Transforms/GCOVProfiling/global-ctor.ll
    llvm/test/Transforms/GCOVProfiling/linezero.ll
    llvm/test/Transforms/GCOVProfiling/linkagename.ll
    llvm/test/Transforms/GCOVProfiling/modules.ll
    llvm/test/Transforms/GCOVProfiling/three-element-mdnode.ll
    llvm/test/Transforms/GCOVProfiling/version.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Transforms/GCOVProfiling/exit-block.ll b/llvm/test/Transforms/GCOVProfiling/exit-block.ll
index 202479e72e0c2..30051a45cd6da 100644
--- a/llvm/test/Transforms/GCOVProfiling/exit-block.ll
+++ b/llvm/test/Transforms/GCOVProfiling/exit-block.ll
@@ -3,15 +3,6 @@
 ; RUN: echo '!19 = !{!"%/t/exit-block.ll", !0}' > %t/1
 ; RUN: cat %s %t/1 > %t/2
 
-; By default, the exit block is the second.
-; RUN: opt -insert-gcov-profiling -disable-output %t/2
-; RUN: llvm-cov gcov -n -dump %t/exit-block.gcno 2>&1 | FileCheck --check-prefixes=CHECK,EXIT-SECOND %s
-
-; But we can optionally emit it last, to match GCC<4.8 (r189778).
-; RUN: opt -insert-gcov-profiling -default-gcov-version='407*' -disable-output %t/2
-; RUN: llvm-cov gcov -n -dump %t/exit-block.gcno 2>&1 | FileCheck --check-prefixes=CHECK,EXIT-LAST %s
-; RUN: rm  %t/exit-block.gcno
-
 ; By default, the exit block is the second.
 ; RUN: opt -passes=insert-gcov-profiling -disable-output %t/2
 ; RUN: llvm-cov gcov -n -dump %t/exit-block.gcno 2>&1 | FileCheck --check-prefixes=CHECK,EXIT-SECOND %s

diff  --git a/llvm/test/Transforms/GCOVProfiling/function-numbering.ll b/llvm/test/Transforms/GCOVProfiling/function-numbering.ll
index bde2e850ac867..615a432b6b445 100644
--- a/llvm/test/Transforms/GCOVProfiling/function-numbering.ll
+++ b/llvm/test/Transforms/GCOVProfiling/function-numbering.ll
@@ -6,10 +6,6 @@
 ; RUN: echo '!14 = !{!"%/t/function-numbering.ll", !0}' > %t/1
 ; RUN: cat %s %t/1 > %t/2
 
-; RUN: opt -insert-gcov-profiling -S < %t/2 | FileCheck --check-prefix GCDA %s
-; RUN: llvm-cov gcov -n -dump %t/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s
-; RUNN: rm %t/function-numbering.gcno
-
 ; RUN: opt -passes=insert-gcov-profiling -S < %t/2 | FileCheck --check-prefix GCDA %s
 ; RUN: llvm-cov gcov -n -dump %t/function-numbering.gcno 2>&1 | FileCheck --check-prefix GCNO %s
 

diff  --git a/llvm/test/Transforms/GCOVProfiling/global-ctor.ll b/llvm/test/Transforms/GCOVProfiling/global-ctor.ll
index e90385c7c42e0..4d4a9e2f81571 100644
--- a/llvm/test/Transforms/GCOVProfiling/global-ctor.ll
+++ b/llvm/test/Transforms/GCOVProfiling/global-ctor.ll
@@ -1,7 +1,6 @@
 ;; For a global constructor, _GLOBAL__sub_I_ only has artificial lines.
 ;; Test that we don't instrument those functions.
 ; RUN: mkdir -p %t && cd %t
-; RUN: opt -S -insert-gcov-profiling < %s | FileCheck %s
 ; RUN: opt -S -passes=insert-gcov-profiling < %s | FileCheck %s
 
 @var = dso_local global i32 0, align 4

diff  --git a/llvm/test/Transforms/GCOVProfiling/linezero.ll b/llvm/test/Transforms/GCOVProfiling/linezero.ll
index e609e8800e8b4..93a4fd451062e 100644
--- a/llvm/test/Transforms/GCOVProfiling/linezero.ll
+++ b/llvm/test/Transforms/GCOVProfiling/linezero.ll
@@ -1,10 +1,5 @@
 ; RUN: rm -rf %t && mkdir -p %t
-
-; RUN: sed -e 's|PATTERN|%/t|g' %s | opt -insert-gcov-profiling -disable-output
-; RUN: rm %t/linezero.gcno
-
 ; RUN: sed -e 's|PATTERN|%/t|g' %s | opt -passes=insert-gcov-profiling -disable-output
-; RUN: rm %t/linezero.gcno
 
 ; This is a crash test.
 

diff  --git a/llvm/test/Transforms/GCOVProfiling/linkagename.ll b/llvm/test/Transforms/GCOVProfiling/linkagename.ll
index 195d3a0f2191e..ba17372c54191 100644
--- a/llvm/test/Transforms/GCOVProfiling/linkagename.ll
+++ b/llvm/test/Transforms/GCOVProfiling/linkagename.ll
@@ -1,13 +1,10 @@
 ; RUN: rm -rf %t && mkdir -p %t
 ; RUN: echo '!9 = !{!"%/t/linkagename.ll", !0}' > %t/1
 ; RUN: cat %s %t/1 > %t/2
-; RUN: opt -insert-gcov-profiling -disable-output < %t/2
-; RUN: grep _Z3foov %t/linkagename.gcno
-; RUN: rm %t/linkagename.gcno
 
+; RUN: rm -f %t/linkagename.gcno
 ; RUN: opt -passes=insert-gcov-profiling -disable-output < %t/2
 ; RUN: grep _Z3foov %t/linkagename.gcno
-; RUN: rm %t/linkagename.gcno
 
 define void @_Z3foov() !dbg !5 {
 entry:

diff  --git a/llvm/test/Transforms/GCOVProfiling/modules.ll b/llvm/test/Transforms/GCOVProfiling/modules.ll
index 460d4dfdfa171..194558250479c 100644
--- a/llvm/test/Transforms/GCOVProfiling/modules.ll
+++ b/llvm/test/Transforms/GCOVProfiling/modules.ll
@@ -1,4 +1,3 @@
-; RUN: opt -insert-gcov-profiling -o - < %s | llvm-dis | FileCheck -check-prefix=EMIT-ARCS %s
 ; RUN: opt -passes=insert-gcov-profiling -o - < %s | llvm-dis | FileCheck -check-prefix=EMIT-ARCS %s
 
 ; EMIT-ARCS-NOT: call void @llvm_gcda_start_file

diff  --git a/llvm/test/Transforms/GCOVProfiling/three-element-mdnode.ll b/llvm/test/Transforms/GCOVProfiling/three-element-mdnode.ll
index 0af0118898630..e5db705b22885 100644
--- a/llvm/test/Transforms/GCOVProfiling/three-element-mdnode.ll
+++ b/llvm/test/Transforms/GCOVProfiling/three-element-mdnode.ll
@@ -1,7 +1,7 @@
 ; RUN: rm -rf %t && mkdir -p %t
 ; RUN: echo '!10 = !{!"%/t/aaa.gcno", !"%/t/bbb.gcda", !0}' > %t/1
 ; RUN: cat %s %t/1 > %t/2
-; RUN: opt -insert-gcov-profiling -S -o %t/3 < %t/2
+; RUN: opt -passes=insert-gcov-profiling -S -o %t/3 < %t/2
 ; RUN: grep _Z3foov %t/aaa.gcno
 ; RUN: grep bbb.gcda %t/3
 ; RUN: rm %t/aaa.gcno

diff  --git a/llvm/test/Transforms/GCOVProfiling/version.ll b/llvm/test/Transforms/GCOVProfiling/version.ll
index 91331dc11e22f..1cf574684bc90 100644
--- a/llvm/test/Transforms/GCOVProfiling/version.ll
+++ b/llvm/test/Transforms/GCOVProfiling/version.ll
@@ -4,14 +4,6 @@
 ; RUN: echo '!9 = !{!"%/t/version.ll", !0}' > %t/version.txt
 ; RUN: cat %t/little.txt %s %t/version.txt > %t/2
 
-; RUN: opt -insert-gcov-profiling -disable-output < %t/2
-; RUN: head -c8 %t/version.gcno | grep '^oncg.804'
-; RUN: rm %t/version.gcno
-; RUN: not --crash opt -insert-gcov-profiling -default-gcov-version=asdfasdf -disable-output < %t/2
-; RUN: opt -insert-gcov-profiling -default-gcov-version='402*' -disable-output < %t/2
-; RUN: head -c8 %t/version.gcno | grep '^oncg.204'
-; RUN: rm %t/version.gcno
-
 ; RUN: opt -passes=insert-gcov-profiling -disable-output < %t/2
 ; RUN: head -c8 %t/version.gcno | grep '^oncg.804'
 ; RUN: rm %t/version.gcno
@@ -21,7 +13,7 @@
 ; RUN: rm %t/version.gcno
 
 ; RUN: cat %t/big.txt %s %t/version.txt > %t/big.ll
-; RUN: opt -insert-gcov-profiling -disable-output < %t/big.ll
+; RUN: opt -passes=insert-gcov-profiling -disable-output < %t/big.ll
 ; RUN: head -c8 %t/version.gcno | grep '^gcno408.'
 
 define void @test() !dbg !5 {


        


More information about the llvm-commits mailing list