[llvm] acead46 - [test] Migrate legacy InstrProfiling tests to new PM

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Sat Jul 16 01:10:13 PDT 2022


Author: Fangrui Song
Date: 2022-07-16T01:10:08-07:00
New Revision: acead46a10431c5b085c8cb91e4ebceafbd51749

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

LOG: [test] Migrate legacy InstrProfiling tests to new PM

Added: 
    

Modified: 
    llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll
    llvm/test/Instrumentation/InstrProfiling/coverage.ll
    llvm/test/Instrumentation/InstrProfiling/debug-info-correlate-coverage.ll
    llvm/test/Instrumentation/InstrProfiling/debug-info-correlate.ll
    llvm/test/Instrumentation/InstrProfiling/early-exit.ll
    llvm/test/Instrumentation/InstrProfiling/icall-comdat.ll
    llvm/test/Instrumentation/InstrProfiling/icall-nocomdat.ll
    llvm/test/Instrumentation/InstrProfiling/no-counters.ll
    llvm/test/Instrumentation/InstrProfiling/noruntime.ll
    llvm/test/Instrumentation/InstrProfiling/platform.ll
    llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll

Removed: 
    


################################################################################
diff  --git a/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll b/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll
index d123f6b9818d8..2faf44333e8bb 100644
--- a/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/atomic-updates.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -S -instrprof -instrprof-atomic-counter-update-all | FileCheck %s
+; RUN: opt < %s -S -passes=instrprof -instrprof-atomic-counter-update-all | FileCheck %s
 
 target triple = "x86_64-apple-macosx10.10.0"
 

diff  --git a/llvm/test/Instrumentation/InstrProfiling/coverage.ll b/llvm/test/Instrumentation/InstrProfiling/coverage.ll
index 8b1c48fd1f008..1ab1098434320 100644
--- a/llvm/test/Instrumentation/InstrProfiling/coverage.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/coverage.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instrprof -S | FileCheck %s
+; RUN: opt < %s -passes=instrprof -S | FileCheck %s
 
 target triple = "aarch64-unknown-linux-gnu"
 

diff  --git a/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate-coverage.ll b/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate-coverage.ll
index 7ac788e0c861d..c3f137bc48e36 100644
--- a/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate-coverage.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate-coverage.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instrprof -debug-info-correlate -S | opt --O2 -S | FileCheck %s
+; RUN: opt < %s -passes=instrprof -debug-info-correlate -S | opt -O2 -S | FileCheck %s
 
 @__profn_foo = private constant [3 x i8] c"foo"
 ; CHECK:      @__profc_foo

diff  --git a/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate.ll b/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate.ll
index 64102ab4374f0..8f389226222db 100644
--- a/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/debug-info-correlate.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instrprof -debug-info-correlate -S > %t.ll
+; RUN: opt < %s -passes=instrprof -debug-info-correlate -S > %t.ll
 ; RUN: FileCheck < %t.ll --implicit-check-not "{{__llvm_prf_data|__llvm_prf_names}}" %s
 ; RUN: %llc_dwarf -O0 -filetype=obj < %t.ll | llvm-dwarfdump - | FileCheck --implicit-check-not "{{DW_TAG|NULL}}" %s --check-prefix CHECK-DWARF
 

diff  --git a/llvm/test/Instrumentation/InstrProfiling/early-exit.ll b/llvm/test/Instrumentation/InstrProfiling/early-exit.ll
index e4e92b945becf..b781fbc942a87 100644
--- a/llvm/test/Instrumentation/InstrProfiling/early-exit.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/early-exit.ll
@@ -1,4 +1,4 @@
-; RUN: opt < %s -instrprof -S | FileCheck %s
+; RUN: opt < %s -passes=instrprof -S | FileCheck %s
 
 target triple = "x86_64-apple-macosx10.10.0"
 

diff  --git a/llvm/test/Instrumentation/InstrProfiling/icall-comdat.ll b/llvm/test/Instrumentation/InstrProfiling/icall-comdat.ll
index ac5b689d7ba88..03e5b42bd3f5b 100644
--- a/llvm/test/Instrumentation/InstrProfiling/icall-comdat.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/icall-comdat.ll
@@ -1,14 +1,14 @@
 ;; Check that static counters are allocated for value profiler
 
-; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
-; RUN: opt < %s -mtriple=powerpc-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
-; RUN: opt < %s -mtriple=sparc-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
-; RUN: opt < %s -mtriple=s390x-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
-; RUN: opt < %s -mtriple=powerpc64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
-; RUN: opt < %s -mtriple=sparc64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
-; RUN: opt < %s -mtriple=mips-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-SEXT
-; RUN: opt < %s -mtriple=mips64-unknown-linux -instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-SEXT
-; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
+; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=powerpc-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=sparc-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=s390x-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
+; RUN: opt < %s -mtriple=powerpc64-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
+; RUN: opt < %s -mtriple=sparc64-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-EXT
+; RUN: opt < %s -mtriple=mips-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-SEXT
+; RUN: opt < %s -mtriple=mips64-unknown-linux -passes=instrprof -vp-static-alloc=true -S | FileCheck %s --check-prefix=STATIC-SEXT
+; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
 
 
 

diff  --git a/llvm/test/Instrumentation/InstrProfiling/icall-nocomdat.ll b/llvm/test/Instrumentation/InstrProfiling/icall-nocomdat.ll
index 912d39a71ebca..cb381254314da 100644
--- a/llvm/test/Instrumentation/InstrProfiling/icall-nocomdat.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/icall-nocomdat.ll
@@ -1,8 +1,8 @@
 ;; Check that static counters are allocated for value profiler
 
-; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -vp-static-alloc=true -instrprof -S | FileCheck %s --check-prefix=STATIC
-; RUN: opt < %s -mtriple=powerpc-ibm-aix-xcoff -instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
-; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
+; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -vp-static-alloc=true -passes=instrprof -S | FileCheck %s --check-prefix=STATIC
+; RUN: opt < %s -mtriple=powerpc-ibm-aix-xcoff -passes=instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
+; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -passes=instrprof -vp-static-alloc=false -S | FileCheck %s --check-prefix=DYN
 
 @__profn_foo = private constant [3 x i8] c"foo"
 @__profn_bar = private constant [3 x i8] c"bar"

diff  --git a/llvm/test/Instrumentation/InstrProfiling/no-counters.ll b/llvm/test/Instrumentation/InstrProfiling/no-counters.ll
index ab103ae4b8d3b..165fe493ba63b 100644
--- a/llvm/test/Instrumentation/InstrProfiling/no-counters.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/no-counters.ll
@@ -1,6 +1,5 @@
 ;; Emit the runtime hook even if there are no counter increments.
 
-; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -instrprof -S | FileCheck %s -check-prefixes=ALL,DARWIN
 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes=instrprof -S | FileCheck %s -check-prefixes=ALL,DARWIN
 ; RUN: opt < %s -mtriple=x86_64-linux-unknown -passes=instrprof -S | FileCheck %s -check-prefixes=ALL,LINUX
 ; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -passes=instrprof -S | FileCheck %s -check-prefixes=ALL,DARWIN

diff  --git a/llvm/test/Instrumentation/InstrProfiling/noruntime.ll b/llvm/test/Instrumentation/InstrProfiling/noruntime.ll
index 970884ff85161..f27ecf7b35f5d 100644
--- a/llvm/test/Instrumentation/InstrProfiling/noruntime.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/noruntime.ll
@@ -1,6 +1,5 @@
 ;; Check that we don't emit the runtime hooks if the user provided them.
 
-; RUN: opt < %s -instrprof -S | FileCheck %s
 ; RUN: opt < %s -passes=instrprof -S | FileCheck %s
 ; CHECK-NOT: define {{.*}} @__llvm_profile_runtime_user()
 ; CHECK-NOT: load i32, i32* @__llvm_profile_runtime

diff  --git a/llvm/test/Instrumentation/InstrProfiling/platform.ll b/llvm/test/Instrumentation/InstrProfiling/platform.ll
index c3d283433011f..0bd35dc5ef345 100644
--- a/llvm/test/Instrumentation/InstrProfiling/platform.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/platform.ll
@@ -1,18 +1,11 @@
 ;; Checks for platform specific section names and initialization code.
 
-; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -instrprof -S | FileCheck %s -check-prefix=MACHO
 ; RUN: opt < %s -mtriple=x86_64-apple-macosx10.10.0 -passes=instrprof -S | FileCheck %s -check-prefix=MACHO
-; RUN: opt < %s -mtriple=x86_64-unknown-linux -instrprof -S | FileCheck %s -check-prefixes=LINUX,ELF
 ; RUN: opt < %s -mtriple=x86_64-unknown-linux -passes=instrprof -S | FileCheck %s -check-prefixes=LINUX,ELF
-; RUN: opt < %s -mtriple=x86_64-unknown-freebsd -instrprof -S | FileCheck %s -check-prefixes=FREEBSD,ELF
 ; RUN: opt < %s -mtriple=x86_64-unknown-freebsd -passes=instrprof -S | FileCheck %s -check-prefixes=FREEBSD,ELF
-; RUN: opt < %s -mtriple=x86_64-scei-ps4 -instrprof -S | FileCheck %s -check-prefixes=PS4,ELF
 ; RUN: opt < %s -mtriple=x86_64-scei-ps4 -passes=instrprof -S | FileCheck %s -check-prefixes=PS4,ELF
-; RUN: opt < %s -mtriple=x86_64-sie-ps5 -instrprof -S | FileCheck %s -check-prefixes=PS4,ELF
 ; RUN: opt < %s -mtriple=x86_64-sie-ps5 -passes=instrprof -S | FileCheck %s -check-prefixes=PS4,ELF
-; RUN: opt < %s -mtriple=x86_64-pc-solaris -instrprof -S | FileCheck %s -check-prefixes=SOLARIS,ELF
 ; RUN: opt < %s -mtriple=x86_64-pc-solaris -passes=instrprof -S | FileCheck %s -check-prefixes=SOLARIS,ELF
-; RUN: opt < %s -mtriple=x86_64-pc-windows -instrprof -S | FileCheck %s -check-prefix=WINDOWS
 ; RUN: opt < %s -mtriple=x86_64-pc-windows -passes=instrprof -S | FileCheck %s -check-prefix=WINDOWS
 ; RUN: opt < %s -mtriple=powerpc64-ibm-aix-xcoff -passes=instrprof -S | FileCheck %s -check-prefix=AIX
 

diff  --git a/llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll b/llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll
index e5e9b7dad934d..bda89a311dad8 100644
--- a/llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll
+++ b/llvm/test/Instrumentation/InstrProfiling/runtime-counter-relocation.ll
@@ -1,5 +1,5 @@
-; RUN: opt < %s -S -instrprof | FileCheck %s
-; RUN: opt < %s -S -instrprof -runtime-counter-relocation | FileCheck -check-prefixes=RELOC %s
+; RUN: opt < %s -S -passes=instrprof | FileCheck %s
+; RUN: opt < %s -S -passes=instrprof -runtime-counter-relocation | FileCheck -check-prefixes=RELOC %s
 
 target triple = "x86_64-unknown-linux-gnu"
 


        


More information about the llvm-commits mailing list