aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
diff options
context:
space:
mode:
authorXinliang David Li <davidxl@google.com>2015-11-22 00:22:07 +0000
committerXinliang David Li <davidxl@google.com>2015-11-22 00:22:07 +0000
commitc76732396ba835649a54248c906c8ef1ee60f6d1 (patch)
tree5ba25ba4129fe2d987d556c00b7cd2efbd5fa00b /llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
parentd1beb07d390b73d9bae45286737eaf2f58bddfa3 (diff)
downloadllvm-c76732396ba835649a54248c906c8ef1ee60f6d1.zip
llvm-c76732396ba835649a54248c906c8ef1ee60f6d1.tar.gz
llvm-c76732396ba835649a54248c906c8ef1ee60f6d1.tar.bz2
[PGO] Define value profiling updater API signature in InstrProfData.inc (NFC)
llvm-svn: 253805
Diffstat (limited to 'llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp')
-rw-r--r--llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
index 334c41f..a70bf27 100644
--- a/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
+++ b/llvm/lib/Transforms/Instrumentation/InstrProfiling.cpp
@@ -173,13 +173,14 @@ bool InstrProfiling::runOnModule(Module &M) {
}
static Constant *getOrInsertValueProfilingCall(Module &M) {
- auto *VoidTy = Type::getVoidTy(M.getContext());
- auto *VoidPtrTy = Type::getInt8PtrTy(M.getContext());
- auto *Int32Ty = Type::getInt32Ty(M.getContext());
- auto *Int64Ty = Type::getInt64Ty(M.getContext());
- Type *ArgTypes[] = {Int64Ty, VoidPtrTy, Int32Ty};
+ LLVMContext &Ctx = M.getContext();
+ auto *ReturnTy = Type::getVoidTy(M.getContext());
+ Type *ParamTypes[] = {
+#define VALUE_PROF_FUNC_PARAM(ParamType, ParamName, ParamLLVMType) ParamLLVMType
+#include "llvm/ProfileData/InstrProfData.inc"
+ };
auto *ValueProfilingCallTy =
- FunctionType::get(VoidTy, makeArrayRef(ArgTypes), false);
+ FunctionType::get(ReturnTy, makeArrayRef(ParamTypes), false);
return M.getOrInsertFunction("__llvm_profile_instrument_target",
ValueProfilingCallTy);
}