aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Target/SparcV9/RegAlloc
diff options
context:
space:
mode:
authorBrian Gaeke <gaeke@uiuc.edu>2003-11-11 22:41:34 +0000
committerBrian Gaeke <gaeke@uiuc.edu>2003-11-11 22:41:34 +0000
commitd0fde30ce850b78371fd1386338350591f9ff494 (patch)
tree83bb73e83f54fc8e1e474d116250ae2779562f7e /lib/Target/SparcV9/RegAlloc
parent0d723acf15b0326e2df09ecb614b02a617f536e4 (diff)
downloadexternal_llvm-d0fde30ce850b78371fd1386338350591f9ff494.zip
external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.gz
external_llvm-d0fde30ce850b78371fd1386338350591f9ff494.tar.bz2
Put all LLVM code into the llvm namespace, as per bug 109.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9903 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/SparcV9/RegAlloc')
-rw-r--r--lib/Target/SparcV9/RegAlloc/AllocInfo.h4
-rw-r--r--lib/Target/SparcV9/RegAlloc/IGNode.cpp4
-rw-r--r--lib/Target/SparcV9/RegAlloc/IGNode.h5
-rw-r--r--lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp4
-rw-r--r--lib/Target/SparcV9/RegAlloc/InterferenceGraph.h5
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRange.h4
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp4
-rw-r--r--lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h4
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp4
-rw-r--r--lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h4
-rw-r--r--lib/Target/SparcV9/RegAlloc/RegAllocCommon.h4
-rw-r--r--lib/Target/SparcV9/RegAlloc/RegClass.cpp4
-rw-r--r--lib/Target/SparcV9/RegAlloc/RegClass.h5
13 files changed, 54 insertions, 1 deletions
diff --git a/lib/Target/SparcV9/RegAlloc/AllocInfo.h b/lib/Target/SparcV9/RegAlloc/AllocInfo.h
index f83f210..67f58a7 100644
--- a/lib/Target/SparcV9/RegAlloc/AllocInfo.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/IGNode.cpp b/lib/Target/SparcV9/RegAlloc/IGNode.cpp
index f883fb1..a76fdea 100644
--- a/lib/Target/SparcV9/RegAlloc/IGNode.cpp
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/IGNode.h b/lib/Target/SparcV9/RegAlloc/IGNode.h
index 82f07e0..9fdc7a6 100644
--- a/lib/Target/SparcV9/RegAlloc/IGNode.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/InterferenceGraph.cpp b/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
index 392a96c..3cef19e 100644
--- a/lib/Target/SparcV9/RegAlloc/InterferenceGraph.cpp
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/InterferenceGraph.h b/lib/Target/SparcV9/RegAlloc/InterferenceGraph.h
index 6b8cf3c..79850c1 100644
--- a/lib/Target/SparcV9/RegAlloc/InterferenceGraph.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/LiveRange.h b/lib/Target/SparcV9/RegAlloc/LiveRange.h
index aa409c6..d6e2cf6 100644
--- a/lib/Target/SparcV9/RegAlloc/LiveRange.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp
index b9fcda7..9fd04d2 100644
--- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.cpp
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/LiveRangeInfo.h b/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h
index 5c5244b..a8d0e71 100644
--- a/lib/Target/SparcV9/RegAlloc/LiveRangeInfo.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
index 99917cd..332ae95 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.cpp
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/PhyRegAlloc.h b/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
index c524f9f..4ec083c 100644
--- a/lib/Target/SparcV9/RegAlloc/PhyRegAlloc.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/RegAllocCommon.h b/lib/Target/SparcV9/RegAlloc/RegAllocCommon.h
index 97d102a..7dd86b2 100644
--- a/lib/Target/SparcV9/RegAlloc/RegAllocCommon.h
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/RegClass.cpp b/lib/Target/SparcV9/RegAlloc/RegClass.cpp
index 9c8603b..9af87ba 100644
--- a/lib/Target/SparcV9/RegAlloc/RegClass.cpp
+++ b/lib/Target/SparcV9/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/Target/SparcV9/RegAlloc/RegClass.h b/lib/Target/SparcV9/RegAlloc/RegClass.h
index c861fba..0071f7c 100644
--- a/lib/Target/SparcV9/RegAlloc/RegClass.h
+++ b/lib/Target/SparcV9/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