1
0
mirror of https://github.com/c64scene-ar/llvm-6502.git synced 2025-02-19 06:31:18 +00:00

Convert SelectionDAGISel::MorphNode to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@207379 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Craig Topper 2014-04-27 19:21:20 +00:00
parent f564ea31f0
commit a440b0f2dd
2 changed files with 4 additions and 6 deletions
include/llvm/CodeGen
lib/CodeGen/SelectionDAG

@ -248,7 +248,7 @@ private:
private: private:
void DoInstructionSelection(); void DoInstructionSelection();
SDNode *MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTs, SDNode *MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTs,
const SDValue *Ops, unsigned NumOps, unsigned EmitNodeInfo); ArrayRef<SDValue> Ops, unsigned EmitNodeInfo);
void PrepareEHLandingPad(); void PrepareEHLandingPad();

@ -2086,7 +2086,7 @@ HandleMergeInputChains(SmallVectorImpl<SDNode*> &ChainNodesMatched,
/// MorphNode - Handle morphing a node in place for the selector. /// MorphNode - Handle morphing a node in place for the selector.
SDNode *SelectionDAGISel:: SDNode *SelectionDAGISel::
MorphNode(SDNode *Node, unsigned TargetOpc, SDVTList VTList, 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 // 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 // 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. // 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 // Call the underlying SelectionDAG routine to do the transmogrification. Note
// that this deletes operands of the old node that become dead. // that this deletes operands of the old node that become dead.
SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, SDNode *Res = CurDAG->MorphNodeTo(Node, ~TargetOpc, VTList, Ops);
ArrayRef<SDValue>(Ops, NumOps));
// MorphNodeTo can operate in two ways: if an existing node with the // MorphNodeTo can operate in two ways: if an existing node with the
// specified operands exists, it can just return it. Otherwise, it // 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) { } else if (NodeToMatch->getOpcode() != ISD::DELETED_NODE) {
Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops.data(), Ops.size(), Res = MorphNode(NodeToMatch, TargetOpc, VTList, Ops, EmitNodeInfo);
EmitNodeInfo);
} else { } else {
// NodeToMatch was eliminated by CSE when the target changed the DAG. // NodeToMatch was eliminated by CSE when the target changed the DAG.
// We will visit the equivalent node later. // We will visit the equivalent node later.