From 42a6fe199f031ab3d0baa142e698d061d251c6f8 Mon Sep 17 00:00:00 2001 From: Adam Nemet Date: Mon, 28 Mar 2016 18:29:36 +0000 Subject: [PATCH] [PGO] Comment how function pointers for indirect calls are mapped to function names Summary: Hopefully this will make it easier for the next person to figure all this out... Reviewers: bogner, davidxl Subscribers: llvm-commits Differential Revision: http://reviews.llvm.org/D18490 llvm-svn: 264612 --- compiler-rt/lib/profile/InstrProfData.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/compiler-rt/lib/profile/InstrProfData.inc b/compiler-rt/lib/profile/InstrProfData.inc index 1bd941c..c758cd7 100644 --- a/compiler-rt/lib/profile/InstrProfData.inc +++ b/compiler-rt/lib/profile/InstrProfData.inc @@ -73,6 +73,8 @@ INSTR_PROF_DATA(const uint64_t, llvm::Type::getInt64Ty(Ctx), FuncHash, \ INSTR_PROF_DATA(const IntPtrT, llvm::Type::getInt64PtrTy(Ctx), CounterPtr, \ ConstantExpr::getBitCast(CounterPtr, \ llvm::Type::getInt64PtrTy(Ctx))) +// This is used to map function pointers for the indirect call targets to +// function name hashes during the conversion from raw to merged profile data. INSTR_PROF_DATA(const IntPtrT, llvm::Type::getInt8PtrTy(Ctx), FunctionPointer, \ FunctionAddr) INSTR_PROF_DATA(IntPtrT, llvm::Type::getInt8PtrTy(Ctx), Values, \ -- 2.7.4