[llvm] r318783 - EntryExitInstrumenter: support __cyg_profile_func_enter_bare
Hans Wennborg via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 21 09:22:19 PST 2017
Author: hans
Date: Tue Nov 21 09:22:19 2017
New Revision: 318783
URL: http://llvm.org/viewvc/llvm-project?rev=318783&view=rev
Log:
EntryExitInstrumenter: support __cyg_profile_func_enter_bare
It works just like __cyg_profile_func_enter but takes no arguments.
Modified:
llvm/trunk/lib/Transforms/Utils/EntryExitInstrumenter.cpp
llvm/trunk/test/Transforms/CountingFunctionInserter/mcount.ll
Modified: llvm/trunk/lib/Transforms/Utils/EntryExitInstrumenter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Utils/EntryExitInstrumenter.cpp?rev=318783&r1=318782&r2=318783&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Utils/EntryExitInstrumenter.cpp (original)
+++ llvm/trunk/lib/Transforms/Utils/EntryExitInstrumenter.cpp Tue Nov 21 09:22:19 2017
@@ -29,7 +29,8 @@ static void insertCall(Function &CurFn,
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;
Modified: llvm/trunk/test/Transforms/CountingFunctionInserter/mcount.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/CountingFunctionInserter/mcount.ll?rev=318783&r1=318782&r2=318783&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/CountingFunctionInserter/mcount.ll (original)
+++ llvm/trunk/test/Transforms/CountingFunctionInserter/mcount.ll Tue Nov 21 09:22:19 2017
@@ -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-e
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" }
More information about the llvm-commits
mailing list