14#ifndef LLVM_ANALYSIS_OPTIMIZATIONREMARKEMITTER_H
15#define LLVM_ANALYSIS_OPTIMIZATIONREMARKEMITTER_H
52 : F(Arg.F), BFI(Arg.BFI) {}
80 void emit(
T RemarkBuilder,
decltype(RemarkBuilder()) * =
nullptr) {
86 auto R = RemarkBuilder();
89 "the lambda passed to emit() must return a remark");
118 std::unique_ptr<BlockFrequencyInfo> OwnedBFI;
122 std::optional<uint64_t> computeHotness(
const Value *V);
129 bool shouldEmitVerbose() {
return BFI !=
nullptr; }
131 OptimizationRemarkEmitter(
const OptimizationRemarkEmitter &) =
delete;
132 void operator=(
const OptimizationRemarkEmitter &) =
delete;
150 std::unique_ptr<OptimizationRemarkEmitter> ORE;
160 assert(ORE &&
"pass not run yet");
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
Given that RA is a live value
static bool runOnFunction(Function &F, bool PostInlining)
This header defines various interfaces for pass management in LLVM.
static const char PassName[]
API to communicate dependencies between analyses during invalidation.
A container for analyses that lazily runs them and caches their results.
Represent the analysis usage information of a pass.
BlockFrequencyInfo pass uses BlockFrequencyInfoImpl implementation to estimate IR basic block frequen...
Common features for diagnostics dealing with optimization remarks that are used by IR passes.
Common features for diagnostics dealing with optimization remarks that are used by both IR and MIR pa...
FunctionPass class - This class is used to implement most global optimizations.
LLVMContext & getContext() const
getContext - Return a reference to the LLVMContext associated with this function.
This is an important class for using LLVM in a threaded context.
LLVM_ABI const DiagnosticHandler * getDiagHandlerPtr() const
getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.
LLVM_ABI LLVMRemarkStreamer * getLLVMRemarkStreamer()
The "LLVM remark streamer" used by LLVM to serialize remark diagnostics comming from IR and MIR passe...
A set of analyses that are preserved following a run of a transformation pass.
StringRef - Represent a constant reference to a string, i.e.
LLVM Value Representation.
This is an optimization pass for GlobalISel generic memory operations.
A CRTP mix-in that provides informational APIs needed for analysis passes.
A special type used by analysis passes to provide an address that identifies that particular analysis...
bool isAnyRemarkEnabled(StringRef PassName) const
Return true if any type of remarks are enabled for this pass.
Used in the streaming interface as the general argument type.
Used to set IsVerbose via the stream interface.