diff options
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r-- | include/llvm/CodeGen/LiveIntervalAnalysis.h | 26 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineBasicBlock.h | 9 | ||||
-rw-r--r-- | include/llvm/CodeGen/MachineFunction.h | 9 |
3 files changed, 6 insertions, 38 deletions
diff --git a/include/llvm/CodeGen/LiveIntervalAnalysis.h b/include/llvm/CodeGen/LiveIntervalAnalysis.h index ea67cdbba2..40991e74e3 100644 --- a/include/llvm/CodeGen/LiveIntervalAnalysis.h +++ b/include/llvm/CodeGen/LiveIntervalAnalysis.h @@ -27,9 +27,7 @@ #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/SmallVector.h" #include "llvm/Support/Allocator.h" -#include "llvm/Support/Dump.h" #include <cmath> -#include <sstream> namespace llvm { @@ -81,7 +79,7 @@ namespace llvm { /// FunctionSize - The number of instructions present in the function uint64_t FunctionSize; - typedef DenseMap<const MachineInstr*, unsigned> Mi2IndexMap; + typedef DenseMap<MachineInstr*, unsigned> Mi2IndexMap; Mi2IndexMap mi2iMap_; typedef std::vector<MachineInstr*> Index2MiMap; @@ -200,7 +198,7 @@ namespace llvm { } /// getInstructionIndex - returns the base index of instr - unsigned getInstructionIndex(const MachineInstr* instr) const { + unsigned getInstructionIndex(MachineInstr* instr) const { Mi2IndexMap::const_iterator it = mi2iMap_.find(instr); assert(it != mi2iMap_.end() && "Invalid instruction!"); return it->second; @@ -540,26 +538,6 @@ namespace llvm { void printRegName(unsigned reg) const; }; - // IntervalPrefixPrinter - Print live interval indices before each - // instruction. - class IntervalPrefixPrinter : public PrefixPrinter { - private: - const LiveIntervals &liinfo; - - public: - IntervalPrefixPrinter(const LiveIntervals &lii) - : liinfo(lii) {}; - - std::string operator()(const MachineBasicBlock &) const { - return(""); - }; - - std::string operator()(const MachineInstr &instr) const { - std::stringstream out; - out << liinfo.getInstructionIndex(&instr); - return(out.str()); - }; - }; } // End llvm namespace #endif diff --git a/include/llvm/CodeGen/MachineBasicBlock.h b/include/llvm/CodeGen/MachineBasicBlock.h index b5278b688d..aacc31455e 100644 --- a/include/llvm/CodeGen/MachineBasicBlock.h +++ b/include/llvm/CodeGen/MachineBasicBlock.h @@ -16,7 +16,6 @@ #include "llvm/CodeGen/MachineInstr.h" #include "llvm/ADT/GraphTraits.h" -#include "llvm/Support/Dump.h" namespace llvm { @@ -310,12 +309,8 @@ public: // Debugging methods. void dump() const; - void print(std::ostream &OS, - const PrefixPrinter &prefix = PrefixPrinter()) const; - void print(std::ostream *OS, - const PrefixPrinter &prefix = PrefixPrinter()) const { - if (OS) print(*OS, prefix); - } + void print(std::ostream &OS) const; + void print(std::ostream *OS) const { if (OS) print(*OS); } /// getNumber - MachineBasicBlocks are uniquely numbered at the function /// level, unless they're not in a MachineFunction yet, in which case this diff --git a/include/llvm/CodeGen/MachineFunction.h b/include/llvm/CodeGen/MachineFunction.h index 4937b23a6d..ea6a384d22 100644 --- a/include/llvm/CodeGen/MachineFunction.h +++ b/include/llvm/CodeGen/MachineFunction.h @@ -20,7 +20,6 @@ #include "llvm/ADT/ilist.h" #include "llvm/Support/DebugLoc.h" -#include "llvm/Support/Dump.h" #include "llvm/CodeGen/MachineBasicBlock.h" #include "llvm/Support/Annotation.h" #include "llvm/Support/Allocator.h" @@ -208,12 +207,8 @@ public: /// print - Print out the MachineFunction in a format suitable for debugging /// to the specified stream. /// - void print(std::ostream &OS, - const PrefixPrinter &prefix = PrefixPrinter()) const; - void print(std::ostream *OS, - const PrefixPrinter &prefix = PrefixPrinter()) const { - if (OS) print(*OS, prefix); - } + void print(std::ostream &OS) const; + void print(std::ostream *OS) const { if (OS) print(*OS); } /// viewCFG - This function is meant for use from the debugger. You can just /// say 'call F->viewCFG()' and a ghostview window should pop up from the |