Fix bug Regression/Verifier/2002-11-05-GetelementptrPointers.ll
[oota-llvm.git] / include / llvm / Transforms / Instrumentation / ProfilePaths.h
1 //===-- ProfilePaths.h - interface to insert instrumentation -----*- C++ -*--=//
2 //
3 // This inserts intrumentation for counting
4 // execution of paths though a given method
5 // Its implemented as a "Method" Pass, and called using opt
6 //
7 // This pass is implemented by using algorithms similar to 
8 // 1."Efficient Path Profiling": Ball, T. and Larus, J. R., 
9 // Proceedings of Micro-29, Dec 1996, Paris, France.
10 // 2."Efficiently Counting Program events with support for on-line
11 //   "queries": Ball T., ACM Transactions on Programming Languages
12 //   and systems, Sep 1994.
13 //
14 // The algorithms work on a Graph constructed over the nodes
15 // made from Basic Blocks: The transformations then take place on
16 // the constucted graph (implementation in Graph.cpp and GraphAuxillary.cpp)
17 // and finally, appropriate instrumentation is placed over suitable edges.
18 // (code inserted through EdgeCode.cpp).
19 // 
20 // The algorithm inserts code such that every acyclic path in the CFG
21 // of a method is identified through a unique number. the code insertion
22 // is optimal in the sense that its inserted over a minimal set of edges. Also,
23 // the algorithm makes sure than initialization, path increment and counter
24 // update can be collapsed into minmimum number of edges.
25 //===----------------------------------------------------------------------===//
26
27 #ifndef LLVM_TRANSFORMS_INSTRUMENTATION_PROFILE_PATHS_H
28 #define LLVM_TRANSFORMS_INSTRUMENTATION_PROFILE_PATHS_H
29
30 class Pass;
31
32 // createProfilePathsPass - Create a new pass to add path profiling
33 //
34 Pass *createProfilePathsPass();
35
36 #endif
37