#include "polly/CodeGen/PerfMonitor.h"
#include "polly/CodeGen/RuntimeDebugBuilder.h"
#include "polly/ScopInfo.h"
#include "llvm/ADT/Twine.h"
#include "llvm/IR/IntrinsicsX86.h"
#include "llvm/IR/Module.h"
#include "llvm/TargetParser/Triple.h"
usingnamespacellvm;
usingnamespacepolly;
Function *PerfMonitor::getAtExit() { … }
void PerfMonitor::addToGlobalConstructors(Function *Fn) { … }
Function *PerfMonitor::getRDTSCP() { … }
PerfMonitor::PerfMonitor(const Scop &S, Module *M)
: … { … }
static void TryRegisterGlobal(Module *M, const char *Name,
Constant *InitialValue, Value **Location) { … }
static std::string GetScopUniqueVarname(const Scop &S) { … }
void PerfMonitor::addScopCounter() { … }
void PerfMonitor::addGlobalVariables() { … }
static const char *InitFunctionName = …;
static const char *FinalReportingFunctionName = …;
static BasicBlock *FinalStartBB = …;
static ReturnInst *ReturnFromFinal = …;
Function *PerfMonitor::insertFinalReporting() { … }
void PerfMonitor::AppendScopReporting() { … }
static Function *FinalReporting = …;
void PerfMonitor::initialize() { … }
Function *PerfMonitor::insertInitFunction(Function *FinalReporting) { … }
void PerfMonitor::insertRegionStart(Instruction *InsertBefore) { … }
void PerfMonitor::insertRegionEnd(Instruction *InsertBefore) { … }