14 #ifndef LLVM_ANALYSIS_DOTGRAPHTRAITSPASS_H
15 #define LLVM_ANALYSIS_DOTGRAPHTRAITSPASS_H
22 template <
class Analysis,
bool Simple>
29 Analysis *Graph = &getAnalysis<Analysis>();
31 std::string Title = GraphName +
" for '" + F.
getName().
str() +
"' function";
47 template <
class Analysis,
bool Simple>
54 Analysis *Graph = &getAnalysis<Analysis>();
55 std::string Filename = Name +
"." + F.
getName().
str() +
".dot";
56 std::string ErrorInfo;
58 errs() <<
"Writing '" << Filename <<
"'...";
62 std::string Title = GraphName +
" for '" + F.
getName().
str() +
"' function";
64 if (ErrorInfo.empty())
67 errs() <<
" error opening file for writing!";
82 template <
class Analysis,
bool Simple>
89 Analysis *Graph = &getAnalysis<Analysis>();
106 template <
class Analysis,
bool Simple>
113 Analysis *Graph = &getAnalysis<Analysis>();
114 std::string Filename = Name +
".dot";
115 std::string ErrorInfo;
117 errs() <<
"Writing '" << Filename <<
"'...";
122 if (ErrorInfo.empty())
125 errs() <<
" error opening file for writing!";
virtual void getAnalysisUsage(AnalysisUsage &AU) const
The main container class for the LLVM Intermediate Representation.
raw_ostream & WriteGraph(raw_ostream &O, const EdgeBundles &G, bool ShortNames=false, const Twine &Title="")
Specialize WriteGraph, the standard implementation won't work.
std::string str() const
str - Get the contents as an std::string.
StringRef getName() const
AnalysisUsage & addRequired()
DOTGraphTraitsPrinter(StringRef GraphName, char &ID)
ID
LLVM Calling Convention Representation.
virtual void getAnalysisUsage(AnalysisUsage &AU) const
virtual bool runOnFunction(Function &F)
void ViewGraph(const GraphType &G, const Twine &Name, bool ShortNames=false, const Twine &Title="", GraphProgram::Name Program=GraphProgram::DOT)
virtual void getAnalysisUsage(AnalysisUsage &AU) const
DOTGraphTraitsModuleViewer(StringRef GraphName, char &ID)
DOTGraphTraitsModulePrinter(StringRef GraphName, char &ID)
block Block Frequency Analysis
virtual void getAnalysisUsage(AnalysisUsage &AU) const
virtual bool runOnModule(Module &M)
virtual bool runOnModule(Module &M)
virtual bool runOnFunction(Function &F)
static std::string getGraphName(const GraphType &)
DOTGraphTraitsViewer(StringRef GraphName, char &ID)