mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-08-05 13:26:55 +00:00
llvm-cov: Added -b option for branch probabilities.
This option tells llvm-cov to print out branch probabilities when a basic block contains multiple branches. It also prints out some function summary info including the number of times the function enters, the percent of time it returns, and how many blocks were executed. Also updated tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197198 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -33,6 +33,9 @@ InputGCDA("gcda", cl::desc("<input gcda file>"), cl::init(""));
|
||||
static cl::opt<bool>
|
||||
AllBlocks("a", cl::init(false), cl::desc("display all block info"));
|
||||
|
||||
static cl::opt<bool>
|
||||
BranchProb("b", cl::init(false), cl::desc("display branch info"));
|
||||
|
||||
//===----------------------------------------------------------------------===//
|
||||
int main(int argc, char **argv) {
|
||||
// Print a stack trace if we signal out.
|
||||
@@ -73,8 +76,9 @@ int main(int argc, char **argv) {
|
||||
if (DumpGCOV)
|
||||
GF.dump();
|
||||
|
||||
FileInfo FI;
|
||||
GCOVOptions Options(AllBlocks, BranchProb);
|
||||
FileInfo FI(Options);
|
||||
GF.collectLineCounts(FI);
|
||||
FI.print(InputGCNO, InputGCDA, GCOVOptions(AllBlocks));
|
||||
FI.print(InputGCNO, InputGCDA);
|
||||
return 0;
|
||||
}
|
||||
|
Reference in New Issue
Block a user