[clang] 6271805 - [Clang] Update Profile tests to opaque pointers (NFC)
Nikita Popov via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 12 07:28:10 PST 2022
Author: Nikita Popov
Date: 2022-12-12T16:28:03+01:00
New Revision: 627180562911b93a523fea000511311ed0d381e4
URL: https://github.com/llvm/llvm-project/commit/627180562911b93a523fea000511311ed0d381e4
DIFF: https://github.com/llvm/llvm-project/commit/627180562911b93a523fea000511311ed0d381e4.diff
LOG: [Clang] Update Profile tests to opaque pointers (NFC)
Added:
Modified:
clang/test/Profile/c-captured.c
clang/test/Profile/c-general.c
clang/test/Profile/c-indirect-call.c
clang/test/Profile/c-linkage-available_externally.c
clang/test/Profile/c-ternary.c
clang/test/Profile/c-unprofiled-blocks.c
clang/test/Profile/c-unreachable-after-switch.c
clang/test/Profile/cxx-abc-deleting-dtor.cpp
clang/test/Profile/cxx-class.cpp
clang/test/Profile/cxx-indirect-call.cpp
clang/test/Profile/cxx-lambda.cpp
clang/test/Profile/cxx-rangefor.cpp
clang/test/Profile/cxx-stmt-initializers.cpp
clang/test/Profile/cxx-templates.cpp
clang/test/Profile/cxx-throws.cpp
Removed:
################################################################################
diff --git a/clang/test/Profile/c-captured.c b/clang/test/Profile/c-captured.c
index cfc64b7a7ae64..3a802494eb6a6 100644
--- a/clang/test/Profile/c-captured.c
+++ b/clang/test/Profile/c-captured.c
@@ -1,14 +1,14 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOGEN -check-prefix=PGOALL %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOGEN -check-prefix=PGOALL %s
// RUN: llvm-profdata merge %S/Inputs/c-captured.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE -check-prefix=PGOALL %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-captured.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE -check-prefix=PGOALL %s
// PGOGEN: @[[DCC:__profc_debug_captured]] = private global [3 x i64] zeroinitializer
// PGOGEN: @[[CSC:__profc_c_captured.c___captured_stmt]] = private global [2 x i64] zeroinitializer
// PGOGEN: @[[C1C:__profc_c_captured.c___captured_stmt.1]] = private global [3 x i64] zeroinitializer
// PGOALL-LABEL: define{{.*}} void @debug_captured()
-// PGOGEN: store {{.*}} @[[DCC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[DCC]]
void debug_captured(void) {
int x = 10;
@@ -20,7 +20,7 @@ void debug_captured(void) {
// PGOALL: ret
// PGOALL-LABEL: define internal void @__captured_stmt(
-// PGOGEN: store {{.*}} @[[CSC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[CSC]]
#pragma clang __debug captured
{
// PGOGEN: store {{.*}} @[[CSC]], i32 0, i32 1
@@ -32,7 +32,7 @@ void debug_captured(void) {
if (x) {} // This is DC1. Checked above.
// PGOALL-LABEL: define internal void @__captured_stmt.1(
-// PGOGEN: store {{.*}} @[[C1C]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[C1C]]
#pragma clang __debug captured
{
// PGOGEN: store {{.*}} @[[C1C]], i32 0, i32 1
diff --git a/clang/test/Profile/c-general.c b/clang/test/Profile/c-general.c
index 4c354373d2754..b841f9c3d2a1d 100644
--- a/clang/test/Profile/c-general.c
+++ b/clang/test/Profile/c-general.c
@@ -1,13 +1,13 @@
// Test instrumentation of general constructs in C.
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOGEN %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOGEN %s
// RUN: llvm-profdata merge %S/Inputs/c-general.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v5 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v3 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v5 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v3 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
// Also check compatibility with older profiles.
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v1 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-general.c %s -o - -emit-llvm -fprofile-instrument-use-path=%S/Inputs/c-general.profdata.v1 | FileCheck -allow-deprecated-dag-overlap -check-prefix=PGOUSE %s
// PGOGEN: @[[SLC:__profc_simple_loops]] = private global [4 x i64] zeroinitializer
// PGOGEN: @[[IFC:__profc_conditionals]] = private global [13 x i64] zeroinitializer
@@ -24,7 +24,7 @@
// PGOGEN-LABEL: @simple_loops()
// PGOUSE-LABEL: @simple_loops()
-// PGOGEN: store {{.*}} @[[SLC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[SLC]]
void simple_loops(void) {
int i;
// PGOGEN: store {{.*}} @[[SLC]], i32 0, i32 1
@@ -45,7 +45,7 @@ void simple_loops(void) {
// PGOGEN-LABEL: @conditionals()
// PGOUSE-LABEL: @conditionals()
-// PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[IFC]]
void conditionals(void) {
// PGOGEN: store {{.*}} @[[IFC]], i32 0, i32 1
// PGOUSE: br {{.*}} !prof ![[IF1:[0-9]+]]
@@ -86,7 +86,7 @@ void conditionals(void) {
// PGOGEN-LABEL: @early_exits()
// PGOUSE-LABEL: @early_exits()
-// PGOGEN: store {{.*}} @[[EEC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[EEC]]
void early_exits(void) {
int i = 0;
@@ -133,7 +133,7 @@ void early_exits(void) {
// PGOGEN-LABEL: @jumps()
// PGOUSE-LABEL: @jumps()
-// PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[JMC]]
void jumps(void) {
int i;
@@ -215,7 +215,7 @@ void jumps(void) {
// PGOGEN-LABEL: @switches()
// PGOUSE-LABEL: @switches()
-// PGOGEN: store {{.*}} @[[SWC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[SWC]]
void switches(void) {
static int weights[] = {1, 2, 2, 3, 3, 3, 4, 4, 4, 4, 5, 5, 5, 5, 5};
@@ -288,7 +288,7 @@ void switches(void) {
// PGOGEN-LABEL: @big_switch()
// PGOUSE-LABEL: @big_switch()
-// PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[BSC]]
void big_switch(void) {
// PGOGEN: store {{.*}} @[[BSC]], i32 0, i32 1
// PGOUSE: br {{.*}} !prof ![[BS1:[0-9]+]]
@@ -355,7 +355,7 @@ void big_switch(void) {
// PGOGEN-LABEL: @boolean_operators()
// PGOUSE-LABEL: @boolean_operators()
-// PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[BOC]]
void boolean_operators(void) {
int v;
// PGOGEN: store {{.*}} @[[BOC]], i32 0, i32 1
@@ -394,7 +394,7 @@ void boolean_operators(void) {
// PGOGEN-LABEL: @boolop_loops()
// PGOUSE-LABEL: @boolop_loops()
-// PGOGEN: store {{.*}} @[[BLC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[BLC]]
void boolop_loops(void) {
int i = 100;
@@ -434,7 +434,7 @@ void boolop_loops(void) {
// PGOGEN-LABEL: @conditional_operator()
// PGOUSE-LABEL: @conditional_operator()
-// PGOGEN: store {{.*}} @[[COC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[COC]]
void conditional_operator(void) {
int i = 100;
@@ -452,7 +452,7 @@ void conditional_operator(void) {
// PGOGEN-LABEL: @do_fallthrough()
// PGOUSE-LABEL: @do_fallthrough()
-// PGOGEN: store {{.*}} @[[DFC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[DFC]]
void do_fallthrough(void) {
// PGOGEN: store {{.*}} @[[DFC]], i32 0, i32 1
// PGOUSE: br {{.*}} !prof ![[DF1:[0-9]+]]
@@ -474,7 +474,7 @@ void do_fallthrough(void) {
// PGOGEN-LABEL: @static_func()
// PGOUSE-LABEL: @static_func()
-// PGOGEN: store {{.*}} @[[STC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[STC]]
static void static_func(void) {
// PGOGEN: store {{.*}} @[[STC]], i32 0, i32 1
// PGOUSE: br {{.*}} !prof ![[ST1:[0-9]+]]
diff --git a/clang/test/Profile/c-indirect-call.c b/clang/test/Profile/c-indirect-call.c
index 731f571e8c0c1..0be60e80641b2 100644
--- a/clang/test/Profile/c-indirect-call.c
+++ b/clang/test/Profile/c-indirect-call.c
@@ -1,22 +1,22 @@
// Check the value profiling intrinsics emitted by instrumentation.
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-indirect-call.c %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling | FileCheck --check-prefix=NOEXT %s
-// RUN: %clang_cc1 -no-opaque-pointers -triple s390x-ibm-linux -main-file-name c-indirect-call.c %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling | FileCheck --check-prefix=EXT %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-indirect-call.c %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling | FileCheck --check-prefix=NOEXT %s
+// RUN: %clang_cc1 -triple s390x-ibm-linux -main-file-name c-indirect-call.c %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling | FileCheck --check-prefix=EXT %s
void (*foo)(void);
int main(void) {
-// NOEXT: [[REG1:%[0-9]+]] = load void ()*, void ()** @foo, align 8
-// NOEXT-NEXT: [[REG2:%[0-9]+]] = ptrtoint void ()* [[REG1]] to i64
-// NOEXT-NEXT: call void @__llvm_profile_instrument_target(i64 [[REG2]], i8* bitcast ({{.*}}* @__profd_main to i8*), i32 0)
+// NOEXT: [[REG1:%[0-9]+]] = load ptr, ptr @foo, align 8
+// NOEXT-NEXT: [[REG2:%[0-9]+]] = ptrtoint ptr [[REG1]] to i64
+// NOEXT-NEXT: call void @__llvm_profile_instrument_target(i64 [[REG2]], ptr @__profd_main, i32 0)
// NOEXT-NEXT: call void [[REG1]]()
-// EXT: [[REG1:%[0-9]+]] = load void ()*, void ()** @foo, align 8
-// EXT-NEXT: [[REG2:%[0-9]+]] = ptrtoint void ()* [[REG1]] to i64
-// EXT-NEXT: call void @__llvm_profile_instrument_target(i64 [[REG2]], i8* bitcast ({{.*}}* @__profd_main to i8*), i32 zeroext 0)
+// EXT: [[REG1:%[0-9]+]] = load ptr, ptr @foo, align 8
+// EXT-NEXT: [[REG2:%[0-9]+]] = ptrtoint ptr [[REG1]] to i64
+// EXT-NEXT: call void @__llvm_profile_instrument_target(i64 [[REG2]], ptr @__profd_main, i32 zeroext 0)
// EXT-NEXT: call void [[REG1]]()
foo();
return 0;
}
-// NOEXT: declare void @__llvm_profile_instrument_target(i64, i8*, i32)
-// EXT: declare void @__llvm_profile_instrument_target(i64, i8*, i32 zeroext)
+// NOEXT: declare void @__llvm_profile_instrument_target(i64, ptr, i32)
+// EXT: declare void @__llvm_profile_instrument_target(i64, ptr, i32 zeroext)
diff --git a/clang/test/Profile/c-linkage-available_externally.c b/clang/test/Profile/c-linkage-available_externally.c
index 9a35d067460e1..f6375e15f451a 100644
--- a/clang/test/Profile/c-linkage-available_externally.c
+++ b/clang/test/Profile/c-linkage-available_externally.c
@@ -1,9 +1,9 @@
// Make sure instrumentation data from available_externally functions doesn't
// get thrown out and are emitted with the expected linkage.
-// RUN: %clang_cc1 -no-opaque-pointers -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
+// RUN: %clang_cc1 -O2 -triple x86_64-apple-macosx10.9 -main-file-name c-linkage-available_externally.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
// CHECK: @__profc_foo = linkonce_odr hidden global [1 x i64] zeroinitializer, section "__DATA,__llvm_prf_cnts", align 8
-// CHECK: @__profd_foo = linkonce_odr hidden global {{.*}} i64 sub (i64 ptrtoint ([1 x i64]* @__profc_foo to i64), i64 ptrtoint ({ i64, i64, i64, i8*, i8*, i32, [2 x i16] }* @__profd_foo to i64)), {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
+// CHECK: @__profd_foo = linkonce_odr hidden global {{.*}} i64 sub (i64 ptrtoint (ptr @__profc_foo to i64), i64 ptrtoint (ptr @__profd_foo to i64)), {{.*}}, section "__DATA,__llvm_prf_data,regular,live_support", align 8
inline int foo(void) { return 1; }
int main(void) {
diff --git a/clang/test/Profile/c-ternary.c b/clang/test/Profile/c-ternary.c
index 45ba319fff99b..680bb91317564 100644
--- a/clang/test/Profile/c-ternary.c
+++ b/clang/test/Profile/c-ternary.c
@@ -1,4 +1,4 @@
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.11.0 -x c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.11.0 -x c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
// PR32019: Clang can lower some ternary operator expressions to select
// instructions. Make sure we only increment the profile counter for the
@@ -7,7 +7,7 @@
int f1(int x) {
// CHECK: [[TOBOOL:%.*]] = icmp ne i32 %{{.*}}, 0
// CHECK-NEXT: [[STEP:%.*]] = zext i1 [[TOBOOL]] to i64
- // CHECK-NEXT: [[COUNTER:%.*]] = load i64, i64* getelementptr inbounds ([2 x i64], [2 x i64]* @__profc_f1, i32 0, i32 1)
+ // CHECK-NEXT: [[COUNTER:%.*]] = load i64, ptr getelementptr inbounds ([2 x i64], ptr @__profc_f1, i32 0, i32 1)
// CHECK-NEXT: add i64 [[COUNTER]], [[STEP]]
// CHECK: [[COND:%.*]] = select i1 [[TOBOOL]], i32 0, i32 1
return x ? 0 : 1;
diff --git a/clang/test/Profile/c-unprofiled-blocks.c b/clang/test/Profile/c-unprofiled-blocks.c
index fc633057e9806..e25bbc50de2ba 100644
--- a/clang/test/Profile/c-unprofiled-blocks.c
+++ b/clang/test/Profile/c-unprofiled-blocks.c
@@ -2,7 +2,7 @@
// runs) shouldn't have any branch weight metadata added.
// RUN: llvm-profdata merge %S/Inputs/c-unprofiled-blocks.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled-blocks.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -check-prefix=PGOUSE %s
+// RUN: %clang_cc1 -triple x86_64-apple-macosx10.9 -main-file-name c-unprofiled-blocks.c %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata | FileCheck -check-prefix=PGOUSE %s
// PGOUSE-LABEL: @never_called(i32 noundef %i)
int never_called(int i) {
@@ -62,7 +62,7 @@ int dead_code(int i) {
return 2;
}
-// PGOUSE-LABEL: @main(i32 noundef %argc, i8** noundef %argv)
+// PGOUSE-LABEL: @main(i32 noundef %argc, ptr noundef %argv)
int main(int argc, const char *argv[]) {
dead_code(0);
return 0;
diff --git a/clang/test/Profile/c-unreachable-after-switch.c b/clang/test/Profile/c-unreachable-after-switch.c
index 0fe0292793419..34d2742f7a3b2 100644
--- a/clang/test/Profile/c-unreachable-after-switch.c
+++ b/clang/test/Profile/c-unreachable-after-switch.c
@@ -1,9 +1,9 @@
-// RUN: %clang_cc1 -no-opaque-pointers -O3 -triple x86_64-apple-macosx10.10 -main-file-name c-unreachable-after-switch.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
+// RUN: %clang_cc1 -O3 -triple x86_64-apple-macosx10.10 -main-file-name c-unreachable-after-switch.c %s -o - -emit-llvm -fprofile-instrument=clang | FileCheck %s
// CHECK: @[[C:__profc_foo]] = private global [3 x i64] zeroinitializer
// CHECK-LABEL: @foo()
-// CHECK: store {{.*}} @[[C]], i64 0, i64 0
+// CHECK: store {{.*}} @[[C]]
void foo(void) {
// CHECK: store {{.*}} @[[C]], i64 0, i64 2
switch (0) {
diff --git a/clang/test/Profile/cxx-abc-deleting-dtor.cpp b/clang/test/Profile/cxx-abc-deleting-dtor.cpp
index bda57a35f3b1c..c65a8e8013c35 100644
--- a/clang/test/Profile/cxx-abc-deleting-dtor.cpp
+++ b/clang/test/Profile/cxx-abc-deleting-dtor.cpp
@@ -1,7 +1,7 @@
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -std=c++11 -o - -fno-rtti \
+// RUN: %clang_cc1 -emit-llvm %s -std=c++11 -o - -fno-rtti \
// RUN: -fprofile-instrument=clang -fcoverage-mapping -disable-llvm-passes \
// RUN: -triple=x86_64-windows-msvc | FileCheck %s --check-prefix=MSVC
-// RUN: %clang_cc1 -no-opaque-pointers -emit-llvm %s -std=c++11 -o - -fno-rtti \
+// RUN: %clang_cc1 -emit-llvm %s -std=c++11 -o - -fno-rtti \
// RUN: -fprofile-instrument=clang -fcoverage-mapping -disable-llvm-passes \
// RUN: -triple=x86_64-linux-gnu | FileCheck %s --check-prefix=LINUX
@@ -24,12 +24,12 @@ DerivedABC *useABCVTable() { return new DerivedABC(); }
// MSVC: @"__profn_??1ABC@@{{.*}}" =
// MSVC-NOT: @"__profn_??_G{{.*}}" =
-// MSVC-LABEL: define linkonce_odr dso_local noundef i8* @"??_GDerivedABC@@UEAAPEAXI at Z"(%struct.DerivedABC* {{[^,]*}} %this, {{.*}})
+// MSVC-LABEL: define linkonce_odr dso_local noundef ptr @"??_GDerivedABC@@UEAAPEAXI at Z"(ptr {{[^,]*}} %this, {{.*}})
// MSVC-NOT: call void @llvm.instrprof.increment({{.*}})
// MSVC: call void @"??1DerivedABC@@UEAA at XZ"({{.*}})
// MSVC: ret void
-// MSVC-LABEL: define linkonce_odr dso_local noundef i8* @"??_GABC@@UEAAPEAXI at Z"(%struct.ABC* {{[^,]*}} %this, {{.*}})
+// MSVC-LABEL: define linkonce_odr dso_local noundef ptr @"??_GABC@@UEAAPEAXI at Z"(ptr {{[^,]*}} %this, {{.*}})
// MSVC-NOT: call void @llvm.instrprof.increment({{.*}})
// MSVC: call void @llvm.trap()
// MSVC-NEXT: unreachable
@@ -52,32 +52,32 @@ DerivedABC *useABCVTable() { return new DerivedABC(); }
// LINUX: @__profn__ZN3ABCD2Ev =
// LINUX-NOT: @__profn_{{.*D[01]Ev}} =
-// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD1Ev(%struct.DerivedABC* {{[^,]*}} %this)
+// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD1Ev(ptr {{[^,]*}} %this)
// LINUX-NOT: call void @llvm.instrprof.increment({{.*}})
// LINUX: call void @_ZN10DerivedABCD2Ev({{.*}})
// LINUX: ret void
-// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD0Ev(%struct.DerivedABC* {{[^,]*}} %this)
+// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD0Ev(ptr {{[^,]*}} %this)
// LINUX-NOT: call void @llvm.instrprof.increment({{.*}})
// LINUX: call void @_ZN10DerivedABCD1Ev({{.*}})
// LINUX: call void @_ZdlPv({{.*}})
// LINUX: ret void
-// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD1Ev(%struct.ABC* {{[^,]*}} %this)
+// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD1Ev(ptr {{[^,]*}} %this)
// LINUX-NOT: call void @llvm.instrprof.increment({{.*}})
// LINUX: call void @llvm.trap()
// LINUX-NEXT: unreachable
-// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD0Ev(%struct.ABC* {{[^,]*}} %this)
+// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD0Ev(ptr {{[^,]*}} %this)
// LINUX-NOT: call void @llvm.instrprof.increment({{.*}})
// LINUX: call void @llvm.trap()
// LINUX-NEXT: unreachable
-// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD2Ev(%struct.DerivedABC* {{[^,]*}} %this)
+// LINUX-LABEL: define linkonce_odr void @_ZN10DerivedABCD2Ev(ptr {{[^,]*}} %this)
// LINUX: call void @llvm.instrprof.increment({{.*}})
// LINUX: call void @_ZN3ABCD2Ev({{.*}})
// LINUX: ret void
-// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD2Ev(%struct.ABC* {{[^,]*}} %this)
+// LINUX-LABEL: define linkonce_odr void @_ZN3ABCD2Ev(ptr {{[^,]*}} %this)
// LINUX: call void @llvm.instrprof.increment({{.*}})
// LINUX: ret void
diff --git a/clang/test/Profile/cxx-class.cpp b/clang/test/Profile/cxx-class.cpp
index 24b2ff19c0b17..c38a81e0d86e8 100644
--- a/clang/test/Profile/cxx-class.cpp
+++ b/clang/test/Profile/cxx-class.cpp
@@ -1,6 +1,6 @@
// Tests for instrumentation of C++ methods, constructors, and destructors.
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument=clang -triple %itanium_abi_triple > %tgen
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=clang -triple %itanium_abi_triple > %tgen
// RUN: FileCheck --input-file=%tgen -check-prefix=CTRGEN %s
// RUN: FileCheck --input-file=%tgen -check-prefix=DTRGEN %s
// RUN: FileCheck --input-file=%tgen -check-prefix=MTHGEN %s
@@ -9,7 +9,7 @@
// RUN: FileCheck --input-file=%tgen -check-prefix=VDTRGEN %s
// RUN: llvm-profdata merge %S/Inputs/cxx-class.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -triple %itanium_abi_triple > %tuse
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -triple %itanium_abi_triple > %tuse
// RUN: FileCheck --input-file=%tuse -check-prefix=CTRUSE %s
// RUN: FileCheck --input-file=%tuse -check-prefix=DTRUSE %s
// RUN: FileCheck --input-file=%tuse -check-prefix=MTHUSE %s
@@ -22,7 +22,7 @@ class Simple {
int Member;
// CTRGEN-LABEL: define {{.*}} @_ZN6SimpleC2Ei(
// CTRUSE-LABEL: define {{.*}} @_ZN6SimpleC2Ei(
- // CTRGEN: store {{.*}} @[[SCC:__profc__ZN6SimpleC2Ei]], i32 0, i32 0
+ // CTRGEN: store {{.*}} @[[SCC:__profc__ZN6SimpleC2Ei]]
explicit Simple(int Member) : Member(Member) {
// CTRGEN: store {{.*}} @[[SCC]], i32 0, i32 1
// CTRUSE: br {{.*}} !prof ![[SC1:[0-9]+]]
@@ -35,7 +35,7 @@ class Simple {
// DTRGEN-LABEL: define {{.*}} @_ZN6SimpleD2Ev(
// DTRUSE-LABEL: define {{.*}} @_ZN6SimpleD2Ev(
- // DTRGEN: store {{.*}} @[[SDC:__profc__ZN6SimpleD2Ev]], i32 0, i32 0
+ // DTRGEN: store {{.*}} @[[SDC:__profc__ZN6SimpleD2Ev]]
~Simple() {
// DTRGEN: store {{.*}} @[[SDC]], i32 0, i32 1
// DTRUSE: br {{.*}} !prof ![[SD1:[0-9]+]]
@@ -48,7 +48,7 @@ class Simple {
// MTHGEN-LABEL: define {{.*}} @_ZN6Simple6methodEv(
// MTHUSE-LABEL: define {{.*}} @_ZN6Simple6methodEv(
- // MTHGEN: store {{.*}} @[[SMC:__profc__ZN6Simple6methodEv]], i32 0, i32 0
+ // MTHGEN: store {{.*}} @[[SMC:__profc__ZN6Simple6methodEv]]
void method() {
// MTHGEN: store {{.*}} @[[SMC]], i32 0, i32 1
// MTHUSE: br {{.*}} !prof ![[SM1:[0-9]+]]
@@ -64,7 +64,7 @@ class Derived : virtual public Simple {
public:
// VCTRGEN-LABEL: define {{.*}} @_ZN7DerivedC1Ev(
// VCTRUSE-LABEL: define {{.*}} @_ZN7DerivedC1Ev(
- // VCTRGEN: store {{.*}} @[[SCC:__profc__ZN7DerivedC1Ev]], i32 0, i32 0
+ // VCTRGEN: store {{.*}} @[[SCC:__profc__ZN7DerivedC1Ev]]
Derived() : Simple(0) {
// VCTRGEN: store {{.*}} @[[SCC]], i32 0, i32 1
// VCTRUSE: br {{.*}} !prof ![[SC1:[0-9]+]]
@@ -77,7 +77,7 @@ class Derived : virtual public Simple {
// VDTRGEN-LABEL: define {{.*}} @_ZN7DerivedD2Ev(
// VDTRUSE-LABEL: define {{.*}} @_ZN7DerivedD2Ev(
- // VDTRGEN: store {{.*}} @[[SDC:__profc__ZN7DerivedD2Ev]], i32 0, i32 0
+ // VDTRGEN: store {{.*}} @[[SDC:__profc__ZN7DerivedD2Ev]]
~Derived() {
// VDTRGEN: store {{.*}} @[[SDC]], i32 0, i32 1
// VDTRUSE: br {{.*}} !prof ![[SD1:[0-9]+]]
@@ -91,7 +91,7 @@ class Derived : virtual public Simple {
// WRPGEN-LABEL: define {{.*}} @_Z14simple_wrapperv(
// WRPUSE-LABEL: define {{.*}} @_Z14simple_wrapperv(
-// WRPGEN: store {{.*}} @[[SWC:__profc__Z14simple_wrapperv]], i32 0, i32 0
+// WRPGEN: store {{.*}} @[[SWC:__profc__Z14simple_wrapperv]]
void simple_wrapper() {
// WRPGEN: store {{.*}} @[[SWC]], i32 0, i32 1
// WRPUSE: br {{.*}} !prof ![[SW1:[0-9]+]]
diff --git a/clang/test/Profile/cxx-indirect-call.cpp b/clang/test/Profile/cxx-indirect-call.cpp
index 74a5160b1d2b0..110ade9c1c033 100644
--- a/clang/test/Profile/cxx-indirect-call.cpp
+++ b/clang/test/Profile/cxx-indirect-call.cpp
@@ -1,13 +1,13 @@
// Check the value profiling intrinsics emitted by instrumentation.
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling -fexceptions -fcxx-exceptions -triple x86_64-apple-macosx10.9 | FileCheck %s
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=clang -mllvm -enable-value-profiling -fexceptions -fcxx-exceptions -triple x86_64-apple-macosx10.9 | FileCheck %s
void (*foo) (void);
int main(int argc, const char *argv[]) {
-// CHECK: [[REG1:%[0-9]+]] = load void ()*, void ()** @foo
-// CHECK-NEXT: [[REG2:%[0-9]+]] = ptrtoint void ()* [[REG1]] to i64
-// CHECK-NEXT: call void @__llvm_profile_instrument_target(i64 [[REG2]], i8* bitcast ({{.*}}* @__profd_main to i8*), i32 0)
+// CHECK: [[REG1:%[0-9]+]] = load ptr, ptr @foo
+// CHECK-NEXT: [[REG2:%[0-9]+]] = ptrtoint ptr [[REG1]] to i64
+// CHECK-NEXT: call void @__llvm_profile_instrument_target(i64 [[REG2]], ptr @__profd_main, i32 0)
// CHECK-NEXT: invoke void [[REG1]]()
try {
foo();
@@ -15,7 +15,7 @@ int main(int argc, const char *argv[]) {
return 0;
}
-// CHECK: declare void @__llvm_profile_instrument_target(i64, i8*, i32)
+// CHECK: declare void @__llvm_profile_instrument_target(i64, ptr, i32)
diff --git a/clang/test/Profile/cxx-lambda.cpp b/clang/test/Profile/cxx-lambda.cpp
index 9625c5acbd18f..589f922c70782 100644
--- a/clang/test/Profile/cxx-lambda.cpp
+++ b/clang/test/Profile/cxx-lambda.cpp
@@ -1,11 +1,11 @@
// Tests for instrumentation of C++11 lambdas
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen
// RUN: FileCheck -allow-deprecated-dag-overlap --input-file=%tgen -check-prefix=PGOGEN %s
// RUN: FileCheck -allow-deprecated-dag-overlap --input-file=%tgen -check-prefix=LMBGEN %s
// RUN: llvm-profdata merge %S/Inputs/cxx-lambda.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-lambda.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse
// RUN: FileCheck -allow-deprecated-dag-overlap --input-file=%tuse -check-prefix=PGOUSE %s
// RUN: FileCheck -allow-deprecated-dag-overlap --input-file=%tuse -check-prefix=LMBUSE %s
@@ -15,13 +15,13 @@
// PGOGEN-LABEL: define {{.*}}void @_Z7lambdasv()
// PGOUSE-LABEL: define {{.*}}void @_Z7lambdasv()
-// PGOGEN: store {{.*}} @[[LWC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[LWC]]
void lambdas() {
int i = 1;
// LMBGEN-LABEL: define internal{{( [0-9_a-z]*cc)?( noundef)?( zeroext)?}} i1 @"_ZZ7lambdasvENK3$_0clEi"(
// LMBUSE-LABEL: define internal{{( [0-9_a-z]*cc)?( noundef)?( zeroext)?}} i1 @"_ZZ7lambdasvENK3$_0clEi"(
- // LMBGEN: store {{.*}} @[[LFC]], i32 0, i32 0
+ // LMBGEN: store {{.*}} @[[LFC]]
auto f = [&i](int k) {
// LMBGEN: store {{.*}} @[[LFC]], i32 0, i32 1
// LMBUSE: br {{.*}} !prof ![[LF1:[0-9]+]]
diff --git a/clang/test/Profile/cxx-rangefor.cpp b/clang/test/Profile/cxx-rangefor.cpp
index c24a953432502..58c578c3c1017 100644
--- a/clang/test/Profile/cxx-rangefor.cpp
+++ b/clang/test/Profile/cxx-rangefor.cpp
@@ -1,16 +1,16 @@
// Tests for instrumentation of C++11 range-for
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-rangefor.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-rangefor.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen
// RUN: FileCheck --input-file=%tgen -check-prefix=CHECK -check-prefix=PGOGEN %s
// RUN: llvm-profdata merge %S/Inputs/cxx-rangefor.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-rangefor.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-rangefor.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse
// RUN: FileCheck --input-file=%tuse -check-prefix=CHECK -check-prefix=PGOUSE %s
// PGOGEN: @[[RFC:__profc__Z9range_forv]] = {{(private|internal)}} global [5 x i64] zeroinitializer
// CHECK-LABEL: define {{.*}}void @_Z9range_forv()
-// PGOGEN: store {{.*}} @[[RFC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[RFC]]
void range_for() {
int arr[] = {1, 2, 3, 4, 5};
int sum = 0;
diff --git a/clang/test/Profile/cxx-stmt-initializers.cpp b/clang/test/Profile/cxx-stmt-initializers.cpp
index 8efc750e84dcd..a02be89c8e14d 100644
--- a/clang/test/Profile/cxx-stmt-initializers.cpp
+++ b/clang/test/Profile/cxx-stmt-initializers.cpp
@@ -1,6 +1,6 @@
// Tests for instrumentation of C++17 statement initializers
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-stmt-initializers.cpp -std=c++1z -o - -emit-llvm -fprofile-instrument=clang > %tgen
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-stmt-initializers.cpp -std=c++1z -o - -emit-llvm -fprofile-instrument=clang > %tgen
// RUN: FileCheck --input-file=%tgen -check-prefix=CHECK -check-prefix=PGOGEN %s
// PGOGEN: @[[SIC:__profc__Z11switch_initv]] = {{(private|internal)}} global [3 x i64] zeroinitializer
@@ -10,7 +10,7 @@
// switch initializer, and the switch successor block.
//
// CHECK-LABEL: define {{.*}}void @_Z11switch_initv()
-// PGOGEN: store {{.*}} @[[SIC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[SIC]]
void switch_init() {
switch (int i = true ? 0 : 1; i) {}
// PGOGEN: store {{.*}} @[[SIC]], i32 0, i32 2
@@ -21,7 +21,7 @@ void switch_init() {
// if initializer, and the if successor block.
//
// CHECK-LABEL: define {{.*}}void @_Z7if_initv()
-// PGOGEN: store {{.*}} @[[IIC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[IIC]]
void if_init() {
if (int i = true ? 0 : 1; i) {}
// PGOGEN: store {{.*}} @[[IIC]], i32 0, i32 2
diff --git a/clang/test/Profile/cxx-templates.cpp b/clang/test/Profile/cxx-templates.cpp
index a8fefad0c59ae..51c8f1f6d1edd 100644
--- a/clang/test/Profile/cxx-templates.cpp
+++ b/clang/test/Profile/cxx-templates.cpp
@@ -1,12 +1,12 @@
// Tests for instrumentation of templated code. Each instantiation of a template
// should be instrumented separately.
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument=clang > %tgen
// RUN: FileCheck --input-file=%tgen -check-prefix=T0GEN -check-prefix=ALL %s
// RUN: FileCheck --input-file=%tgen -check-prefix=T100GEN -check-prefix=ALL %s
// RUN: llvm-profdata merge %S/Inputs/cxx-templates.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse
+// RUN: %clang_cc1 -x c++ %s -triple %itanium_abi_triple -main-file-name cxx-templates.cpp -std=c++11 -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata > %tuse
// RUN: FileCheck --input-file=%tuse -check-prefix=T0USE -check-prefix=ALL %s
// RUN: FileCheck --input-file=%tuse -check-prefix=T100USE -check-prefix=ALL %s
@@ -21,8 +21,8 @@
// T100USE-LABEL: define linkonce_odr {{.*}}void @_Z4loopILj100EEvv()
template <unsigned N> void loop() {
// ALL-NOT: ret
- // T0GEN: store {{.*}} @[[T0C]], i32 0, i32 0
- // T100GEN: store {{.*}} @[[T100C]], i32 0, i32 0
+ // T0GEN: store {{.*}} @[[T0C]]
+ // T100GEN: store {{.*}} @[[T100C]]
// ALL-NOT: ret
// T0GEN: store {{.*}} @[[T0C]], i32 0, i32 1
diff --git a/clang/test/Profile/cxx-throws.cpp b/clang/test/Profile/cxx-throws.cpp
index 6719f91994b7f..e989c2d39dfbb 100644
--- a/clang/test/Profile/cxx-throws.cpp
+++ b/clang/test/Profile/cxx-throws.cpp
@@ -3,12 +3,12 @@
// FIXME: Don't seek bb labels, like "if.else"
// REQUIRES: asserts
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument=clang -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOGEN %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument=clang -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOGEN-EXC %s
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=clang -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOGEN %s
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument=clang -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOGEN-EXC %s
// RUN: llvm-profdata merge %S/Inputs/cxx-throws.proftext -o %t.profdata
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOUSE %s
-// RUN: %clang_cc1 -no-opaque-pointers %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOUSE-EXC %s
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOUSE %s
+// RUN: %clang_cc1 %s -o - -emit-llvm -fprofile-instrument-use-path=%t.profdata -fexceptions -fcxx-exceptions -triple %itanium_abi_triple | FileCheck -check-prefix=PGOUSE-EXC %s
// PGOGEN: @[[THC:__profc__Z6throwsv]] = {{(private|internal)}} global [9 x i64] zeroinitializer
// PGOGEN-EXC: @[[THC:__profc__Z6throwsv]] = {{(private|internal)}} global [9 x i64] zeroinitializer
@@ -16,7 +16,7 @@
// PGOGEN-LABEL: @_Z6throwsv()
// PGOUSE-LABEL: @_Z6throwsv()
-// PGOGEN: store {{.*}} @[[THC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[THC]]
void throws() {
// PGOGEN: store {{.*}} @[[THC]], i32 0, i32 1
// PGOUSE: br {{.*}} !prof ![[TH1:[0-9]+]]
@@ -63,7 +63,7 @@ void throws() {
// PGOGEN-LABEL: @_Z11unreachablei(i32
// PGOUSE-LABEL: @_Z11unreachablei(i32
-// PGOGEN: store {{.*}} @[[UNC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[UNC]]
void unreachable(int i) {
// PGOGEN: store {{.*}} @[[UNC]], i32 0, i32 1
// PGOUSE: br {{.*}} !prof ![[UN1:[0-9]+]]
More information about the cfe-commits
mailing list