Skip to content

Commit

Permalink
[PGO] More comments how function pointers for indirect calls are mapped
Browse files Browse the repository at this point in the history
to function names

Summary:
Hopefully this will make it easier for the next person to figure all
this out...

Reviewers: bogner, davidxl

Subscribers: davidxl, cfe-commits

Differential Revision: http://reviews.llvm.org/D18489

llvm-svn: 264681
  • Loading branch information
anemet committed Mar 28, 2016
1 parent fadba5d commit 1e217bc
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion clang/lib/CodeGen/CGCall.cpp
Expand Up @@ -3817,7 +3817,9 @@ RValue CodeGenFunction::EmitCall(const CGFunctionInfo &CallInfo,
CS.setAttributes(Attrs);
CS.setCallingConv(static_cast<llvm::CallingConv::ID>(CallingConv));

// Insert instrumentation or attach profile metadata at indirect call sites
// Insert instrumentation or attach profile metadata at indirect call sites.
// For more details, see the comment before the definition of
// IPVK_IndirectCallTarget in InstrProfData.inc.
if (!CS.getCalledFunction())
PGO.valueProfile(Builder, llvm::IPVK_IndirectCallTarget,
CS.getInstruction(), Callee);
Expand Down

0 comments on commit 1e217bc

Please sign in to comment.