LLVM 22.0.0git
llvm::MIRParser Class Reference

This class initializes machine functions by applying the state loaded from a MIR file. More...

#include "llvm/CodeGen/MIRParser/MIRParser.h"

Public Member Functions

LLVM_ABI MIRParser (std::unique_ptr< MIRParserImpl > Impl)
 MIRParser (const MIRParser &)=delete
LLVM_ABI ~MIRParser ()
LLVM_ABI std::unique_ptr< ModuleparseIRModule (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.
LLVM_ABI bool parseMachineFunctions (Module &M, ModuleAnalysisManager &MAM)
 Parses MachineFunctions in the MIR file and add them as the result of MachineFunctionAnalysis in ModulePassManager MAM.

Detailed Description

This class initializes machine functions by applying the state loaded from a MIR file.

Definition at line 46 of file MIRParser.h.

Constructor & Destructor Documentation

◆ MIRParser() [1/2]

MIRParser::MIRParser ( std::unique_ptr< MIRParserImpl > Impl)

Definition at line 1251 of file MIRParser.cpp.

References llvm::move().

Referenced by MIRParser().

◆ MIRParser() [2/2]

llvm::MIRParser::MIRParser ( const MIRParser & )
delete

References MIRParser().

◆ ~MIRParser()

MIRParser::~MIRParser ( )
default

References LLVM_ABI.

Member Function Documentation

◆ parseIRModule()

std::unique_ptr< Module > MIRParser::parseIRModule ( DataLayoutCallbackTy DataLayoutCallback = [](StringRefStringRef) { return std::nullopt; })

Parses the optional LLVM IR module in the MIR file.

A new, empty module is created if the LLVM IR isn't present.

Returns
nullptr if a parsing error occurred.

Definition at line 1257 of file MIRParser.cpp.

◆ parseMachineFunctions() [1/2]

bool MIRParser::parseMachineFunctions ( Module & M,
MachineModuleInfo & MMI )

Parses MachineFunctions in the MIR file and add them to the given MachineModuleInfo MMI.

Returns
true if an error occurred.

Definition at line 1261 of file MIRParser.cpp.

◆ parseMachineFunctions() [2/2]

bool MIRParser::parseMachineFunctions ( Module & M,
ModuleAnalysisManager & MAM )

Parses MachineFunctions in the MIR file and add them as the result of MachineFunctionAnalysis in ModulePassManager MAM.

User should register at least MachineFunctionAnalysis, MachineModuleAnalysis, FunctionAnalysisManagerModuleProxy and PassInstrumentationAnalysis in MAM before parsing MIR.

Returns
true if an error occurred.

Definition at line 1265 of file MIRParser.cpp.

References MAM.


The documentation for this class was generated from the following files: