aboutsummaryrefslogtreecommitdiffstats
path: root/lib/CodeGen/VirtRegRewriter.cpp
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-08-07 01:32:21 +0000
committerDan Gohman <gohman@apple.com>2009-08-07 01:32:21 +0000
commit7db949df789383acce98ef072f08794fdd5bd04e (patch)
tree30a8b3e2bea69508eb5da0dbca173cbe23052743 /lib/CodeGen/VirtRegRewriter.cpp
parent748f98f90836dbb4c36fea67c9ebe7b6bb13255e (diff)
downloadexternal_llvm-7db949df789383acce98ef072f08794fdd5bd04e.tar.gz
external_llvm-7db949df789383acce98ef072f08794fdd5bd04e.tar.bz2
external_llvm-7db949df789383acce98ef072f08794fdd5bd04e.zip
Fix a bunch of namespace pollution.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78363 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/VirtRegRewriter.cpp')
-rw-r--r--lib/CodeGen/VirtRegRewriter.cpp18
1 files changed, 16 insertions, 2 deletions
diff --git a/lib/CodeGen/VirtRegRewriter.cpp b/lib/CodeGen/VirtRegRewriter.cpp
index 460b508a80..b34d43a1f5 100644
--- a/lib/CodeGen/VirtRegRewriter.cpp
+++ b/lib/CodeGen/VirtRegRewriter.cpp
@@ -48,13 +48,14 @@ RewriterOpt("rewriter",
clEnumValEnd),
cl::init(local));
-cl::opt<bool>
+static cl::opt<bool>
ScheduleSpills("schedule-spills",
cl::desc("Schedule spill code"),
cl::init(false));
VirtRegRewriter::~VirtRegRewriter() {}
+namespace {
/// This class is intended for use with the new spilling framework only. It
/// rewrites vreg def/uses to use the assigned preg, but does not insert any
@@ -101,8 +102,12 @@ struct VISIBILITY_HIDDEN TrivialRewriter : public VirtRegRewriter {
};
+}
+
// ************************************************************************ //
+namespace {
+
/// AvailableSpills - As the local rewriter is scanning and rewriting an MBB
/// from top down, keep track of which spill slots or remat are available in
/// each register.
@@ -225,6 +230,8 @@ public:
std::vector<MachineOperand*> &KillOps);
};
+}
+
// ************************************************************************ //
// Given a location where a reload of a spilled register or a remat of
@@ -296,7 +303,9 @@ stop:;
return NewInsertLoc;
}
-
+
+namespace {
+
// ReusedOp - For each reused operand, we keep track of a bit of information,
// in case we need to rollback upon processing a new operand. See comments
// below.
@@ -396,6 +405,7 @@ public:
}
};
+}
// ****************** //
// Utility Functions //
@@ -962,6 +972,8 @@ namespace {
// Local Spiller Implementation //
// ***************************** //
+namespace {
+
class VISIBILITY_HIDDEN LocalRewriter : public VirtRegRewriter {
MachineRegisterInfo *RegInfo;
const TargetRegisterInfo *TRI;
@@ -2320,6 +2332,8 @@ private:
};
+}
+
llvm::VirtRegRewriter* llvm::createVirtRegRewriter() {
switch (RewriterOpt) {
default: llvm_unreachable("Unreachable!");