Computer Laboratory

Instrumentation.h File Reference

Detailed Description

Declaration of instrumentation helpers.

Definition in file Instrumentation.h.

#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/IRBuilder.h"
#include "Transition.h"
#include "tesla.pb.h"
#include <libtesla.h>
+ Include dependency graph for Instrumentation.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  tesla::FnInstrumentation
 Instrumentation for a function event. More...
 
class  tesla::InstInstrumentation
 Instrumentation on a single instruction that does not change control flow. More...
 

Namespaces

namespace  llvm
 
namespace  tesla
 

Typedefs

typedef llvm::SmallVector
< llvm::Value *, 3 > 
tesla::ArgVector
 A container for function arguments, which shouldn't be very numerous. More...
 
typedef llvm::SmallVector
< llvm::Type *, 3 > 
tesla::TypeVector
 A container for a few types (e.g., of function arguments). More...
 

Functions

llvm::Type * tesla::IntPtrType (llvm::Module &)
 Extract the register_t type from an llvm::Module. More...
 
llvm::StructType * tesla::TransitionType (llvm::Module &)
 Extract the tesla_transition type from an llvm::Module. More...
 
llvm::StructType * tesla::TransitionSetType (llvm::Module &)
 Extract the tesla_transitions type from an llvm::Module. More...
 
llvm::Constant * tesla::TeslaContext (AutomatonDescription::Context Context, llvm::LLVMContext &Ctx)
 Find the constant for a libtesla context (either TESLA_CONTEXT_THREAD or TESLA_CONTEXT_GLOBAL). More...
 
llvm::BasicBlock * tesla::FindBlock (llvm::StringRef Name, llvm::Function &)
 Find a BasicBlock within a Function. More...
 
llvm::Function * tesla::FindStateUpdateFn (llvm::Module &, llvm::Type *IntType)
 Find the libtesla function tesla_update_state. More...
 
llvm::Value * tesla::Cast (llvm::Value *From, llvm::StringRef Name, llvm::Type *NewType, llvm::IRBuilder<> &)
 Cast an integer-ish Value to another type. More...
 
llvm::BasicBlock * tesla::CreateInstrPreamble (llvm::Module &Mod, llvm::Function *F, const llvm::Twine &Prefix, bool SuppressDebugInstrumentation)
 Initialise the instrumentation function's preamble. More...
 
llvm::Value * tesla::ConstructKey (llvm::IRBuilder<> &, llvm::Module &, llvm::ArrayRef< llvm::Value * > Args)
 Map a set of values into a tesla_key. More...
 
llvm::Constant * tesla::ConstructTransition (llvm::IRBuilder<> &, llvm::Module &, const Transition &)
 Construct a single tesla_transition. More...
 
llvm::Constant * tesla::ConstructTransitions (llvm::IRBuilder<> &, llvm::Module &, const TEquivalenceClass &)
 Construct a tesla_transitions for a TEquivalenceClass. More...
 
llvm::Function * tesla::FunctionInstrumentation (llvm::Module &, const llvm::Function &, FunctionEvent::Direction, FunctionEvent::CallContext, bool SuppressDebugInstr)
 Find (or create) one function-event instrumentation function. More...
 
llvm::Function * tesla::StructInstrumentation (llvm::Module &, llvm::StructType *, llvm::StringRef FieldName, size_t Index, bool Store, bool SuppressDebugInstr)
 Find (or create) one struct-field-event instrumentation function. More...