17#ifndef LLVM_CODEGEN_MIRPARSER_MIRPARSER_H
18#define LLVM_CODEGEN_MIRPARSER_MIRPARSER_H
38template <
typename IRUnitT,
typename... ExtraArgTs>
class AnalysisManager;
47 std::unique_ptr<MIRParserImpl> Impl;
90 StringRef Filename, SMDiagnostic &Error, LLVMContext &Context,
91 std::function<
void(Function &)> ProcessIRFunction =
nullptr);
102createMIRParser(std::unique_ptr<MemoryBuffer> Contents, LLVMContext &Context,
103 std::function<
void(Function &)> ProcessIRFunction =
nullptr);
ModuleAnalysisManager MAM
A container for analyses that lazily runs them and caches their results.
This is an important class for using LLVM in a threaded context.
This class implements the parsing of LLVM IR that's embedded inside a MIR file.
LLVM_ABI MIRParser(std::unique_ptr< MIRParserImpl > Impl)
MIRParser(const MIRParser &)=delete
LLVM_ABI std::unique_ptr< Module > parseIRModule(DataLayoutCallbackTy DataLayoutCallback=[](StringRef, StringRef) { return std::nullopt;})
Parses the optional LLVM IR module in the MIR file.
LLVM_ABI 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.
This interface provides simple read-only access to a block of memory, and provides simple methods for...
A Module instance is used to store all the information related to an LLVM module.
Instances of this class encapsulate one diagnostic report, allowing printing to a raw_ostream as a ca...
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.
LLVM_ABI 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.
LLVM_ABI 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
AnalysisManager< Module > ModuleAnalysisManager
Convenience typedef for the Module analysis manager.