llvm-project/llvm/lib/Transforms/Instrumentation
Rong Xu ef1adad938 [PGO] Turn off comdat renaming in IR PGO by default
Summary:
In IR PGO we append the function hash to comdat functions to avoid the
potential hash mismatch. This turns out not legal in some cases: if the comdat
function is address-taken and used in comparison. Renaming changes the semantic.

This patch turns off comdat renaming by default.

To alleviate the hash mismatch issue, we now rename the profile variable
for comdat functions. Profile allows co-existing multiple versions of profiles
with different hash value. The inlined copy will always has the correct profile
counter. The out-of-line copy might not have the correct count. But we will
not have the bogus mismatch warning.

Reviewers: davidxl

Subscribers: llvm-commits, xur

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

llvm-svn: 291588
2017-01-10 19:30:20 +00:00
..
AddressSanitizer.cpp [asan] Change the visibility of ___asan_globals_registered to hidden 2017-01-06 22:02:58 +00:00
BoundsChecking.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
CFGMST.h [PGO] Fix PGO use ICE when there are unreachable BBs 2016-12-02 19:10:29 +00:00
CMakeLists.txt [CMake] NFC. Updating CMake dependency specifications 2016-11-17 04:36:50 +00:00
DataFlowSanitizer.cpp Apply clang-tidy's modernize-loop-convert to most of lib/Transforms. 2016-06-26 12:28:59 +00:00
EfficiencySanitizer.cpp [esan] Remove global variable. 2016-10-18 19:39:23 +00:00
GCOVProfiling.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
IndirectCallPromotion.cpp Use StringRef in Pass/PassManager APIs (NFC) 2016-10-01 02:56:57 +00:00
InstrProfiling.cpp [PGO] Turn off comdat renaming in IR PGO by default 2017-01-10 19:30:20 +00:00
Instrumentation.cpp [PM] code refactoring /NFC 2016-06-05 03:40:03 +00:00
LLVMBuild.txt [PGO] Resubmit "MST based PGO instrumentation infrastructure" (r254021) 2015-12-09 18:08:16 +00:00
MaximumSpanningTree.h
MemorySanitizer.cpp [AVX-512] Add AVX-512 vector shift intrinsics to memory santitizer. 2016-11-15 16:27:33 +00:00
PGOInstrumentation.cpp [PGO] Turn off comdat renaming in IR PGO by default 2017-01-10 19:30:20 +00:00
SanitizerCoverage.cpp [sanitizer-coverage] sort the switch cases 2016-12-27 21:20:06 +00:00
ThreadSanitizer.cpp [tsan] Add support for C++ exceptions into TSan (call __tsan_func_exit during unwinding), LLVM part 2016-11-14 21:41:13 +00:00