diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-07 01:32:21 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-07 01:32:21 +0000 |
commit | a6d0afcb7469de165d9c9d87d8f380cd5137dee1 (patch) | |
tree | 3c7d094e7e12716d977269cf6888db5ebfe7c690 /llvm/lib/CodeGen/VirtRegRewriter.cpp | |
parent | 6c0c21954cd26cf874553edc055ce39a87663d8c (diff) | |
download | bcm5719-llvm-a6d0afcb7469de165d9c9d87d8f380cd5137dee1.tar.gz bcm5719-llvm-a6d0afcb7469de165d9c9d87d8f380cd5137dee1.zip |
Fix a bunch of namespace pollution.
llvm-svn: 78363
Diffstat (limited to 'llvm/lib/CodeGen/VirtRegRewriter.cpp')
-rw-r--r-- | llvm/lib/CodeGen/VirtRegRewriter.cpp | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/VirtRegRewriter.cpp b/llvm/lib/CodeGen/VirtRegRewriter.cpp index 460b508a804..b34d43a1f5d 100644 --- a/llvm/lib/CodeGen/VirtRegRewriter.cpp +++ b/llvm/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!"); |