31 std::string MachineFunctions;
36 StringRef getPassName()
const override {
return "MIR Printing Pass"; }
47 MachineFunctions.append(StrOS.str());
51 bool doFinalization(
Module &M)
override {
53 OS << MachineFunctions;
63 INITIALIZE_PASS(MIRPrintingPass,
"mir-printer",
"MIR Printer",
false,
false)
68 return new MIRPrintingPass(OS);
This class represents lattice values for constants.
A Module instance is used to store all the information related to an LLVM module. ...
MachineFunctionPass - This class adapts the FunctionPass interface to allow convenient creation of pa...
void getAnalysisUsage(AnalysisUsage &AU) const override
getAnalysisUsage - Subclasses that override getAnalysisUsage must call this.
Represent the analysis usage information of a pass.
char & MIRPrintingPassID
MIRPrintingPass - this pass prints out the LLVM IR using the MIR serialization format.
void printMIR(raw_ostream &OS, const Module &M)
Print LLVM IR using the MIR serialization format to the given output stream.
#define INITIALIZE_PASS(passName, arg, name, cfg, analysis)
raw_ostream & dbgs()
dbgs() - This returns a reference to a raw_ostream for debugging messages.
void setPreservesAll()
Set by analyses that do not transform their input at all.
A raw_ostream that writes to an std::string.
This class implements an extremely fast bulk output stream that can only output to a stream...
StringRef - Represent a constant reference to a string, i.e.
MachineFunctionPass * createPrintMIRPass(raw_ostream &OS)
MIRPrinting pass - this pass prints out the LLVM IR into the given stream using the MIR serialization...