LLVM API Documentation
#include "llvm/Pass.h"
#include "llvm/Module.h"
#include "llvm/Instructions.h"
#include "llvm/Constants.h"
#include "llvm/DerivedTypes.h"
#include "llvm/Transforms/Scalar.h"
#include "llvm/Transforms/Utils/BasicBlockUtils.h"
#include "llvm/ADT/Statistic.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Debug.h"
#include "llvm/Transforms/Instrumentation.h"
#include "RSProfiling.h"
#include <set>
#include <map>
#include <queue>
#include <list>
#include <iostream>
Include dependency graph for RSProfiling.cpp:
Go to the source code of this file.
Enumerations | |
enum | RandomMeth { GBV, GBVO, HOSTCC } |
Functions | |
static void | ReplacePhiPred (BasicBlock *btarget, BasicBlock *bold, BasicBlock *bnew) |
static void | CollapsePhi (BasicBlock *btarget, BasicBlock *bsrc) |
template<class T> | |
static void | recBackEdge (BasicBlock *bb, T &BackEdges, std::map< BasicBlock *, int > &color, std::map< BasicBlock *, int > &depth, std::map< BasicBlock *, int > &finish, int &time) |
template<class T> | |
static void | getBackEdges (Function &F, T &BackEdges) |
ModulePass * | llvm::createNullProfilerRSPass () |
FunctionPass * | llvm::createRSProfilingPass () |
Variables | |
Statistic | NumBackEdges ("bedge","Number of BackEdges") |
cl::opt< RandomMeth > | RandomMethod ("profile-randomness", cl::desc("How to randomly choose to profile:"), cl::values(clEnumValN(GBV,"global","global counter"), clEnumValN(GBVO,"ra_global","register allocated global counter"), clEnumValN(HOSTCC,"rdcc","cycle counter"), clEnumValEnd)) |
static RegisterAnalysisGroup< RSProfilers > | A ("Profiling passes") |
static RegisterOpt< NullProfilerRS > | NP ("insert-null-profiling-rs","Measure profiling framework overhead") |
static RegisterAnalysisGroup< RSProfilers, NullProfilerRS, true > | NPT |
GlobalVariable * | Counter |
Value * | ResetValue |
const Type * | T |
GlobalVariable * | Counter |
Value * | ResetValue |
AllocaInst * | AI |
const Type * | T |
uint64_t | rm |
Function * | F |
std::map< Value *, Value * > | TransCache |
std::set< BasicBlock * > | ChoicePoints |
Chooser * | c |
RegisterOpt< ProfilerRS > | X ("insert-rs-profiling-framework","Insert random sampling instrumentation framework") |
enum RandomMeth |
static void CollapsePhi | ( | BasicBlock * | btarget, | |
BasicBlock * | bsrc | |||
) | [static] |
Definition at line 579 of file RSProfiling.cpp.
References llvm::BasicBlock::begin(), counter, and llvm::BasicBlock::end().
static void recBackEdge | ( | BasicBlock * | bb, | |
T & | BackEdges, | |||
std::map< BasicBlock *, int > & | color, | |||
std::map< BasicBlock *, int > & | depth, | |||
std::map< BasicBlock *, int > & | finish, | |||
int & | time | |||
) | [static] |
Definition at line 598 of file RSProfiling.cpp.
References llvm::TerminatorInst::getNumSuccessors(), llvm::TerminatorInst::getSuccessor(), and llvm::BasicBlock::getTerminator().
Referenced by getBackEdges().
static void ReplacePhiPred | ( | BasicBlock * | btarget, | |
BasicBlock * | bold, | |||
BasicBlock * | bnew | |||
) | [static] |
Definition at line 568 of file RSProfiling.cpp.
References llvm::BasicBlock::begin(), and llvm::BasicBlock::end().
RegisterAnalysisGroup<RSProfilers> A("Profiling passes") [static] |
Referenced by llvm::Annotable::addAnnotation(), llvm::cl::aliasopt::apply(), llvm::X86InstrInfo::commuteInstruction(), llvm::Annotable::deleteAnnotation(), llvm::ilist_traits< Argument >::destroySentinel(), llvm::ETForestBase::dominates(), llvm::DominatorSetBase::dominates(), llvm::Annotable::getAnnotation(), getConstantStringLength(), getFnForValue(), llvm::SCEVAddRecExpr::getNumIterationsInRange(), llvm::Annotable::getOrCreateAnnotation(), llvm::JIT::getOrEmitGlobalVariable(), GT(), llvm::SCEVExpander::InsertCastOfTo(), isFlagDefiner(), isFlagUser(), isOnlyUsedInEntryBlock(), LT(), LTE(), Max(), Min(), llvm::ETForestBase::nearestCommonDominator(), llvm::AnnotationID::operator<(), llvm::AnnotationID::operator==(), llvm::ETForestBase::properlyDominates(), llvm::DominatorSetBase::properlyDominates(), llvm::MemIntrinsic::setAlignment(), llvm::AnchoredDesc::setAnchor(), llvm::Value::setName(), SolveQuadraticEquation(), llvm::Annotable::unlinkAnnotation(), and llvm::Annotable::~Annotable().
Definition at line 124 of file RSProfiling.cpp.
Referenced by llvm::DSGraph::addObjectToGraph(), llvm::DSGraph::AssertGraphOK(), llvm::Interpreter::callFunction(), CallPassesValueThoughVararg(), CheckForEscapingAllocas(), llvm::CloneBasicBlock(), llvm::LiveRangeInfo::constructLiveRanges(), EvaluateFunction(), llvm::FunctionLoweringInfo::FunctionLoweringInfo(), llvm::DSGraph::getFunctionArgumentsForCall(), llvm::InlineFunction(), llvm::InsertProfilingInitCall(), llvm::isAllocaPromotable(), isDynamicConstant(), and ReleasePtrSeqNumbers().
Chooser* c |
Definition at line 149 of file RSProfiling.cpp.
Referenced by llvm::ChooseOneGroup(), llvm::SparcV9FloatCCRegClass::colorIGNode(), llvm::SparcV9IntRegClass::colorIGNode(), ComputeMinGap(), llvm::TargetRegClassInfo::findUnusedColor(), llvm::SparcV9FloatRegClass::findUnusedColor(), llvm::ForwardListSchedule(), GetCurrentX86CPU(), myfeof(), llvm::SchedulingManager::resetChoices(), and llvm::InstrSchedule::~InstrSchedule().
std::set<BasicBlock*> ChoicePoints |
Definition at line 148 of file RSProfiling.cpp.
Definition at line 122 of file RSProfiling.cpp.
Definition at line 110 of file RSProfiling.cpp.
Referenced by llvm::ProfileInfoLoader::getBlockCounts(), llvm::ProfileInfoLoader::getEdgeCounts(), and llvm::ProfileInfoLoader::getFunctionCounts().
Definition at line 137 of file RSProfiling.cpp.
RegisterOpt<NullProfilerRS> NP("insert-null-profiling-rs","Measure profiling framework overhead") [static] |
Referenced by llvm::AlphaTargetLowering::LowerOperation().
RegisterAnalysisGroup<RSProfilers, NullProfilerRS, true> NPT [static] |
Definition at line 92 of file RSProfiling.cpp.
Statistic NumBackEdges("bedge","Number of BackEdges") [static] |
Referenced by llvm::Loop::getNumBackEdges().
cl::opt<RandomMeth> RandomMethod("profile-randomness", cl::desc("How to randomly choose to profile:"), cl::values(clEnumValN(GBV,"global","global counter"),clEnumValN(GBVO,"ra_global","register allocated global counter"),clEnumValN(HOSTCC,"rdcc","cycle counter"),clEnumValEnd)) [static] |
Definition at line 123 of file RSProfiling.cpp.
Definition at line 111 of file RSProfiling.cpp.
uint64_t rm |
Definition at line 136 of file RSProfiling.cpp.
Definition at line 125 of file RSProfiling.cpp.
Definition at line 112 of file RSProfiling.cpp.
Referenced by llvm::BitsToDouble(), llvm::BitsToFloat(), BuildSDIVSequence(), llvm::VariableDesc::classof(), llvm::CompositeTypeDesc::classof(), llvm::DerivedTypeDesc::classof(), llvm::OpaqueType::classof(), llvm::PointerType::classof(), llvm::PackedType::classof(), llvm::ArrayType::classof(), llvm::SequentialType::classof(), llvm::StructType::classof(), llvm::CompositeType::classof(), llvm::FunctionType::classof(), llvm::DerivedType::classof(), llvm::CloneTrace(), llvm::CloneTraceInto(), llvm::ConstantArray::ConstantArray(), llvm::ConstantFoldTerminator(), llvm::ConstantPacked::ConstantPacked(), llvm::ConstantStruct::ConstantStruct(), llvm::DoubleToBits(), llvm::DSNode::DSNode(), Find(), llvm::FloatToBits(), llvm::MachineDebugInfo::getAnchoredDescriptors(), llvm::GraphTraits< const Type * >::getEntryNode(), llvm::GraphTraits< Type * >::getEntryNode(), llvm::SlotCalculator::getGlobalSlot(), llvm::getRegisterAllocator(), llvm::SlotCalculator::getSlot(), llvm::TypeSymbolTable::insert(), llvm::SymbolTable::insert(), llvm::PatternMatch::m_Br(), llvm::make_vector(), llvm::Timer::operator<(), llvm::operator<<(), llvm::Timer::operator=(), llvm::PATypeHandle::operator=(), llvm::Timer::operator>(), llvm::BytecodeReader::ParseSymbolTable(), llvm::TypeSymbolTable::rename(), llvm::GlobalDesc::setType(), llvm::VariableDesc::setType(), setTypeName(), llvm::Timer::Timer(), and WriteAsOperandInternal().
std::map<Value*, Value*> TransCache |
Definition at line 147 of file RSProfiling.cpp.
RegisterOpt<ProfilerRS> X("insert-rs-profiling-framework","Insert random sampling instrumentation framework") [static] |