llvm-project/llvm/lib/Transforms/Instrumentation
Vedant Kumar 9a041a7522 [InstrProfiling] Emit the runtime hook when no counters are lowered
The API verification tool tapi has difficulty processing frameworks
which enable code coverage, but which have no code. The profile lowering
pass does not emit the runtime hook in this case because no counters are
lowered.

While the hook is not needed for program correctness (the profile
runtime doesn't have to be linked in), it's needed to allow tapi to
validate the exported symbol set of instrumented binaries.

It was not possible to add a workaround in tapi for empty binaries due
to an architectural issue: tapi generates its expected symbol set before
it inspects a binary. Changing that model has a higher cost than simply
forcing llvm to always emit the runtime hook.

rdar://36076904

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

llvm-svn: 326350
2018-02-28 19:00:08 +00:00
..
AddressSanitizer.cpp [ASan] Update uses of IRBuilder::CreateMemCpy to new API (NFC) 2018-02-08 21:26:12 +00:00
BoundsChecking.cpp [PM] Port BoundsChecking to the new PM. 2017-11-14 01:30:04 +00:00
CFGMST.h [PGO] add MST min edge selection heuristic to ensure non-zero entry count 2017-12-18 17:56:19 +00:00
CMakeLists.txt Hardware-assisted AddressSanitizer (llvm part). 2017-12-09 00:21:41 +00:00
DataFlowSanitizer.cpp Fix DataFlowSanitizer instrumentation pass to take parameter position changes into account for custom functions. 2018-02-22 19:09:07 +00:00
EfficiencySanitizer.cpp Sort the remaining #include lines in include/... and lib/.... 2017-06-06 11:49:48 +00:00
GCOVProfiling.cpp Disable gcov instrumentation of functions using funclet-based exception handling 2017-10-13 13:49:15 +00:00
HWAddressSanitizer.cpp [hwasan] Fix inline instrumentation. 2018-02-21 19:52:23 +00:00
IndirectCallPromotion.cpp [PGO] Make indirect call promotion a utility 2017-12-06 21:22:54 +00:00
InstrProfiling.cpp [InstrProfiling] Emit the runtime hook when no counters are lowered 2018-02-28 19:00:08 +00:00
Instrumentation.cpp Hardware-assisted AddressSanitizer (llvm part). 2017-12-09 00:21:41 +00:00
LLVMBuild.txt
MaximumSpanningTree.h Remove unneeded use of #undef DEBUG_TYPE. NFC 2017-07-12 20:49:21 +00:00
MemorySanitizer.cpp [MSan] Update uses of IRBuilder::CreateMemCpy to new API (NFC) 2018-02-08 19:46:12 +00:00
PGOInstrumentation.cpp Add a ProfileCount class to represent entry counts. 2018-01-17 22:24:23 +00:00
PGOMemOPSizeOpt.cpp [NFC] Convert OptimizationRemarkEmitter old emit() calls to new closure 2017-10-11 17:12:59 +00:00
SanitizerCoverage.cpp [sanitizer-coverage] call appendToUsed once per module, not once per function (which is too slow) 2017-09-09 05:30:13 +00:00
ThreadSanitizer.cpp Enhance synchscope representation 2017-07-11 22:23:00 +00:00