Deleted Added
full compact
GraphPrinters.cpp (218885) GraphPrinters.cpp (221337)
1//===- GraphPrinters.cpp - DOT printers for various graph types -----------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 4 unchanged lines hidden (view full) ---

13// "dot" tool to convert them to postscript or some other suitable format.
14//
15//===----------------------------------------------------------------------===//
16
17#include "llvm/Support/GraphWriter.h"
18#include "llvm/Pass.h"
19#include "llvm/Value.h"
20#include "llvm/Analysis/CallGraph.h"
1//===- GraphPrinters.cpp - DOT printers for various graph types -----------===//
2//
3// The LLVM Compiler Infrastructure
4//
5// This file is distributed under the University of Illinois Open Source
6// License. See LICENSE.TXT for details.
7//
8//===----------------------------------------------------------------------===//

--- 4 unchanged lines hidden (view full) ---

13// "dot" tool to convert them to postscript or some other suitable format.
14//
15//===----------------------------------------------------------------------===//
16
17#include "llvm/Support/GraphWriter.h"
18#include "llvm/Pass.h"
19#include "llvm/Value.h"
20#include "llvm/Analysis/CallGraph.h"
21#include "llvm/Analysis/DominanceFrontier.h"
21#include "llvm/Analysis/Dominators.h"
22#include "llvm/Support/ToolOutputFile.h"
23using namespace llvm;
24
25template<typename GraphType>
26static void WriteGraphToFile(raw_ostream &O, const std::string &GraphName,
27 const GraphType &GT) {
28 std::string Filename = GraphName + ".dot";
29 O << "Writing '" << Filename << "'...";

--- 68 unchanged lines hidden (view full) ---

98 class DomInfoPrinter : public FunctionPass {
99 public:
100 static char ID; // Pass identification, replacement for typeid
101 DomInfoPrinter() : FunctionPass(ID) {}
102
103 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
104 AU.setPreservesAll();
105 AU.addRequired<DominatorTree>();
22#include "llvm/Support/ToolOutputFile.h"
23using namespace llvm;
24
25template<typename GraphType>
26static void WriteGraphToFile(raw_ostream &O, const std::string &GraphName,
27 const GraphType &GT) {
28 std::string Filename = GraphName + ".dot";
29 O << "Writing '" << Filename << "'...";

--- 68 unchanged lines hidden (view full) ---

98 class DomInfoPrinter : public FunctionPass {
99 public:
100 static char ID; // Pass identification, replacement for typeid
101 DomInfoPrinter() : FunctionPass(ID) {}
102
103 virtual void getAnalysisUsage(AnalysisUsage &AU) const {
104 AU.setPreservesAll();
105 AU.addRequired<DominatorTree>();
106 AU.addRequired<DominanceFrontier>();
107
108 }
109
110 virtual bool runOnFunction(Function &F) {
111 getAnalysis<DominatorTree>().dump();
106
107 }
108
109 virtual bool runOnFunction(Function &F) {
110 getAnalysis<DominatorTree>().dump();
112 getAnalysis<DominanceFrontier>().dump();
113 return false;
114 }
115 };
116}
117
118char DomInfoPrinter::ID = 0;
119static RegisterPass<DomInfoPrinter>
120DIP("print-dom-info", "Dominator Info Printer", true, true);
111 return false;
112 }
113 };
114}
115
116char DomInfoPrinter::ID = 0;
117static RegisterPass<DomInfoPrinter>
118DIP("print-dom-info", "Dominator Info Printer", true, true);