#include "llvm/CodeGen/MachineOptimizationRemarkEmitter.h"
#include "llvm/CodeGen/LazyMachineBlockFrequencyInfo.h"
#include "llvm/CodeGen/MachineInstr.h"
#include "llvm/IR/DiagnosticInfo.h"
#include "llvm/IR/LLVMContext.h"
#include "llvm/InitializePasses.h"
#include <optional>
usingnamespacellvm;
DiagnosticInfoMIROptimization::MachineArgument::MachineArgument(
StringRef MKey, const MachineInstr &MI) { … }
bool MachineOptimizationRemarkEmitter::invalidate(
MachineFunction &MF, const PreservedAnalyses &PA,
MachineFunctionAnalysisManager::Invalidator &Inv) { … }
std::optional<uint64_t>
MachineOptimizationRemarkEmitter::computeHotness(const MachineBasicBlock &MBB) { … }
void MachineOptimizationRemarkEmitter::computeHotness(
DiagnosticInfoMIROptimization &Remark) { … }
void MachineOptimizationRemarkEmitter::emit(
DiagnosticInfoOptimizationBase &OptDiagCommon) { … }
MachineOptimizationRemarkEmitterPass::MachineOptimizationRemarkEmitterPass()
: … { … }
bool MachineOptimizationRemarkEmitterPass::runOnMachineFunction(
MachineFunction &MF) { … }
void MachineOptimizationRemarkEmitterPass::getAnalysisUsage(
AnalysisUsage &AU) const { … }
AnalysisKey MachineOptimizationRemarkEmitterAnalysis::Key;
MachineOptimizationRemarkEmitterAnalysis::Result
MachineOptimizationRemarkEmitterAnalysis::run(
MachineFunction &MF, MachineFunctionAnalysisManager &MFAM) { … }
char MachineOptimizationRemarkEmitterPass::ID = …;
static const char ore_name[] = …;
#define ORE_NAME …
INITIALIZE_PASS_BEGIN(MachineOptimizationRemarkEmitterPass, ORE_NAME, ore_name,
true, true)
INITIALIZE_PASS_DEPENDENCY(LazyMachineBlockFrequencyInfoPass)
INITIALIZE_PASS_END(MachineOptimizationRemarkEmitterPass, ORE_NAME, ore_name,
true, true)