14#ifndef LLVM_ANALYSIS_OPTIMIZATIONREMARKEMITTER_H
15#define LLVM_ANALYSIS_OPTIMIZATIONREMARKEMITTER_H
53 : F(Arg.F), BFI(Arg.BFI) {}
78 void emit(
T RemarkBuilder,
decltype(RemarkBuilder()) * =
nullptr) {
84 auto R = RemarkBuilder();
87 "the lambda passed to emit() must return a remark");
116 std::unique_ptr<BlockFrequencyInfo> OwnedBFI;
120 std::optional<uint64_t> computeHotness(
const Value *V);
127 bool shouldEmitVerbose() {
return BFI !=
nullptr; }
129 OptimizationRemarkEmitter(
const OptimizationRemarkEmitter &) =
delete;
130 void operator=(
const OptimizationRemarkEmitter &) =
delete;
148 std::unique_ptr<OptimizationRemarkEmitter> ORE;
158 assert(ORE &&
"pass not run yet");
Given that RA is a live value
This header defines various interfaces for pass management in LLVM.
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
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.
const DiagnosticHandler * getDiagHandlerPtr() const
getDiagHandlerPtr - Returns const raw pointer of DiagnosticHandler set by setDiagnosticHandler.
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.