aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/Target/SparcV9/SparcV9RegClassInfo.cpp14
-rw-r--r--lib/Target/SparcV9/SparcV9RegClassInfo.h11
-rw-r--r--lib/Target/SparcV9/SparcV9RegInfo.cpp1
3 files changed, 16 insertions, 10 deletions
diff --git a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
index c27c28b33f..6050cf069d 100644
--- a/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegClassInfo.cpp
@@ -8,6 +8,7 @@
#include "SparcInternals.h"
#include "llvm/Type.h"
#include "../../CodeGen/RegAlloc/RegAllocCommon.h" // FIXME!
+#include "llvm/CodeGen/IGNode.h"
//-----------------------------------------------------------------------------
// Int Register Class - method for coloring a node in the interference graph.
@@ -162,6 +163,19 @@ void SparcIntCCRegClass::colorIGNode(IGNode *Node,
}
+void SparcFloatCCRegClass::colorIGNode(IGNode *Node,
+ const std::vector<bool> &IsColorUsedArr) const {
+ for(unsigned c = 0; c != 4; ++c)
+ if (!IsColorUsedArr[c]) { // find unused color
+ Node->setColor(c);
+ return;
+ }
+
+ Node->getParentLR()->markForSpill();
+}
+
+
+
//-----------------------------------------------------------------------------
// Float Register Class - method for coloring a node in the interference graph.
//
diff --git a/lib/Target/SparcV9/SparcV9RegClassInfo.h b/lib/Target/SparcV9/SparcV9RegClassInfo.h
index af61791b28..30ec42d764 100644
--- a/lib/Target/SparcV9/SparcV9RegClassInfo.h
+++ b/lib/Target/SparcV9/SparcV9RegClassInfo.h
@@ -8,7 +8,6 @@
#define SPARC_REG_CLASS_INFO_H
#include "llvm/Target/TargetRegInfo.h"
-#include "llvm/CodeGen/IGNode.h"
//-----------------------------------------------------------------------------
// Integer Register Class
@@ -175,15 +174,7 @@ struct SparcFloatCCRegClass : public TargetRegClassInfo {
: TargetRegClassInfo(ID, 4, 5) { }
void colorIGNode(IGNode *Node,
- const std::vector<bool> &IsColorUsedArr) const {
- for(unsigned c = 0; c != 4; ++c)
- if (!IsColorUsedArr[c]) { // find unused color
- Node->setColor(c);
- return;
- }
-
- Node->getParentLR()->markForSpill();
- }
+ const std::vector<bool> &IsColorUsedArr) const;
// according to Sparc 64 ABI, all %fp CC regs are volatile
//
diff --git a/lib/Target/SparcV9/SparcV9RegInfo.cpp b/lib/Target/SparcV9/SparcV9RegInfo.cpp
index 6edf1f4c0e..cd8e1e2860 100644
--- a/lib/Target/SparcV9/SparcV9RegInfo.cpp
+++ b/lib/Target/SparcV9/SparcV9RegInfo.cpp
@@ -14,6 +14,7 @@
#include "llvm/CodeGen/MachineCodeForInstruction.h"
#include "llvm/CodeGen/MachineInstrAnnot.h"
#include "llvm/CodeGen/LiveRangeInfo.h"
+#include "llvm/CodeGen/IGNode.h"
#include "llvm/iTerminators.h"
#include "llvm/iOther.h"
#include "llvm/Function.h"