LLVM API Documentation

CFGPrinter.cpp File Reference

#include "llvm/Function.h"
#include "llvm/Instructions.h"
#include "llvm/Pass.h"
#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/Assembly/Writer.h"
#include "llvm/Support/CFG.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/GraphWriter.h"
#include "llvm/Config/config.h"
#include <iosfwd>
#include <sstream>
#include <fstream>

Include dependency graph for CFGPrinter.cpp:

Go to the source code of this file.

Namespaces

namespace  llvm

Classes

struct  llvm::DOTGraphTraits< const Function * >

Functions

FunctionPass * llvm::createCFGPrinterPass ()
FunctionPass * llvm::createCFGOnlyPrinterPass ()

Variables

static bool CFGOnly = false
static RegisterPass< CFGViewer > V0 ("view-cfg","View CFG of function", false, true)
static RegisterPass
< CFGOnlyViewer > 
V1 ("view-cfg-only","View CFG of function (with no function bodies)", false, true)
static RegisterPass< CFGPrinter > P1 ("dot-cfg","Print CFG of function to 'dot' file", false, true)
static RegisterPass
< CFGOnlyPrinter > 
P2 ("dot-cfg-only","Print CFG of function to 'dot' file (with no function bodies)", false, true)


Variable Documentation

bool CFGOnly = false [static]

CFGOnly flag - This is used to control whether or not the CFG graph printer prints out the contents of basic blocks or not. This is acceptable because this code is only really used for debugging purposes.

Definition at line 38 of file CFGPrinter.cpp.

Referenced by llvm::DOTGraphTraits< const Function * >::getNodeLabel(), and llvm::Function::viewCFGOnly().

char ID [static]

Definition at line 94 of file CFGPrinter.cpp.

RegisterPass<CFGPrinter> P1("dot-cfg","Print CFG of function to 'dot' file", false, true) [static]

RegisterPass<CFGOnlyPrinter> P2("dot-cfg-only","Print CFG of function to 'dot' file (with no function bodies)", false, true) [static]

Referenced by CompareByFrequency().

RegisterPass<CFGViewer> V0("view-cfg","View CFG of function", false, true) [static]

RegisterPass<CFGOnlyViewer> V1("view-cfg-only","View CFG of function (with no function bodies)", false, true) [static]