llvm-project/llvm/lib/Transforms/IPO
Hans Wennborg e1ecd61b98 Rename CountingFunctionInserter and use for both mcount and cygprofile calls, before and after inlining
Clang implements the -finstrument-functions flag inherited from GCC, which
inserts calls to __cyg_profile_func_{enter,exit} on function entry and exit.

This is useful for getting a trace of how the functions in a program are
executed. Normally, the calls remain even if a function is inlined into another
function, but it is useful to be able to turn this off for users who are
interested in a lower-level trace, i.e. one that reflects what functions are
called post-inlining. (We use this to generate link order files for Chromium.)

LLVM already has a pass for inserting similar instrumentation calls to
mcount(), which it does after inlining. This patch renames and extends that
pass to handle calls both to mcount and the cygprofile functions, before and/or
after inlining as controlled by function attributes.

Differential Revision: https://reviews.llvm.org/D39287

llvm-svn: 318195
2017-11-14 21:09:45 +00:00
..
AlwaysInliner.cpp [PM] Teach the always inliner in the new pass manager to support 2016-12-26 23:43:27 +00:00
ArgumentPromotion.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-19 21:21:30 +00:00
BarrierNoopPass.cpp
CMakeLists.txt Add CalledValuePropagation pass 2017-10-25 13:40:08 +00:00
CalledValuePropagation.cpp Attempt to unbreak the expensive-checks-win bot 2017-10-25 22:46:34 +00:00
ConstantMerge.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
CrossDSOCFI.cpp [cfi] Fixed non-determinism in codegen due to DenseSet iteration order 2017-08-30 04:47:21 +00:00
DeadArgumentElimination.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
ElimAvailExtern.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
ExtractGV.cpp [ExtractGV] Fix the doxygen comment on the constructor and the class to refer to global values instead of functions. While there fix an 80 column violation. NFC 2017-06-08 23:38:19 +00:00
ForceFunctionAttrs.cpp Add strictfp attribute to prevent unwanted optimizations of libm calls 2017-08-14 21:15:13 +00:00
FunctionAttrs.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-19 21:21:30 +00:00
FunctionImport.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
GlobalDCE.cpp [GlobalDCE] Use DenseMap instead of unordered_multimap for GVDependencies. 2017-10-17 23:47:06 +00:00
GlobalOpt.cpp Make DIExpression::createFragmentExpression() return an Optional. 2017-11-07 00:45:34 +00:00
GlobalSplit.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-10 22:49:55 +00:00
IPConstantPropagation.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
IPO.cpp Add CalledValuePropagation pass 2017-10-25 13:40:08 +00:00
InferFunctionAttrs.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
InlineSimple.cpp [Inliner] Only compute fully inline cost when remarks are enabled. 2017-08-25 22:01:42 +00:00
Inliner.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-19 21:21:30 +00:00
Internalize.cpp Consistently use ModuleAnalysisManager 2016-08-09 00:28:38 +00:00
LLVMBuild.txt IPO: Add missing build dep. 2017-05-01 20:57:20 +00:00
LoopExtractor.cpp Use a BumpPtrAllocator for Loop objects 2017-09-28 02:45:42 +00:00
LowerTypeTests.cpp [IPO/LowerTypesTest] Skip blockaddress(es) when replacing uses. 2017-11-07 00:09:25 +00:00
MergeFunctions.cpp [Transforms] Fix some Clang-tidy modernize and Include What You Use warnings; other minor fixes (NFC). 2017-10-19 21:21:30 +00:00
PartialInlining.cpp [PartialInliner] Inline vararg functions that forward varargs. 2017-11-13 10:35:52 +00:00
PassManagerBuilder.cpp Rename CountingFunctionInserter and use for both mcount and cygprofile calls, before and after inlining 2017-11-14 21:09:45 +00:00
PruneEH.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
SampleProfile.cpp Include already promoted counts when computing SUM for VP. 2017-11-06 19:52:49 +00:00
StripDeadPrototypes.cpp
StripSymbols.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
ThinLTOBitcodeWriter.cpp ThinLTO Minimized Bitcode File Size Reduction 2017-07-21 17:25:20 +00:00
WholeProgramDevirt.cpp Rename OptimizationDiagnosticInfo.* to OptimizationRemarkEmitter.* 2017-10-09 23:19:02 +00:00