aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/CodeGen
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-07-21 21:12:58 +0000
committerChris Lattner <sabre@nondot.org>2009-07-21 21:12:58 +0000
commit3380d5c4aaafc3d78d32f583d685d64a67ae5224 (patch)
tree43398b6254f4325ea456d0bbb28b3a1a94cbbed5 /include/llvm/CodeGen
parent7558f11849df6023d1256e46ea5c71b84ded5686 (diff)
downloadexternal_llvm-3380d5c4aaafc3d78d32f583d685d64a67ae5224.tar.gz
external_llvm-3380d5c4aaafc3d78d32f583d685d64a67ae5224.tar.bz2
external_llvm-3380d5c4aaafc3d78d32f583d685d64a67ae5224.zip
revert r76602, 76603, and r76615, pending design discussions.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@76646 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen')
-rw-r--r--include/llvm/CodeGen/LiveIntervalAnalysis.h26
-rw-r--r--include/llvm/CodeGen/MachineBasicBlock.h9
-rw-r--r--include/llvm/CodeGen/MachineFunction.h9
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