[llvm] r271746 - [pgo] extend r271532 to darwin platform
Xinliang David Li via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 3 16:02:29 PDT 2016
Author: davidxl
Date: Fri Jun 3 18:02:28 2016
New Revision: 271746
URL: http://llvm.org/viewvc/llvm-project?rev=271746&view=rev
Log:
[pgo] extend r271532 to darwin platform
Modified:
llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
Modified: llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp?rev=271746&r1=271745&r2=271746&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/InstrProfiling.cpp Fri Jun 3 18:02:28 2016
@@ -261,10 +261,10 @@ static inline bool shouldRecordFunctionA
// Inline virtual functions have linkeOnceODR linkage. When a key method
// exists, the vtable will only be emitted in the TU where the key method
// is defined. In a TU where vtable is not available, the function won't
- // be 'addresstaken'. If its address is not recorded here, the profile counter
- // comdat group with missing address may be picked by the linker leading
- // to missing indirect call target info.
- return F->hasAddressTaken() || (F->hasLinkOnceLinkage() && F->hasComdat());
+ // be 'addresstaken'. If its address is not recorded here, the profile data
+ // with missing address may be picked by the linker leading to missing
+ // indirect call target info.
+ return F->hasAddressTaken() || F->hasLinkOnceLinkage();
}
static inline bool needsComdatForCounter(Function &F, Module &M) {
More information about the llvm-commits
mailing list