MIRPrinter.h revision 341825
1317948Sdim//===- MIRPrinter.h - MIR serialization format printer --------------------===// 2317948Sdim// 3317948Sdim// The LLVM Compiler Infrastructure 4317948Sdim// 5317948Sdim// This file is distributed under the University of Illinois Open Source 6317948Sdim// License. See LICENSE.TXT for details. 7317948Sdim// 8317948Sdim//===----------------------------------------------------------------------===// 9317948Sdim// 10317948Sdim// This file declares the functions that print out the LLVM IR and the machine 11317948Sdim// functions using the MIR serialization format. 12317948Sdim// 13317948Sdim//===----------------------------------------------------------------------===// 14317948Sdim 15317948Sdim#ifndef LLVM_LIB_CODEGEN_MIRPRINTER_H 16317948Sdim#define LLVM_LIB_CODEGEN_MIRPRINTER_H 17317948Sdim 18317948Sdimnamespace llvm { 19317948Sdim 20317948Sdimclass MachineBasicBlock; 21317948Sdimclass MachineFunction; 22317948Sdimclass Module; 23317948Sdimclass raw_ostream; 24317948Sdimtemplate <typename T> class SmallVectorImpl; 25317948Sdim 26317948Sdim/// Print LLVM IR using the MIR serialization format to the given output stream. 27317948Sdimvoid printMIR(raw_ostream &OS, const Module &M); 28317948Sdim 29317948Sdim/// Print a machine function using the MIR serialization format to the given 30317948Sdim/// output stream. 31317948Sdimvoid printMIR(raw_ostream &OS, const MachineFunction &MF); 32317948Sdim 33317948Sdim/// Determine a possible list of successors of a basic block based on the 34317948Sdim/// basic block machine operand being used inside the block. This should give 35317948Sdim/// you the correct list of successor blocks in most cases except for things 36317948Sdim/// like jump tables where the basic block references can't easily be found. 37317948Sdim/// The MIRPRinter will skip printing successors if they match the result of 38317948Sdim/// this funciton and the parser will use this function to construct a list if 39317948Sdim/// it is missing. 40317948Sdimvoid guessSuccessors(const MachineBasicBlock &MBB, 41341825Sdim SmallVectorImpl<MachineBasicBlock*> &Result, 42317948Sdim bool &IsFallthrough); 43317948Sdim 44317948Sdim} // end namespace llvm 45317948Sdim 46317948Sdim#endif 47