13 #ifndef LLVM_TRANSFORMS_INSTRPROFILING_H 14 #define LLVM_TRANSFORMS_INSTRPROFILING_H 29 class TargetLibraryInfo;
39 : Options(Options), IsCS(IsCS) {}
49 std::function<const TargetLibraryInfo &(Function &F)> GetTLI;
50 struct PerFunctionProfileData {
51 uint32_t NumValueSites[IPVK_Last + 1];
55 PerFunctionProfileData() {
56 memset(NumValueSites, 0,
sizeof(
uint32_t) * (IPVK_Last + 1));
60 std::vector<GlobalValue *> UsedVars;
61 std::vector<GlobalVariable *> ReferencedNames;
69 std::vector<LoadStorePair> PromotionCandidates;
72 int64_t MemOPSizeRangeStart;
74 int64_t MemOPSizeRangeLast;
76 int64_t TotalCountersPromoted = 0;
83 void promoteCounterLoadStores(
Function *F);
86 bool isCounterPromotionEnabled()
const;
113 void emitRegistration();
117 bool emitRuntimeHook();
124 void emitInitialization();
129 #endif // LLVM_TRANSFORMS_INSTRPROFILING_H This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
std::pair< Instruction *, Instruction * > LoadStorePair
Instrumentation based profiling lowering pass.
A CRTP mix-in to automatically provide informational APIs needed for passes.
InstrProfiling(const InstrProfOptions &Options, bool IsCS=false)
PreservedAnalyses run(Module &M, ModuleAnalysisManager &AM)
A set of analyses that are preserved following a run of a transformation pass.
Triple - Helper class for working with autoconf configuration names.
Provides information about what library functions are available for the current target.
Options for the frontend instrumentation based profiling pass.
This represents the llvm.instrprof_increment intrinsic.
print Print MemDeps of function
A container for analyses that lazily runs them and caches their results.
This header defines various interfaces for pass management in LLVM.
This represents the llvm.instrprof_value_profile intrinsic.