[llvm-commits] CVS: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Chris Lattner lattner at cs.uiuc.edu
Wed Aug 24 22:03:17 PDT 2005



Changes in directory llvm/lib/CodeGen/SelectionDAG:

SelectionDAG.cpp updated: 1.163 -> 1.164
---
Log message:

ADd support for TargetConstantPool nodes


---
Diffs of the changes:  (+14 -1)

 SelectionDAG.cpp |   15 ++++++++++++++-
 1 files changed, 14 insertions(+), 1 deletion(-)


Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
diff -u llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.163 llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.164
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp:1.163	Wed Aug 24 19:43:01 2005
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp	Thu Aug 25 00:03:06 2005
@@ -267,6 +267,9 @@
   case ISD::ConstantPool:
     ConstantPoolIndices.erase(cast<ConstantPoolSDNode>(N)->getIndex());
     break;
+  case ISD::TargetConstantPool:
+    TargetConstantPoolIndices.erase(cast<ConstantPoolSDNode>(N)->getIndex());
+    break;
   case ISD::BasicBlock:
     BBNodes.erase(cast<BasicBlockSDNode>(N)->getBasicBlock());
     break;
@@ -452,7 +455,16 @@
 SDOperand SelectionDAG::getConstantPool(unsigned CPIdx, MVT::ValueType VT) {
   SDNode *N = ConstantPoolIndices[CPIdx];
   if (N) return SDOperand(N, 0);
-  N = new ConstantPoolSDNode(CPIdx, VT);
+  N = new ConstantPoolSDNode(CPIdx, VT, false);
+  AllNodes.push_back(N);
+  return SDOperand(N, 0);
+}
+
+SDOperand SelectionDAG::getTargetConstantPool(unsigned CPIdx,
+                                              MVT::ValueType VT) {
+  SDNode *N = TargetConstantPoolIndices[CPIdx];
+  if (N) return SDOperand(N, 0);
+  N = new ConstantPoolSDNode(CPIdx, VT, true);
   AllNodes.push_back(N);
   return SDOperand(N, 0);
 }
@@ -2087,6 +2099,7 @@
   case ISD::Register:      return "Register";
   case ISD::ExternalSymbol: return "ExternalSymbol";
   case ISD::ConstantPool:  return "ConstantPoolIndex";
+  case ISD::TargetConstantPool:  return "TargetConstantPoolIndex";
   case ISD::CopyToReg:     return "CopyToReg";
   case ISD::CopyFromReg:   return "CopyFromReg";
   case ISD::ImplicitDef:   return "ImplicitDef";






More information about the llvm-commits mailing list