diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/Analysis/CallGraph.h | 6 | ||||
-rw-r--r-- | include/llvm/Bytecode/WriteBytecodePass.h | 9 | ||||
-rw-r--r-- | include/llvm/Bytecode/Writer.h | 5 | ||||
-rw-r--r-- | include/llvm/CodeGen/Passes.h | 5 | ||||
-rw-r--r-- | include/llvm/Support/Streams.h | 1 |
5 files changed, 19 insertions, 7 deletions
diff --git a/include/llvm/Analysis/CallGraph.h b/include/llvm/Analysis/CallGraph.h index b567bab..f29aef3 100644 --- a/include/llvm/Analysis/CallGraph.h +++ b/include/llvm/Analysis/CallGraph.h @@ -152,6 +152,9 @@ public: /// void initialize(Module &M); + void print(llvm_ostream &o, const Module *M) const { + if (o.stream()) print(*o.stream(), M); + } virtual void print(std::ostream &o, const Module *M) const; void dump() const; @@ -198,6 +201,9 @@ public: /// dump - Print out this call graph node. /// void dump() const; + void print(llvm_ostream &OS) const { + if (OS.stream()) print(*OS.stream()); + } void print(std::ostream &OS) const; //===--------------------------------------------------------------------- diff --git a/include/llvm/Bytecode/WriteBytecodePass.h b/include/llvm/Bytecode/WriteBytecodePass.h index 198cc02..a634812 100644 --- a/include/llvm/Bytecode/WriteBytecodePass.h +++ b/include/llvm/Bytecode/WriteBytecodePass.h @@ -17,18 +17,19 @@ #include "llvm/Pass.h" #include "llvm/Bytecode/Writer.h" -#include <iostream> namespace llvm { +class llvm_ostream; + class WriteBytecodePass : public ModulePass { - std::ostream *Out; // ostream to print on + llvm_ostream *Out; // ostream to print on bool DeleteStream; bool CompressFile; public: WriteBytecodePass() - : Out(&std::cout), DeleteStream(false), CompressFile(true) {} - WriteBytecodePass(std::ostream *o, bool DS = false, bool CF = true) + : Out(&llvm_cout), DeleteStream(false), CompressFile(true) {} + WriteBytecodePass(llvm_ostream *o, bool DS = false, bool CF = true) : Out(o), DeleteStream(DS), CompressFile(CF) {} inline ~WriteBytecodePass() { diff --git a/include/llvm/Bytecode/Writer.h b/include/llvm/Bytecode/Writer.h index 8b89226..374e5df 100644 --- a/include/llvm/Bytecode/Writer.h +++ b/include/llvm/Bytecode/Writer.h @@ -15,14 +15,13 @@ #ifndef LLVM_BYTECODE_WRITER_H #define LLVM_BYTECODE_WRITER_H -#include <iosfwd> - namespace llvm { + class llvm_ostream; class Module; /// WriteBytecodeToFile - Write the specified module to the specified output /// stream. If compress is set to true, try to use compression when writing /// out the file. This can never fail if M is a well-formed module. - void WriteBytecodeToFile(const Module *M, std::ostream &Out, + void WriteBytecodeToFile(const Module *M, llvm_ostream &Out, bool compress = true); } // End llvm namespace diff --git a/include/llvm/CodeGen/Passes.h b/include/llvm/CodeGen/Passes.h index adccf53..4d27e54 100644 --- a/include/llvm/CodeGen/Passes.h +++ b/include/llvm/CodeGen/Passes.h @@ -70,6 +70,11 @@ namespace llvm { /// FunctionPass *createLinearScanRegisterAllocator(); + /// PriorityBasedGraphColoringRegisterAllocator Pass - This pass implements + /// the priority-based graph coloring register allocator by Chow & Hennessey, + /// a global register allocator. + FunctionPass *createGraphColoringRegisterAllocator(); + /// PrologEpilogCodeInserter Pass - This pass inserts prolog and epilog code, /// and eliminates abstract frame references. /// diff --git a/include/llvm/Support/Streams.h b/include/llvm/Support/Streams.h index 8048d56..a422756 100644 --- a/include/llvm/Support/Streams.h +++ b/include/llvm/Support/Streams.h @@ -43,6 +43,7 @@ namespace llvm { } bool operator == (const std::ostream &OS) { return &OS == Stream; } + bool operator == (const llvm_ostream &OS) { return OS.Stream == Stream; } }; extern llvm_ostream llvm_null; |