switch the inliner from being recursive to being iterative.
[oota-llvm.git] / lib / Transforms / Instrumentation / RSProfiling.h
1 //===- RSProfiling.h - Various profiling using random sampling ----------===//
2 //
3 //                      The LLVM Compiler Infrastructure
4 //
5 // This file was developed by the LLVM research group and is distributed under
6 // the University of Illinois Open Source License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // See notes in RSProfiling.cpp
11 //
12 //===----------------------------------------------------------------------===//
13 #include "llvm/Transforms/RSProfiling.h"
14 #include <set>
15
16 namespace llvm {
17   /// RSProfilers_std - a simple support class for profilers that handles most
18   /// of the work of chaining and tracking inserted code.
19   struct RSProfilers_std : public RSProfilers {
20     std::set<Value*> profcode;
21     // Lookup up values in profcode
22     virtual bool isProfiling(Value* v);
23     // handles required chaining
24     virtual void getAnalysisUsage(AnalysisUsage &AU) const;
25     // places counter updates in basic blocks and recordes added instructions in
26     // profcode
27     void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
28                                  GlobalValue *CounterArray);
29   };
30 }