[llvm] r194453 - llvm-cov: Added call to update run/program counts.
Yuchen Wu
yuchenericwu at hotmail.com
Mon Nov 11 20:59:08 PST 2013
Author: ywu
Date: Mon Nov 11 22:59:08 2013
New Revision: 194453
URL: http://llvm.org/viewvc/llvm-project?rev=194453&view=rev
Log:
llvm-cov: Added call to update run/program counts.
Also updated test files that were generated from this change.
Modified:
llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
llvm/trunk/test/tools/llvm-cov/Inputs/test.gcda
llvm/trunk/test/tools/llvm-cov/Inputs/test.gcno
Modified: llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp?rev=194453&r1=194452&r2=194453&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/GCOVProfiling.cpp Mon Nov 11 22:59:08 2013
@@ -102,6 +102,7 @@ namespace {
Constant *getIncrementIndirectCounterFunc();
Constant *getEmitFunctionFunc();
Constant *getEmitArcsFunc();
+ Constant *getSummaryInfoFunc();
Constant *getDeleteWriteoutFunctionListFunc();
Constant *getDeleteFlushFunctionListFunc();
Constant *getEndFileFunc();
@@ -700,6 +701,11 @@ Constant *GCOVProfiler::getEmitArcsFunc(
return M->getOrInsertFunction("llvm_gcda_emit_arcs", FTy);
}
+Constant *GCOVProfiler::getSummaryInfoFunc() {
+ FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), false);
+ return M->getOrInsertFunction("llvm_gcda_summary_info", FTy);
+}
+
Constant *GCOVProfiler::getDeleteWriteoutFunctionListFunc() {
FunctionType *FTy = FunctionType::get(Type::getVoidTy(*Ctx), false);
return M->getOrInsertFunction("llvm_delete_writeout_function_list", FTy);
@@ -746,6 +752,7 @@ Function *GCOVProfiler::insertCounterWri
Constant *StartFile = getStartFileFunc();
Constant *EmitFunction = getEmitFunctionFunc();
Constant *EmitArcs = getEmitArcsFunc();
+ Constant *SummaryInfo = getSummaryInfoFunc();
Constant *EndFile = getEndFileFunc();
NamedMDNode *CU_Nodes = M->getNamedMetadata("llvm.dbg.cu");
@@ -772,6 +779,7 @@ Function *GCOVProfiler::insertCounterWri
Builder.getInt32(Arcs),
Builder.CreateConstGEP2_64(GV, 0, 0));
}
+ Builder.CreateCall(SummaryInfo);
Builder.CreateCall(EndFile);
}
}
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test.gcda
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test.gcda?rev=194453&r1=194452&r2=194453&view=diff
==============================================================================
Binary files llvm/trunk/test/tools/llvm-cov/Inputs/test.gcda (original) and llvm/trunk/test/tools/llvm-cov/Inputs/test.gcda Mon Nov 11 22:59:08 2013 differ
Modified: llvm/trunk/test/tools/llvm-cov/Inputs/test.gcno
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/tools/llvm-cov/Inputs/test.gcno?rev=194453&r1=194452&r2=194453&view=diff
==============================================================================
Binary files llvm/trunk/test/tools/llvm-cov/Inputs/test.gcno (original) and llvm/trunk/test/tools/llvm-cov/Inputs/test.gcno Mon Nov 11 22:59:08 2013 differ
More information about the llvm-commits
mailing list