Skip to content
This repository was archived by the owner on Nov 1, 2021. It is now read-only.

Commit 12f3fe3

Browse files
committed
Switch -mcount and -finstrument-functions to emit EnterExitInstrumenter attributes
This updates -mcount to use the new attribute names (LLVM r318195), and switches over -finstrument-functions to also use these attributes rather than inserting instrumentation in the frontend. It also adds a new flag, -finstrument-functions-after-inlining, which makes the cygprofile instrumentation get inserted after inlining rather than before. Differential Revision: https://reviews.llvm.org/D39331 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@318199 91177308-0d34-0410-b5e6-96231b3b80d8
1 parent 4944bbc commit 12f3fe3

File tree

11 files changed

+121
-88
lines changed

11 files changed

+121
-88
lines changed

include/clang/Driver/Options.td

+2
Original file line numberDiff line numberDiff line change
@@ -1028,6 +1028,8 @@ def finput_charset_EQ : Joined<["-"], "finput-charset=">, Group<f_Group>;
10281028
def fexec_charset_EQ : Joined<["-"], "fexec-charset=">, Group<f_Group>;
10291029
def finstrument_functions : Flag<["-"], "finstrument-functions">, Group<f_Group>, Flags<[CC1Option]>,
10301030
HelpText<"Generate calls to instrument function entry and exit">;
1031+
def finstrument_functions_after_inlining : Flag<["-"], "finstrument-functions-after-inlining">, Group<f_Group>, Flags<[CC1Option]>,
1032+
HelpText<"Like -finstrument-functions, but insert the calls after inlining">;
10311033

10321034
def fxray_instrument : Flag<["-"], "fxray-instrument">, Group<f_Group>,
10331035
Flags<[CC1Option]>,

include/clang/Frontend/CodeGenOptions.def

+2
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ CODEGENOPT(ForbidGuardVariables , 1, 0) ///< Issue errors if C++ guard variables
7676
CODEGENOPT(FunctionSections , 1, 0) ///< Set when -ffunction-sections is enabled.
7777
CODEGENOPT(InstrumentFunctions , 1, 0) ///< Set when -finstrument-functions is
7878
///< enabled.
79+
CODEGENOPT(InstrumentFunctionsAfterInlining , 1, 0) ///< Set when
80+
///< -finstrument-functions-after-inlining is enabled.
7981

8082
CODEGENOPT(XRayInstrumentFunctions , 1, 0) ///< Set when -fxray-instrument is
8183
///< enabled.

lib/CodeGen/CodeGenFunction.cpp

+18-32
Original file line numberDiff line numberDiff line change
@@ -354,8 +354,12 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
354354
// Emit function epilog (to return).
355355
llvm::DebugLoc Loc = EmitReturnBlock();
356356

357-
if (ShouldInstrumentFunction())
358-
EmitFunctionInstrumentation("__cyg_profile_func_exit");
357+
if (ShouldInstrumentFunction()) {
358+
CurFn->addFnAttr(!CGM.getCodeGenOpts().InstrumentFunctionsAfterInlining
359+
? "instrument-function-exit"
360+
: "instrument-function-exit-inlined",
361+
"__cyg_profile_func_exit");
362+
}
359363

360364
// Emit debug descriptor for function end.
361365
if (CGDebugInfo *DI = getDebugInfo())
@@ -438,7 +442,8 @@ void CodeGenFunction::FinishFunction(SourceLocation EndLoc) {
438442
/// ShouldInstrumentFunction - Return true if the current function should be
439443
/// instrumented with __cyg_profile_func_* calls
440444
bool CodeGenFunction::ShouldInstrumentFunction() {
441-
if (!CGM.getCodeGenOpts().InstrumentFunctions)
445+
if (!CGM.getCodeGenOpts().InstrumentFunctions &&
446+
!CGM.getCodeGenOpts().InstrumentFunctionsAfterInlining)
442447
return false;
443448
if (!CurFuncDecl || CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>())
444449
return false;
@@ -488,31 +493,6 @@ CodeGenFunction::DecodeAddrUsedInPrologue(llvm::Value *F,
488493
"decoded_addr");
489494
}
490495

491-
/// EmitFunctionInstrumentation - Emit LLVM code to call the specified
492-
/// instrumentation function with the current function and the call site, if
493-
/// function instrumentation is enabled.
494-
void CodeGenFunction::EmitFunctionInstrumentation(const char *Fn) {
495-
auto NL = ApplyDebugLocation::CreateArtificial(*this);
496-
// void __cyg_profile_func_{enter,exit} (void *this_fn, void *call_site);
497-
llvm::PointerType *PointerTy = Int8PtrTy;
498-
llvm::Type *ProfileFuncArgs[] = { PointerTy, PointerTy };
499-
llvm::FunctionType *FunctionTy =
500-
llvm::FunctionType::get(VoidTy, ProfileFuncArgs, false);
501-
502-
llvm::Constant *F = CGM.CreateRuntimeFunction(FunctionTy, Fn);
503-
llvm::CallInst *CallSite = Builder.CreateCall(
504-
CGM.getIntrinsic(llvm::Intrinsic::returnaddress),
505-
llvm::ConstantInt::get(Int32Ty, 0),
506-
"callsite");
507-
508-
llvm::Value *args[] = {
509-
llvm::ConstantExpr::getBitCast(CurFn, PointerTy),
510-
CallSite
511-
};
512-
513-
EmitNounwindRuntimeCall(F, args);
514-
}
515-
516496
static void removeImageAccessQualifier(std::string& TyName) {
517497
std::string ReadOnlyQual("__read_only");
518498
std::string::size_type ReadOnlyPos = TyName.find(ReadOnlyQual);
@@ -1001,8 +981,12 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
1001981
DI->EmitFunctionStart(GD, Loc, StartLoc, FnType, CurFn, Builder);
1002982
}
1003983

1004-
if (ShouldInstrumentFunction())
1005-
EmitFunctionInstrumentation("__cyg_profile_func_enter");
984+
if (ShouldInstrumentFunction()) {
985+
Fn->addFnAttr(!CGM.getCodeGenOpts().InstrumentFunctionsAfterInlining
986+
? "instrument-function-entry"
987+
: "instrument-function-entry-inlined",
988+
"__cyg_profile_func_enter");
989+
}
1006990

1007991
// Since emitting the mcount call here impacts optimizations such as function
1008992
// inlining, we just add an attribute to insert a mcount call in backend.
@@ -1012,8 +996,10 @@ void CodeGenFunction::StartFunction(GlobalDecl GD,
1012996
if (CGM.getCodeGenOpts().CallFEntry)
1013997
Fn->addFnAttr("fentry-call", "true");
1014998
else {
1015-
if (!CurFuncDecl || !CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>())
1016-
Fn->addFnAttr("counting-function", getTarget().getMCountName());
999+
if (!CurFuncDecl || !CurFuncDecl->hasAttr<NoInstrumentFunctionAttr>()) {
1000+
Fn->addFnAttr("instrument-function-entry-inlined",
1001+
getTarget().getMCountName());
1002+
}
10171003
}
10181004
}
10191005

lib/CodeGen/CodeGenFunction.h

-5
Original file line numberDiff line numberDiff line change
@@ -1784,11 +1784,6 @@ class CodeGenFunction : public CodeGenTypeCache {
17841784
/// instrumented with XRay nop sleds.
17851785
bool ShouldXRayInstrumentFunction() const;
17861786

1787-
/// EmitFunctionInstrumentation - Emit LLVM code to call the specified
1788-
/// instrumentation function with the current function and the call site, if
1789-
/// function instrumentation is enabled.
1790-
void EmitFunctionInstrumentation(const char *Fn);
1791-
17921787
/// Encode an address into a form suitable for use in a function prologue.
17931788
llvm::Constant *EncodeAddrForUseInPrologue(llvm::Function *F,
17941789
llvm::Constant *Addr);

lib/Driver/ToolChains/Clang.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -3545,7 +3545,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
35453545
options::OPT_fno_unique_section_names, true))
35463546
CmdArgs.push_back("-fno-unique-section-names");
35473547

3548-
Args.AddAllArgs(CmdArgs, options::OPT_finstrument_functions);
3548+
Args.AddLastArg(CmdArgs, options::OPT_finstrument_functions,
3549+
options::OPT_finstrument_functions_after_inlining);
35493550

35503551
addPGOAndCoverageFlags(C, D, Output, Args, CmdArgs);
35513552

lib/Frontend/CompilerInvocation.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -777,6 +777,8 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
777777

778778
Opts.PreserveVec3Type = Args.hasArg(OPT_fpreserve_vec3_type);
779779
Opts.InstrumentFunctions = Args.hasArg(OPT_finstrument_functions);
780+
Opts.InstrumentFunctionsAfterInlining =
781+
Args.hasArg(OPT_finstrument_functions_after_inlining);
780782
Opts.XRayInstrumentFunctions = Args.hasArg(OPT_fxray_instrument);
781783
Opts.XRayInstructionThreshold =
782784
getLastArgIntValue(Args, OPT_fxray_instruction_threshold_EQ, 200, Diags);

test/CodeGen/instrument-functions.c

+10-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
1-
// RUN: %clang_cc1 -S -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-functions | FileCheck %s
1+
// RUN: %clang_cc1 -S -debug-info-kind=standalone -emit-llvm -o - %s -finstrument-functions -disable-llvm-passes | FileCheck %s
22

3-
// CHECK: @test1
43
int test1(int x) {
5-
// CHECK: call void @__cyg_profile_func_enter({{.*}}, !dbg
6-
// CHECK: call void @__cyg_profile_func_exit({{.*}}, !dbg
4+
// CHECK: define i32 @test1(i32 %x) #[[ATTR1:[0-9]+]]
75
// CHECK: ret
86
return x;
97
}
108

11-
// CHECK: @test2
129
int test2(int) __attribute__((no_instrument_function));
1310
int test2(int x) {
14-
// CHECK-NOT: __cyg_profile_func_enter
15-
// CHECK-NOT: __cyg_profile_func_exit
11+
// CHECK: define i32 @test2(i32 %x) #[[ATTR2:[0-9]+]]
1612
// CHECK: ret
1713
return x;
1814
}
15+
16+
// CHECK: attributes #[[ATTR1]] =
17+
// CHECK-SAME: "instrument-function-entry"="__cyg_profile_func_enter"
18+
// CHECK-SAME: "instrument-function-exit"="__cyg_profile_func_exit"
19+
20+
// CHECK: attributes #[[ATTR2]] =
21+
// CHECK-NOT: "instrument-function-entry"

test/CodeGen/mcount.c

+4-4
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@ int main(void) {
3535
return no_instrument();
3636
}
3737

38-
// CHECK: attributes #0 = { {{.*}}"counting-function"="mcount"{{.*}} }
38+
// CHECK: attributes #0 = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
3939
// CHECK: attributes #1 = { {{.*}} }
40-
// CHECK-PREFIXED: attributes #0 = { {{.*}}"counting-function"="_mcount"{{.*}} }
40+
// CHECK-PREFIXED: attributes #0 = { {{.*}}"instrument-function-entry-inlined"="_mcount"{{.*}} }
4141
// CHECK-PREFIXED: attributes #1 = { {{.*}} }
42-
// NO-MCOUNT-NOT: attributes #{{[0-9]}} = { {{.*}}"counting-function"={{.*}} }
43-
// NO-MCOUNT1-NOT: attributes #1 = { {{.*}}"counting-function"={{.*}} }
42+
// NO-MCOUNT-NOT: attributes #{{[0-9]}} = { {{.*}}"instrument-function-entry-inlined"={{.*}} }
43+
// NO-MCOUNT1-NOT: attributes #1 = { {{.*}}"instrument-function-entry-inlined"={{.*}} }
+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
// REQUIRES: x86-registered-target
2+
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -S -finstrument-functions -O2 -o - %s | FileCheck %s
3+
// RUN: %clang_cc1 -triple x86_64-unknown-unknown -S -finstrument-functions-after-inlining -O2 -o - %s | FileCheck -check-prefix=NOINLINE %s
4+
5+
// It's not so nice having asm tests in Clang, but we need to check that we set
6+
// up the pipeline correctly in order to have the instrumentation inserted.
7+
8+
int leaf(int x) {
9+
return x;
10+
// CHECK-LABEL: leaf:
11+
// CHECK: callq __cyg_profile_func_enter
12+
// CHECK-NOT: cyg_profile
13+
// CHECK: callq __cyg_profile_func_exit
14+
// CHECK-NOT: cyg_profile
15+
// CHECK: ret
16+
}
17+
18+
int root(int x) {
19+
return leaf(x);
20+
// CHECK-LABEL: root:
21+
// CHECK: callq __cyg_profile_func_enter
22+
// CHECK-NOT: cyg_profile
23+
24+
// Inlined from leaf():
25+
// CHECK: callq __cyg_profile_func_enter
26+
// CHECK-NOT: cyg_profile
27+
// CHECK: callq __cyg_profile_func_exit
28+
29+
// CHECK-NOT: cyg_profile
30+
// CHECK: callq __cyg_profile_func_exit
31+
// CHECK: ret
32+
33+
// NOINLINE-LABEL: root:
34+
// NOINLINE: callq __cyg_profile_func_enter
35+
// NOINLINE-NOT: cyg_profile
36+
// NOINLINE: callq __cyg_profile_func_exit
37+
// NOINLINE: ret
38+
}

test/CodeGenCXX/instrument-functions.cpp

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,26 @@
1-
// RUN: %clang_cc1 -S -emit-llvm -triple %itanium_abi_triple -o - %s -finstrument-functions | FileCheck %s
1+
// RUN: %clang_cc1 -S -emit-llvm -triple %itanium_abi_triple -o - %s -finstrument-functions -disable-llvm-passes | FileCheck %s
22

3-
// CHECK: @_Z5test1i
43
int test1(int x) {
5-
// CHECK: __cyg_profile_func_enter
6-
// CHECK: __cyg_profile_func_exit
4+
// CHECK: define i32 @_Z5test1i(i32 %x) #[[ATTR1:[0-9]+]]
75
// CHECK: ret
86
return x;
97
}
108

11-
// CHECK: @_Z5test2i
129
int test2(int) __attribute__((no_instrument_function));
1310
int test2(int x) {
14-
// CHECK-NOT: __cyg_profile_func_enter
15-
// CHECK-NOT: __cyg_profile_func_exit
11+
// CHECK: define i32 @_Z5test2i(i32 %x) #[[ATTR2:[0-9]+]]
1612
// CHECK: ret
1713
return x;
1814
}
1915

16+
// CHECK: attributes #[[ATTR1]] =
17+
// CHECK-SAME: "instrument-function-entry"="__cyg_profile_func_enter"
18+
// CHECK-SAME: "instrument-function-exit"="__cyg_profile_func_exit"
19+
20+
// CHECK: attributes #[[ATTR2]] =
21+
// CHECK-NOT: "instrument-function-entry"
22+
23+
2024
// This test case previously crashed code generation. It exists solely
2125
// to test -finstrument-function does not crash codegen for this trivial
2226
// case.

test/Frontend/gnu-mcount.c

+32-32
Original file line numberDiff line numberDiff line change
@@ -43,36 +43,36 @@ int f() {
4343

4444
// CHECK-LABEL: f
4545
// TODO: add profiling support for arm-baremetal
46-
// CHECK-ARM-BAREMETAL-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01mcount"{{.*}} }
47-
// CHECK-ARM-BAREMETAL-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
48-
// CHECK-ARM64-BAREMETAL-EABI: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
49-
// CHECK-ARM64-BAREMETAL-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01_mcount"{{.*}} }
50-
// CHECK-ARM-IOS-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="_mcount"{{.*}} }
51-
// CHECK-ARM-IOS-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
52-
// CHECK-ARM-EABI: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01mcount"{{.*}} }
53-
// CHECK-ARM-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
54-
// CHECK-ARM64-EABI: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
55-
// CHECK-ARM64-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01_mcount"{{.*}} }
56-
// CHECK-ARM64-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
57-
// CHECK-ARM64-EABI-LINUX: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01_mcount"{{.*}} }
58-
// CHECK-ARM-EABI-FREEBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="__mcount"{{.*}} }
59-
// CHECK-ARM-EABI-FREEBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
60-
// CHECK-ARM64-EABI-FREEBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"=".mcount"{{.*}} }
61-
// CHECK-ARM64-EABI-FREEBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
62-
// CHECK-ARM-EABI-NETBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="_mcount"{{.*}} }
63-
// CHECK-ARM-EABI-NETBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
64-
// CHECK-ARM-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="__mcount"{{.*}} }
65-
// CHECK-ARM-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
66-
// CHECK-ARM64-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="__mcount"{{.*}} }
67-
// CHECK-ARM64-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
68-
// CHECK-ARM-EABI-MEABI-GNU-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
69-
// CHECK-ARM-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
70-
// CHECK-ARM-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
71-
// CHECK-ARM-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
72-
// CHECK-ARM64-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
73-
// CHECK-ARM64-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
74-
// CHECK-ARM-EABI-CLOUDABI: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
75-
// CHECK-ARM-EABI-CLOUDABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
76-
// CHECK-ARM64-EABI-CLOUDABI: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="mcount"{{.*}} }
77-
// CHECK-ARM64-EABI-CLOUDABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"counting-function"="\01__gnu_mcount_nc"{{.*}} }
46+
// CHECK-ARM-BAREMETAL-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01mcount"{{.*}} }
47+
// CHECK-ARM-BAREMETAL-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
48+
// CHECK-ARM64-BAREMETAL-EABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
49+
// CHECK-ARM64-BAREMETAL-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01_mcount"{{.*}} }
50+
// CHECK-ARM-IOS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="_mcount"{{.*}} }
51+
// CHECK-ARM-IOS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
52+
// CHECK-ARM-EABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01mcount"{{.*}} }
53+
// CHECK-ARM-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
54+
// CHECK-ARM64-EABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
55+
// CHECK-ARM64-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01_mcount"{{.*}} }
56+
// CHECK-ARM64-EABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
57+
// CHECK-ARM64-EABI-LINUX: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01_mcount"{{.*}} }
58+
// CHECK-ARM-EABI-FREEBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
59+
// CHECK-ARM-EABI-FREEBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
60+
// CHECK-ARM64-EABI-FREEBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"=".mcount"{{.*}} }
61+
// CHECK-ARM64-EABI-FREEBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
62+
// CHECK-ARM-EABI-NETBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="_mcount"{{.*}} }
63+
// CHECK-ARM-EABI-NETBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
64+
// CHECK-ARM-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
65+
// CHECK-ARM-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
66+
// CHECK-ARM64-EABI-OPENBSD: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="__mcount"{{.*}} }
67+
// CHECK-ARM64-EABI-OPENBSD-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
68+
// CHECK-ARM-EABI-MEABI-GNU-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
69+
// CHECK-ARM-EABI-MEABI-GNU: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
70+
// CHECK-ARM-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
71+
// CHECK-ARM-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
72+
// CHECK-ARM64-EABI-RTEMS: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
73+
// CHECK-ARM64-EABI-RTEMS-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
74+
// CHECK-ARM-EABI-CLOUDABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
75+
// CHECK-ARM-EABI-CLOUDABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
76+
// CHECK-ARM64-EABI-CLOUDABI: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="mcount"{{.*}} }
77+
// CHECK-ARM64-EABI-CLOUDABI-NOT: attributes #{{[0-9]+}} = { {{.*}}"instrument-function-entry-inlined"="\01__gnu_mcount_nc"{{.*}} }
7878

0 commit comments

Comments
 (0)