-// 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;
// 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
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
// 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
// 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
// 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]+]]
// 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;
// PGOGEN-LABEL: @jumps()
// PGOUSE-LABEL: @jumps()
-// PGOGEN: store {{.*}} @[[JMC]], i32 0, i32 0
+// PGOGEN: store {{.*}} @[[JMC]]
void jumps(void) {
int i;
// 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};
// 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]+]]
// 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
// 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;
// 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;
// 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]+]]
// 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]+]]
// 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)
// 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) {
-// 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
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;
// 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) {
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;
-// 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) {
-// 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
// MSVC: @"__profn_??1ABC@@{{.*}}" =
// MSVC-NOT: @"__profn_??_G{{.*}}" =
-// MSVC-LABEL: define linkonce_odr dso_local noundef i8* @"??_GDerivedABC@@UEAAPEAXI@Z"(%struct.DerivedABC* {{[^,]*}} %this, {{.*}})
+// MSVC-LABEL: define linkonce_odr dso_local noundef ptr @"??_GDerivedABC@@UEAAPEAXI@Z"(ptr {{[^,]*}} %this, {{.*}})
// MSVC-NOT: call void @llvm.instrprof.increment({{.*}})
// MSVC: call void @"??1DerivedABC@@UEAA@XZ"({{.*}})
// MSVC: ret void
-// MSVC-LABEL: define linkonce_odr dso_local noundef i8* @"??_GABC@@UEAAPEAXI@Z"(%struct.ABC* {{[^,]*}} %this, {{.*}})
+// MSVC-LABEL: define linkonce_odr dso_local noundef ptr @"??_GABC@@UEAAPEAXI@Z"(ptr {{[^,]*}} %this, {{.*}})
// MSVC-NOT: call void @llvm.instrprof.increment({{.*}})
// MSVC: call void @llvm.trap()
// MSVC-NEXT: unreachable
// 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
// 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
// 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
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]+]]
// 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]+]]
// 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]+]]
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]+]]
// 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]+]]
// 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]+]]
// 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();
return 0;
}
-// CHECK: declare void @__llvm_profile_instrument_target(i64, i8*, i32)
+// CHECK: declare void @__llvm_profile_instrument_target(i64, ptr, i32)
// 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
// 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]+]]
// 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;
// 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
// 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
// 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
// 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
// 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
// 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
// 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]+]]
// 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]+]]