diff options
author | Craig Topper <craig.topper@gmail.com> | 2014-04-27 19:21:20 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@gmail.com> | 2014-04-27 19:21:20 +0000 |
commit | a440b0f2dd47e9dffb0b43da6d0a274a32bbe6ff (patch) | |
tree | f35eefd93c35c77d4db2f2bcd0cf6a29172e4c97 | |
parent | f564ea31f005d44aafb09d8a4a155b0ef787d6c3 (diff) | |
download | llvm-a440b0f2dd47e9dffb0b43da6d0a274a32bbe6ff.tar.gz llvm-a440b0f2dd47e9dffb0b43da6d0a274a32bbe6ff.tar.bz2 llvm-a440b0f2dd47e9dffb0b43da6d0a274a32bbe6ff.tar.xz |
Convert SelectionDAGISel::MorphNode to use ArrayRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207379 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGISel.h | 2 | ||||
-rw-r--r-- | lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGISel.h b/include/llvm/CodeGen/SelectionDAGISel.h index b92b6ec424..315cddc995 100644 --- a/include/llvm/CodeGen/SelectionDAGISel.h +++ b/include/llvm/CodeGen/SelectionDAGISel.h @@ -248,7 +248,7 @@ private: private: void DoInstructionSelection(); SDNode *MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTs, - const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo); + ArrayRef<SDValue> Ops, unsigned EmitNodeInfo); void PrepareEHLandingPad(); diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp index 9ff2602dea..9ea63e2b25 100644 --- a/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp +++ b/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp @@ -2086,7 +2086,7 @@ HandleMergeInputChains(SmallVectorImpl<SDNode*> &ChainNodesMatched, /// MorphNode - Handle morphing a node in place for the selector. SDNode *SelectionDAGISel:: MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList, - const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo) { + ArrayRef<SDValue> Ops, unsigned EmitNodeInfo) { // It is possible we're using MorphNodeTo to replace a node with no // normal results with one that has a normal result (or we could be // adding a chain) and the input could have glue and chains as well. @@ -2106,8 +2106,7 @@ MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList, // Call the underlying SelectionDAG routine to do the transmogrification. Note // that this deletes operands of the old node that become dead. - SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, - ArrayRef<SDValue>(Ops, NumOps)); + SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, Ops); // MorphNodeTo can operate in two ways: if an existing node with the // specified operands exists, it can just return it. Otherwise, it @@ -2976,8 +2975,7 @@ SelectCodeCommon(SDNode *NodeToMatch, const unsigned char *MatcherTable, } } else if (NodeToMatch->getOpcode() != ISD::DELETED_NODE) { - Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops.data(), Ops.size(), - EmitNodeInfo); + Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops, EmitNodeInfo); } else { // NodeToMatch was eliminated by CSE when the target changed the DAG. // We will visit the equivalent node later. |