llvm-project/llvm/lib/Transforms/Instrumentation
Rainer Orth 6fde832b82 [profile] Solaris ld supports __start___llvm_prof_data etc. labels
Currently, many profiling tests on Solaris FAIL like

  Command Output (stderr):
  --
  Undefined                       first referenced
   symbol                             in file
  __llvm_profile_register_names_function /tmp/lit_tmp_Nqu4eh/infinite_loop-9dc638.o
  __llvm_profile_register_function    /tmp/lit_tmp_Nqu4eh/infinite_loop-9dc638.o

Solaris 11.4 ld supports the non-standard GNU ld extension of adding
__start_SECNAME and __stop_SECNAME labels to sections whose names are valid
as C identifiers.  Given that we already use Solaris 11.4-only features
like ld -z gnu-version-script-compat and fully working .preinit_array
support in compiler-rt, we don't need to worry about older versions of
Solaris ld.

The patch documents that support (although the comment in
lib/Transforms/Instrumentation/InstrProfiling.cpp
(needsRuntimeRegistrationOfSectionRange) is quite cryptic what it's
actually about), and adapts the affected testcase not to expect the
alternativeq __llvm_profile_register_functions and __llvm_profile_init.
It fixes all affected tests.

Tested on amd64-pc-solaris2.11.

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

llvm-svn: 363984
2019-06-20 21:27:06 +00:00
..
AddressSanitizer.cpp [DebugInfoMetadata] Refactor DIExpression::prepend constants (NFC) 2019-05-20 10:35:57 +00:00
BoundsChecking.cpp Add a 'dynamic' parameter to the objectsize intrinsic 2019-01-30 20:34:35 +00:00
CFGMST.h Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
CGProfile.cpp Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
CMakeLists.txt Remove esan. 2019-03-11 20:23:40 +00:00
ControlHeightReduction.cpp [PGO][CHR] Speed up following long use-def chains. 2019-05-22 18:37:34 +00:00
DataFlowSanitizer.cpp [DFSan] Add UnaryOperator visitor to DataFlowSanitizer 2019-06-19 15:11:41 +00:00
GCOVProfiling.cpp [opaque pointer types] Pass value type to GetElementPtr creation. 2019-02-01 20:44:47 +00:00
HWAddressSanitizer.cpp hwasan: Use bits [3..11) of the ring buffer entry address as the base stack tag. 2019-06-17 23:39:51 +00:00
IndirectCallPromotion.cpp Change some dyn_cast to more apropriate isa. NFC 2019-04-05 16:16:23 +00:00
InstrOrderFile.cpp Try to fix NetBSD buildbot breakage introduced in D57463. 2019-03-01 15:25:24 +00:00
InstrProfiling.cpp [profile] Solaris ld supports __start___llvm_prof_data etc. labels 2019-06-20 21:27:06 +00:00
Instrumentation.cpp [NewPM] Port HWASan and Kernel HWASan 2019-05-14 21:17:21 +00:00
LLVMBuild.txt Update the file headers across all of the LLVM projects in the monorepo 2019-01-19 08:50:56 +00:00
MaximumSpanningTree.h Use llvm::stable_sort 2019-04-23 14:51:27 +00:00
MemorySanitizer.cpp [MSAN] Add unary FNeg visitor to the MemorySanitizer 2019-06-05 22:37:05 +00:00
PGOInstrumentation.cpp [PGO] Fix the buildbot failure in r362995 2019-06-10 23:20:04 +00:00
PGOMemOPSizeOpt.cpp Move DomTreeUpdater from IR to Analysis 2019-02-06 02:52:52 +00:00
SanitizerCoverage.cpp [SanitizerCoverage] Use different module ctor names for trace-pc-guard and inline-8bit-counters 2019-05-07 01:39:37 +00:00
ThreadSanitizer.cpp [opaque pointer types] Add a FunctionCallee wrapper type, and use it. 2019-02-01 02:28:03 +00:00