diff options
author | Hans Wennborg <hans@hanshq.net> | 2017-11-21 17:22:19 +0000 |
---|---|---|
committer | Hans Wennborg <hans@hanshq.net> | 2017-11-21 17:22:19 +0000 |
commit | 37cbf28e79e739b46c4fb2e8b07296090fbed5fc (patch) | |
tree | f95a0deb3ba62340da3b326c5ed347f76fa7d486 /llvm | |
parent | bcfec0d6d5a2adcff07eb35dcaa73e6ceca727b3 (diff) | |
download | bcm5719-llvm-37cbf28e79e739b46c4fb2e8b07296090fbed5fc.tar.gz bcm5719-llvm-37cbf28e79e739b46c4fb2e8b07296090fbed5fc.zip |
EntryExitInstrumenter: support __cyg_profile_func_enter_bare
It works just like __cyg_profile_func_enter but takes no arguments.
llvm-svn: 318783
Diffstat (limited to 'llvm')
-rw-r--r-- | llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp | 3 | ||||
-rw-r--r-- | llvm/test/Transforms/CountingFunctionInserter/mcount.ll | 5 |
2 files changed, 7 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp b/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp index bdcd3d4cc04..064d7d003a9 100644 --- a/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp +++ b/llvm/lib/Transforms/Utils/EntryExitInstrumenter.cpp @@ -29,7 +29,8 @@ static void insertCall(Function &CurFn, StringRef Func, Func == "\01_mcount" || Func == "\01mcount" || Func == "__mcount" || - Func == "_mcount") { + Func == "_mcount" || + Func == "__cyg_profile_func_enter_bare") { Constant *Fn = M.getOrInsertFunction(Func, Type::getVoidTy(C)); CallInst::Create(Fn, "", InsertionPt); return; diff --git a/llvm/test/Transforms/CountingFunctionInserter/mcount.ll b/llvm/test/Transforms/CountingFunctionInserter/mcount.ll index 6d9aaab18c6..50e6b1321bb 100644 --- a/llvm/test/Transforms/CountingFunctionInserter/mcount.ll +++ b/llvm/test/Transforms/CountingFunctionInserter/mcount.ll @@ -73,6 +73,10 @@ define void @f6() #6 { entry: ret void } ; CHECK-LABEL: define void @f6 ; CHECK: call void @_mcount +define void @f7() #7 { entry: ret void } +; CHECK-LABEL: define void @f7 +; CHECK: call void @__cyg_profile_func_enter_bare + ; The attributes are "consumed" when the instrumentation is inserted. ; CHECK: attributes @@ -84,3 +88,4 @@ attributes #3 = { "instrument-function-entry-inlined"="\01_mcount" } attributes #4 = { "instrument-function-entry-inlined"="\01mcount" } attributes #5 = { "instrument-function-entry-inlined"="__mcount" } attributes #6 = { "instrument-function-entry-inlined"="_mcount" } +attributes #7 = { "instrument-function-entry-inlined"="__cyg_profile_func_enter_bare" } |