diff options
Diffstat (limited to 'lib/Transforms/Instrumentation')
8 files changed, 32 insertions, 30 deletions
diff --git a/lib/Transforms/Instrumentation/EmitFunctions.cpp b/lib/Transforms/Instrumentation/EmitFunctions.cpp index 4f445bc..6961c53 100644 --- a/lib/Transforms/Instrumentation/EmitFunctions.cpp +++ b/lib/Transforms/Instrumentation/EmitFunctions.cpp @@ -1,4 +1,4 @@ -//===-- EmitFunctions.cpp - interface to insert instrumentation --*- C++ -*--=// +//===-- EmitFunctions.cpp - interface to insert instrumentation -----------===// // // This inserts a global constant table with function pointers all along // diff --git a/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp b/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp index 16f98e7..42fa74c 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/CombineBranch.cpp @@ -1,7 +1,9 @@ -//===-- CombineBranch.cpp ------------------------------------ ---*- C++ -*--=// +//===-- CombineBranch.cpp -------------------------------------------------===// +// // Pass to instrument loops // // At every backedge, insert a counter for that backedge and a call function +// //===----------------------------------------------------------------------===// #include "llvm/Analysis/Dominators.h" diff --git a/lib/Transforms/Instrumentation/ProfilePaths/Graph.h b/lib/Transforms/Instrumentation/ProfilePaths/Graph.h index 3c22d62..6356462 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/Graph.h +++ b/lib/Transforms/Instrumentation/ProfilePaths/Graph.h @@ -1,8 +1,7 @@ -//===-- ------------------------llvm/graph.h ---------------------*- C++ -*--=// +//===-- Graph.h -------------------------------------------------*- C++ -*-===// // -//Header file for Graph: This Graph is used by -//PathProfiles class, and is used -//for detecting proper points in cfg for code insertion +// Header file for Graph: This Graph is used by PathProfiles class, and is used +// for detecting proper points in cfg for code insertion // //===----------------------------------------------------------------------===// diff --git a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp index 4e7c584..fd44d8e 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/GraphAuxiliary.cpp @@ -1,8 +1,7 @@ -//===-- GrapAuxiliary.cpp- Auxiliary functions on graph ----------*- C++ -*--=// +//===- GraphAuxiliary.cpp - Auxiliary functions on graph ------------------===// // -//auxiliary function associated with graph: they -//all operate on graph, and help in inserting -//instrumentation for trace generation +// auxiliary function associated with graph: they all operate on graph, and help +// in inserting instrumentation for trace generation // //===----------------------------------------------------------------------===// diff --git a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp index 74209b7..d2e8d14 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/InstLoops.cpp @@ -1,7 +1,9 @@ -//===-- InstLoops.cpp ---------------------------------------- ---*- C++ -*--=// +//===-- InstLoops.cpp -----------------------------------------------------===// +// // Pass to instrument loops // // At every backedge, insert a counter for that backedge and a call function +// //===----------------------------------------------------------------------===// #include "llvm/Analysis/Dominators.h" @@ -27,7 +29,7 @@ enum Color{ BLACK }; -namespace{ +namespace { typedef std::map<BasicBlock *, BasicBlock *> BBMap; struct InstLoops : public FunctionPass { virtual void getAnalysisUsage(AnalysisUsage &AU) const { diff --git a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp index df2b764..7f0bfa8 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/ProfilePaths.cpp @@ -1,27 +1,27 @@ -//===-- ProfilePaths.cpp - interface to insert instrumentation ---*- C++ -*--=// +//===-- ProfilePaths.cpp - interface to insert instrumentation --*- C++ -*-===// // -// This inserts instrumentation for counting -// execution of paths though a given function -// Its implemented as a "Function" Pass, and called using opt +// This inserts instrumentation for counting execution of paths though a given +// function Its implemented as a "Function" Pass, and called using opt // // This pass is implemented by using algorithms similar to // 1."Efficient Path Profiling": Ball, T. and Larus, J. R., -// Proceedings of Micro-29, Dec 1996, Paris, France. +// Proceedings of Micro-29, Dec 1996, Paris, France. // 2."Efficiently Counting Program events with support for on-line // "queries": Ball T., ACM Transactions on Programming Languages -// and systems, Sep 1994. +// and systems, Sep 1994. // -// The algorithms work on a Graph constructed over the nodes -// made from Basic Blocks: The transformations then take place on -// the constructed graph (implementation in Graph.cpp and GraphAuxiliary.cpp) -// and finally, appropriate instrumentation is placed over suitable edges. -// (code inserted through EdgeCode.cpp). +// The algorithms work on a Graph constructed over the nodes made from Basic +// Blocks: The transformations then take place on the constructed graph +// (implementation in Graph.cpp and GraphAuxiliary.cpp) and finally, appropriate +// instrumentation is placed over suitable edges. (code inserted through +// EdgeCode.cpp). // -// The algorithm inserts code such that every acyclic path in the CFG -// of a function is identified through a unique number. the code insertion -// is optimal in the sense that its inserted over a minimal set of edges. Also, -// the algorithm makes sure than initialization, path increment and counter -// update can be collapsed into minimum number of edges. +// The algorithm inserts code such that every acyclic path in the CFG of a +// function is identified through a unique number. the code insertion is optimal +// in the sense that its inserted over a minimal set of edges. Also, the +// algorithm makes sure than initialization, path increment and counter update +// can be collapsed into minimum number of edges. +// //===----------------------------------------------------------------------===// #include "llvm/Transforms/Utils/UnifyFunctionExitNodes.h" diff --git a/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp b/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp index 0f83823..3310488 100644 --- a/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp +++ b/lib/Transforms/Instrumentation/ProfilePaths/RetracePath.cpp @@ -1,4 +1,4 @@ -//===----Instrumentation/ProfilePaths/RetracePath.cppTrigger.cpp--*- C++ -*--=// +//===- RetracePath.cpp ----------------------------------------------------===// // // Retraces a path of BasicBlock, given a path number and a graph! // diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp index 4579972..f6bc4ce 100644 --- a/lib/Transforms/Instrumentation/TraceValues.cpp +++ b/lib/Transforms/Instrumentation/TraceValues.cpp @@ -1,4 +1,4 @@ -//===- TraceValues.cpp - Value Tracing for debugging -------------*- C++ -*--=// +//===- TraceValues.cpp - Value Tracing for debugging ----------------------===// // // Support for inserting LLVM code to print values at basic block and function // exits. |