mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-09 10:31:14 +00:00
eded4916d6
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@1812 91177308-0d34-0410-b5e6-96231b3b80d8
38 lines
1.5 KiB
C++
38 lines
1.5 KiB
C++
//===-- ProfilePaths.h - interface to insert instrumentation -----*- C++ -*--=//
|
|
//
|
|
// This inserts intrumentation for counting
|
|
// execution of paths though a given method
|
|
// Its implemented as a "Method" 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.
|
|
// 2."Efficiently Counting Program events with support for on-line
|
|
// "queries": Ball T., ACM Transactions on Programming Languages
|
|
// 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 constucted graph (implementation in Graph.cpp and GraphAuxillary.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 method 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 minmimum number of edges.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_PROFILE_PATHS_H
|
|
#define LLVM_TRANSFORMS_INSTRUMENTATION_PROFILE_PATHS_H
|
|
|
|
class Pass;
|
|
|
|
// createProfilePathsPass - Create a new pass to add path profiling
|
|
//
|
|
Pass *createProfilePathsPass();
|
|
|
|
#endif
|
|
|