diff options
Diffstat (limited to 'lib/CodeGen/SelectionDAG/SelectionDAG.cpp')
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAG.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp index 7676ead355..1eb95864c0 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAG.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAG.cpp @@ -274,6 +274,9 @@ void SelectionDAG::RemoveNodeFromCSEMaps(SDNode *N) { Erased = ConstantFPs.erase(std::make_pair(V, N->getValueType(0))); break; } + case ISD::STRING: + Erased = StringNodes.erase(cast<StringSDNode>(N)->getValue()); + break; case ISD::CONDCODE: assert(CondCodeNodes[cast<CondCodeSDNode>(N)->get()] && "Cond code doesn't exist!"); @@ -448,6 +451,15 @@ SDOperand SelectionDAG::getConstant(uint64_t Val, MVT::ValueType VT) { return SDOperand(N, 0); } +SDOperand SelectionDAG::getString(const std::string &Val) { + StringSDNode *&N = StringNodes[Val]; + if (!N) { + N = new StringSDNode(Val); + AllNodes.push_back(N); + } + return SDOperand(N, 0); +} + SDOperand SelectionDAG::getTargetConstant(uint64_t Val, MVT::ValueType VT) { assert(MVT::isInteger(VT) && "Cannot create FP integer constant!"); // Mask out any bits that are not valid for this constant. @@ -1670,6 +1682,7 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const { case ISD::READCYCLECOUNTER: return "ReadCycleCounter"; case ISD::SRCVALUE: return "SrcValue"; case ISD::VALUETYPE: return "ValueType"; + case ISD::STRING: return "String"; case ISD::EntryToken: return "EntryToken"; case ISD::TokenFactor: return "TokenFactor"; case ISD::AssertSext: return "AssertSext"; @@ -1787,6 +1800,9 @@ const char *SDNode::getOperationName(const SelectionDAG *G) const { case ISD::READIO: return "readio"; case ISD::WRITEIO: return "writeio"; + // Debug info + case ISD::LOCATION: return "location"; + case ISD::CONDCODE: switch (cast<CondCodeSDNode>(this)->get()) { default: assert(0 && "Unknown setcc condition!"); |