LLVM: lib/CodeGen/MachineCFGPrinter.cpp File Reference (original) (raw)

#include "[llvm/CodeGen/MachineCFGPrinter.h](MachineCFGPrinter%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/MachineBasicBlock.h](MachineBasicBlock%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/MachineFunctionPass.h](MachineFunctionPass%5F8h%5Fsource.html)"
#include "[llvm/CodeGen/TargetSubtargetInfo.h](TargetSubtargetInfo%5F8h%5Fsource.html)"
#include "[llvm/InitializePasses.h](InitializePasses%5F8h%5Fsource.html)"
#include "[llvm/Pass.h](Pass%5F8h%5Fsource.html)"
#include "[llvm/PassRegistry.h](PassRegistry%5F8h%5Fsource.html)"
#include "[llvm/Support/GraphWriter.h](GraphWriter%5F8h%5Fsource.html)"

Go to the source code of this file.

Macros
#define DEBUG_TYPE "dot-machine-cfg"
Functions
static void writeMCFGToDotFile (MachineFunction &MF)
INITIALIZE_PASS (MachineCFGPrinter, DEBUG_TYPE, "Machine CFG Printer Pass", false, true) MachineCFGPrinter
Default construct and initialize the pass.
Variables
static cl::opt< std::string > MCFGFuncName ("mcfg-func-name", cl::Hidden, cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed."))
static cl::opt< std::string > MCFGDotFilenamePrefix ("mcfg-dot-filename-prefix", cl::Hidden, cl::desc("The prefix used for the Machine CFG dot file names."))
static cl::opt< bool > CFGOnly ("dot-mcfg-only", cl::init(false), cl::Hidden, cl::desc("Print only the CFG without blocks body"))

Macro Definition Documentation

DEBUG_TYPE

#define DEBUG_TYPE "dot-machine-cfg"

Definition at line 25 of file MachineCFGPrinter.cpp.

Function Documentation

INITIALIZE_PASS()

INITIALIZE_PASS ( MachineCFGPrinter ,
DEBUG_TYPE ,
"Machine CFG Printer Pass" ,
false ,
true )

Default construct and initialize the pass.

Definition at line 79 of file MachineCFGPrinter.cpp.

References DEBUG_TYPE, llvm::PassRegistry::getPassRegistry(), and llvm::initializeMachineCFGPrinterPass().

writeMCFGToDotFile()

void writeMCFGToDotFile ( MachineFunction & MF) static

Definition at line 40 of file MachineCFGPrinter.cpp.

References CFGOnly, llvm::errs(), llvm::MachineFunction::getName(), MCFGDotFilenamePrefix, llvm::sys::fs::OF_Text, and llvm::WriteGraph().

Variable Documentation

CFGOnly

cl::opt< bool > CFGOnly("dot-mcfg-only", cl::init(false), cl::Hidden, cl::desc("Print only the CFG without blocks body")) ( "dot-mcfg-only" , cl::init(false) , cl::Hidden , cl::desc("Print only the CFG without blocks body") ) static

Referenced by llvm::RegisterPass< passName >::RegisterPass(), viewCFG(), writeCFGToDotFile(), and writeMCFGToDotFile().

MCFGDotFilenamePrefix

cl::opt< std::string > MCFGDotFilenamePrefix("mcfg-dot-filename-prefix", cl::Hidden, cl::desc("The prefix used for the Machine CFG dot file names.")) ( "mcfg-dot-filename-prefix" , cl::Hidden , cl::desc("The prefix used for the Machine CFG dot file names.") ) static

Referenced by writeMCFGToDotFile().

MCFGFuncName

cl::opt< std::string > MCFGFuncName("mcfg-func-name", cl::Hidden, cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed.")) ( "mcfg-func-name" , cl::Hidden , cl::desc("The name of a function (or its substring)" " whose CFG is viewed/printed.") ) static