#include "llvm/Analysis/DDGPrinter.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/GraphWriter.h"
usingnamespacellvm;
static cl::opt<bool> DotOnly("dot-ddg-only", cl::Hidden,
cl::desc("simple ddg dot graph"));
static cl::opt<std::string> DDGDotFilenamePrefix(
"dot-ddg-filename-prefix", cl::init("ddg"), cl::Hidden,
cl::desc("The prefix used for the DDG dot file names."));
static void writeDDGToDotFile(DataDependenceGraph &G, bool DOnly = false);
PreservedAnalyses DDGDotPrinterPass::run(Loop &L, LoopAnalysisManager &AM,
LoopStandardAnalysisResults &AR,
LPMUpdater &U) { … }
static void writeDDGToDotFile(DataDependenceGraph &G, bool DOnly) { … }
std::string DDGDotGraphTraits::getNodeLabel(const DDGNode *Node,
const DataDependenceGraph *Graph) { … }
std::string DDGDotGraphTraits::getEdgeAttributes(
const DDGNode *Node, GraphTraits<const DDGNode *>::ChildIteratorType I,
const DataDependenceGraph *G) { … }
bool DDGDotGraphTraits::isNodeHidden(const DDGNode *Node,
const DataDependenceGraph *Graph) { … }
std::string
DDGDotGraphTraits::getSimpleNodeLabel(const DDGNode *Node,
const DataDependenceGraph *G) { … }
std::string
DDGDotGraphTraits::getVerboseNodeLabel(const DDGNode *Node,
const DataDependenceGraph *G) { … }
std::string DDGDotGraphTraits::getSimpleEdgeAttributes(
const DDGNode *Src, const DDGEdge *Edge, const DataDependenceGraph *G) { … }
std::string DDGDotGraphTraits::getVerboseEdgeAttributes(
const DDGNode *Src, const DDGEdge *Edge, const DataDependenceGraph *G) { … }