diff options
Diffstat (limited to 'lib/CodeGen/RegAlloc')
-rw-r--r-- | lib/CodeGen/RegAlloc/AllocInfo.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/IGNode.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/IGNode.h | 5 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/InterferenceGraph.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/InterferenceGraph.h | 5 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/LiveRange.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/LiveRangeInfo.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/LiveRangeInfo.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/PhyRegAlloc.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/PhyRegAlloc.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/RegAllocCommon.h | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/RegClass.cpp | 4 | ||||
-rw-r--r-- | lib/CodeGen/RegAlloc/RegClass.h | 5 |
13 files changed, 54 insertions, 1 deletions
diff --git a/lib/CodeGen/RegAlloc/AllocInfo.h b/lib/CodeGen/RegAlloc/AllocInfo.h index f83f2103be..67f58a7ed0 100644 --- a/lib/CodeGen/RegAlloc/AllocInfo.h +++ b/lib/CodeGen/RegAlloc/AllocInfo.h @@ -19,6 +19,8 @@ #include "llvm/DerivedTypes.h" #include "llvm/Constants.h" +namespace llvm { + /// AllocInfo - Structure representing one instruction's operand's-worth of /// register allocation state. We create tables made out of these data /// structures to generate mapping information for this register allocator. @@ -77,4 +79,6 @@ struct AllocInfo { } }; +} // End llvm namespace + #endif // ALLOCINFO_H diff --git a/lib/CodeGen/RegAlloc/IGNode.cpp b/lib/CodeGen/RegAlloc/IGNode.cpp index f883fb13c1..a76fdeaa03 100644 --- a/lib/CodeGen/RegAlloc/IGNode.cpp +++ b/lib/CodeGen/RegAlloc/IGNode.cpp @@ -16,6 +16,8 @@ #include <algorithm> #include <iostream> +namespace llvm { + //----------------------------------------------------------------------------- // Sets this IGNode on stack and reduce the degree of neighbors //----------------------------------------------------------------------------- @@ -56,3 +58,5 @@ IGNode::getCombinedDegree(const IGNode* otherNode) const { std::vector<IGNode*>::iterator new_end = unique(nbrs.begin(), nbrs.end()); return new_end - nbrs.begin(); } + +} // End llvm namespace diff --git a/lib/CodeGen/RegAlloc/IGNode.h b/lib/CodeGen/RegAlloc/IGNode.h index 82f07e0c7e..9fdc7a6ac0 100644 --- a/lib/CodeGen/RegAlloc/IGNode.h +++ b/lib/CodeGen/RegAlloc/IGNode.h @@ -32,6 +32,9 @@ #include "LiveRange.h" #include <vector> + +namespace llvm { + class RegClass; //---------------------------------------------------------------------------- @@ -115,4 +118,6 @@ public: inline LiveRange *getParentLR() const { return ParentLR; } }; +} // End llvm namespace + #endif diff --git a/lib/CodeGen/RegAlloc/InterferenceGraph.cpp b/lib/CodeGen/RegAlloc/InterferenceGraph.cpp index 392a96c11c..3cef19ea0e 100644 --- a/lib/CodeGen/RegAlloc/InterferenceGraph.cpp +++ b/lib/CodeGen/RegAlloc/InterferenceGraph.cpp @@ -17,6 +17,8 @@ #include "Support/STLExtras.h" #include <algorithm> +namespace llvm { + // for asserting this IG node is infact in the IGNodeList of this class inline static void assertIGNode(const InterferenceGraph *IG, const IGNode *Node) { @@ -246,3 +248,5 @@ void InterferenceGraph::printIGNodeList() const { } } } + +} // End llvm namespace diff --git a/lib/CodeGen/RegAlloc/InterferenceGraph.h b/lib/CodeGen/RegAlloc/InterferenceGraph.h index 6b8cf3cd05..79850c1fcf 100644 --- a/lib/CodeGen/RegAlloc/InterferenceGraph.h +++ b/lib/CodeGen/RegAlloc/InterferenceGraph.h @@ -30,6 +30,9 @@ #define INTERFERENCEGRAPH_H #include <vector> + +namespace llvm { + class LiveRange; class RegClass; class IGNode; @@ -67,4 +70,6 @@ class InterferenceGraph { void printIGNodeList() const; }; +} // End llvm namespace + #endif diff --git a/lib/CodeGen/RegAlloc/LiveRange.h b/lib/CodeGen/RegAlloc/LiveRange.h index aa409c63fb..d6e2cf6307 100644 --- a/lib/CodeGen/RegAlloc/LiveRange.h +++ b/lib/CodeGen/RegAlloc/LiveRange.h @@ -21,6 +21,8 @@ #include "llvm/Value.h" #include "llvm/CodeGen/ValueSet.h" +namespace llvm { + class RegClass; class IGNode; @@ -177,4 +179,6 @@ public: } }; +} // End llvm namespace + #endif diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp index b9fcda789f..9fd04d2b0e 100644 --- a/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp +++ b/lib/CodeGen/RegAlloc/LiveRangeInfo.cpp @@ -23,6 +23,8 @@ #include "llvm/Target/TargetRegInfo.h" #include "Support/SetOperations.h" +namespace llvm { + unsigned LiveRange::getRegClassID() const { return getRegClass()->getID(); } LiveRangeInfo::LiveRangeInfo(const Function *F, const TargetMachine &tm, @@ -411,3 +413,5 @@ void LiveRangeInfo::printLiveRanges() { } } } + +} // End llvm namespace diff --git a/lib/CodeGen/RegAlloc/LiveRangeInfo.h b/lib/CodeGen/RegAlloc/LiveRangeInfo.h index 5c5244bd62..a8d0e7152f 100644 --- a/lib/CodeGen/RegAlloc/LiveRangeInfo.h +++ b/lib/CodeGen/RegAlloc/LiveRangeInfo.h @@ -29,6 +29,8 @@ #include "llvm/CodeGen/ValueSet.h" #include "Support/hash_map" +namespace llvm { + class LiveRange; class MachineInstr; class RegClass; @@ -121,4 +123,6 @@ public: void printLiveRanges(); }; +} // End llvm namespace + #endif diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp index 99917cdf0b..332ae9524c 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.cpp @@ -47,6 +47,8 @@ #include "Support/STLExtras.h" #include <cmath> +namespace llvm { + RegAllocDebugLevel_t DEBUG_RA; /// The reoptimizer wants to be able to grovel through the register @@ -1392,3 +1394,5 @@ bool PhyRegAlloc::runOnFunction (Function &F) { if (DEBUG_RA) std::cerr << "\nRegister allocation complete!\n"; return false; // Function was not modified } + +} // End llvm namespace diff --git a/lib/CodeGen/RegAlloc/PhyRegAlloc.h b/lib/CodeGen/RegAlloc/PhyRegAlloc.h index c524f9f56c..4ec083c8ea 100644 --- a/lib/CodeGen/RegAlloc/PhyRegAlloc.h +++ b/lib/CodeGen/RegAlloc/PhyRegAlloc.h @@ -31,6 +31,8 @@ #include "llvm/Target/TargetRegInfo.h" #include <map> +namespace llvm { + class MachineFunction; class FunctionLiveVarInfo; class MachineInstr; @@ -179,4 +181,6 @@ private: void addInterf4PseudoInstr(const MachineInstr *MI); }; +} // End llvm namespace + #endif diff --git a/lib/CodeGen/RegAlloc/RegAllocCommon.h b/lib/CodeGen/RegAlloc/RegAllocCommon.h index 97d102a253..7dd86b205a 100644 --- a/lib/CodeGen/RegAlloc/RegAllocCommon.h +++ b/lib/CodeGen/RegAlloc/RegAllocCommon.h @@ -14,6 +14,8 @@ #ifndef REGALLOCCOMMON_H #define REGALLOCCOMMON_H +namespace llvm { + enum RegAllocDebugLevel_t { RA_DEBUG_None = 0, RA_DEBUG_Results = 1, @@ -25,4 +27,6 @@ enum RegAllocDebugLevel_t { extern RegAllocDebugLevel_t DEBUG_RA; +} // End llvm namespace + #endif diff --git a/lib/CodeGen/RegAlloc/RegClass.cpp b/lib/CodeGen/RegAlloc/RegClass.cpp index 9c8603b82c..9af87ba0e8 100644 --- a/lib/CodeGen/RegAlloc/RegClass.cpp +++ b/lib/CodeGen/RegAlloc/RegClass.cpp @@ -16,6 +16,8 @@ #include "RegClass.h" #include "llvm/Target/TargetRegInfo.h" +namespace llvm { + //---------------------------------------------------------------------------- // This constructor inits IG. The actual matrix is created by a call to // createInterferenceGraph() above. @@ -245,4 +247,4 @@ void RegClass::printIG() { IG.printIG(); } - +} // End llvm namespace diff --git a/lib/CodeGen/RegAlloc/RegClass.h b/lib/CodeGen/RegAlloc/RegClass.h index c861fbae21..0071f7c212 100644 --- a/lib/CodeGen/RegAlloc/RegClass.h +++ b/lib/CodeGen/RegAlloc/RegClass.h @@ -20,6 +20,9 @@ #include "llvm/Target/TargetRegInfo.h" #include "InterferenceGraph.h" #include <stack> + +namespace llvm { + class TargetRegClassInfo; @@ -139,4 +142,6 @@ class RegClass { void printIG(); }; +} // End llvm namespace + #endif |