mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-08-19 19:29:31 +00:00
by Anton Korobeynikov! This is a step towards closing PR786. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@28447 91177308-0d34-0410-b5e6-96231b3b80d8
30 lines
1.2 KiB
C++
30 lines
1.2 KiB
C++
//===- RSProfiling.h - Various profiling using random sampling ----------===//
|
|
//
|
|
// The LLVM Compiler Infrastructure
|
|
//
|
|
// This file was developed by the LLVM research group and is distributed under
|
|
// the University of Illinois Open Source License. See LICENSE.TXT for details.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// See notes in RSProfiling.cpp
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
#include "llvm/Transforms/RSProfiling.h"
|
|
|
|
namespace llvm {
|
|
/// RSProfilers_std - a simple support class for profilers that handles most
|
|
/// of the work of chaining and tracking inserted code.
|
|
struct RSProfilers_std : public RSProfilers {
|
|
std::set<Value*> profcode;
|
|
// Lookup up values in profcode
|
|
virtual bool isProfiling(Value* v);
|
|
// handles required chaining
|
|
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
|
|
// places counter updates in basic blocks and recordes added instructions in
|
|
// profcode
|
|
void IncrementCounterInBlock(BasicBlock *BB, unsigned CounterNum,
|
|
GlobalValue *CounterArray);
|
|
};
|
|
}
|