[gcov][test] Change some legacy PM tests to new PM and remove others
authorFangrui Song <i@maskray.me>
Fri, 15 Apr 2022 02:12:14 +0000 (19:12 -0700)
committerFangrui Song <i@maskray.me>
Fri, 15 Apr 2022 02:12:14 +0000 (19:12 -0700)
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

index 202479e..30051a4 100644 (file)
@@ -4,15 +4,6 @@
 ; 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
 
index bde2e85..615a432 100644 (file)
@@ -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
 
index e90385c..4d4a9e2 100644 (file)
@@ -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
index e609e88..93a4fd4 100644 (file)
@@ -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.
 
index 195d3a0..ba17372 100644 (file)
@@ -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:
index 460d4df..1945582 100644 (file)
@@ -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
index 0af0118..e5db705 100644 (file)
@@ -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
index 91331dc..1cf5746 100644 (file)
@@ -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 {