17#ifndef LLVM_CODEGEN_MIRPARSER_MIRPARSER_H
18#define LLVM_CODEGEN_MIRPARSER_MIRPARSER_H
33class MachineModuleInfo;
37template <
typename IRUnitT,
typename... ExtraArgTs>
class AnalysisManager;
46 std::unique_ptr<MIRParserImpl> Impl;
49 MIRParser(std::unique_ptr<MIRParserImpl> Impl);
57 std::unique_ptr<Module>
89 StringRef Filename, SMDiagnostic &Error, LLVMContext &Context,
90 std::function<
void(Function &)> ProcessIRFunction =
nullptr);
100std::unique_ptr<MIRParser>
101createMIRParser(std::unique_ptr<MemoryBuffer> Contents, LLVMContext &Context,
102 std::function<
void(Function &)> ProcessIRFunction =
nullptr);
Machine Check Debug Module
ModuleAnalysisManager MAM
A container for analyses that lazily runs them and caches their results.
This class initializes machine functions by applying the state loaded from a MIR file.
MIRParser(const MIRParser &)=delete
std::unique_ptr< Module > parseIRModule(DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
Parses the optional LLVM IR module in the MIR file.
bool parseMachineFunctions(Module &M, MachineModuleInfo &MMI)
Parses MachineFunctions in the MIR file and add them to the given MachineModuleInfo MMI.
This class contains meta information specific to a module.
A Module instance is used to store all the information related to an LLVM module.
StringRef - Represent a constant reference to a string, i.e.
An efficient, type-erasing, non-owning reference to a callable.
This is an optimization pass for GlobalISel generic memory operations.
std::unique_ptr< MIRParser > createMIRParserFromFile(StringRef Filename, SMDiagnostic &Error, LLVMContext &Context, std::function< void(Function &)> ProcessIRFunction=nullptr)
This function is the main interface to the MIR serialization format parser.
std::unique_ptr< MIRParser > createMIRParser(std::unique_ptr< MemoryBuffer > Contents, LLVMContext &Context, std::function< void(Function &)> ProcessIRFunction=nullptr)
This function is another interface to the MIR serialization format parser.
llvm::function_ref< std::optional< std::string >(StringRef, StringRef)> DataLayoutCallbackTy