LLVM: include/llvm/Transforms/Instrumentation/PGOInstrumentation.h Source File (original) (raw)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15#ifndef LLVM_TRANSFORMS_INSTRUMENTATION_PGOINSTRUMENTATION_H
16#define LLVM_TRANSFORMS_INSTRUMENTATION_PGOINSTRUMENTATION_H
17
24#include
25#include
26
27namespace llvm {
28
32
33
34
35
36
37
38
40 : public PassInfoMixin {
41public:
43 bool Sampling = false)
44 : CSInstrName(CSInstrName), ProfileSampling(Sampling) {}
46
47private:
48 std::string CSInstrName;
49 bool ProfileSampling;
50};
51
53
55public:
58 : InstrumentationType(InstrumentationType) {}
60
61private:
62
64};
65
66
68public:
71 std::string RemappingFilename = "", bool IsCS = false,
73
75
76private:
77 std::string ProfileFileName;
78 std::string ProfileRemappingFileName;
79
80 bool IsCS;
82};
83
84
86public:
88 : InLTO(IsInLTO), SamplePGO(SamplePGO) {}
89
91
92private:
93 bool InLTO;
94 bool SamplePGO;
95};
96
97
104
107
110
111}
112
113#endif
This header defines various interfaces for pass management in LLVM.
This file defines the RefCountedBase, ThreadSafeRefCountedBase, and IntrusiveRefCntPtr classes.
ModuleAnalysisManager MAM
Defines the virtual file system interface vfs::FileSystem.
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...
A smart pointer to a reference-counted object that inherits from RefCountedBase or ThreadSafeRefCount...
A Module instance is used to store all the information related to an LLVM module.
PGOInstrumentationGenCreateVar(std::string CSInstrName="", bool Sampling=false)
Definition PGOInstrumentation.h:42
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
PGOInstrumentationGen(PGOInstrumentationType InstrumentationType=PGOInstrumentationType ::FDO)
Definition PGOInstrumentation.h:56
LLVM_ABI PGOInstrumentationUse(std::string Filename="", std::string RemappingFilename="", bool IsCS=false, IntrusiveRefCntPtr< vfs::FileSystem > FS=nullptr)
LLVM_ABI PreservedAnalyses run(Module &M, ModuleAnalysisManager &MAM)
LLVM_ABI PreservedAnalyses run(Function &F, FunctionAnalysisManager &MAM)
PGOMemOPSizeOpt()=default
A set of analyses that are preserved following a run of a transformation pass.
This is an optimization pass for GlobalISel generic memory operations.
LLVM_ABI void setIrrLoopHeaderMetadata(Module *M, Instruction *TI, uint64_t Count)
LLVM_ABI void setProfMetadata(Instruction *TI, ArrayRef< uint64_t > EdgeCounts, uint64_t MaxCount)
PGOInstrumentationType
Definition PGOInstrumentation.h:52
@ CTXPROF
Definition PGOInstrumentation.h:52
@ CSFDO
Definition PGOInstrumentation.h:52
@ FDO
Definition PGOInstrumentation.h:52
FunctionAddr VTableAddr Count
AnalysisManager< Function > FunctionAnalysisManager
Convenience typedef for the Function analysis manager.
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.
A CRTP mix-in to automatically provide informational APIs needed for passes.