diff options
author | Nate Begeman <natebegeman@mac.com> | 2009-04-29 05:20:52 +0000 |
---|---|---|
committer | Nate Begeman <natebegeman@mac.com> | 2009-04-29 05:20:52 +0000 |
commit | 5a5ca1519e04310f585197c20e7ae584b7f2d11f (patch) | |
tree | 6483f04d2e9e63d4a4f2ade6113f882a78359039 /include/llvm/CodeGen/SelectionDAGNodes.h | |
parent | a3518a1d6a6a9a7519d3a8d434cde51617c1dc22 (diff) |
Implement review feedback for vector shuffle work.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@70372 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/CodeGen/SelectionDAGNodes.h')
-rw-r--r-- | include/llvm/CodeGen/SelectionDAGNodes.h | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/include/llvm/CodeGen/SelectionDAGNodes.h b/include/llvm/CodeGen/SelectionDAGNodes.h index 34d877a027..dc7112c63a 100644 --- a/include/llvm/CodeGen/SelectionDAGNodes.h +++ b/include/llvm/CodeGen/SelectionDAGNodes.h @@ -1704,12 +1704,24 @@ public: } }; +/// ShuffleVectorSDNode - This SDNode is used to implement the code generator +/// support for the llvm IR shufflevector instruction. It combines elements +/// from two input vectors into a new input vector, with the selection and +/// ordering of elements determined by an array of integers, referred to as +/// the shuffle mask. For input vectors of width N, mask indices of 0..N-1 +/// refer to elements from the LHS input, and indices from N to 2N-1 the RHS. +/// An index of -1 is treated as undef, such that the code generator may put +/// any value in the corresponding element of the result. class ShuffleVectorSDNode : public SDNode { SDUse Ops[2]; - int *Mask; + + // The memory for Mask is owned by the SelectionDAG's OperandAllocator, and + // is freed when the SelectionDAG object is destroyed. + const int *Mask; protected: friend class SelectionDAG; - ShuffleVectorSDNode(MVT VT, DebugLoc dl, SDValue N1, SDValue N2, int *M) + ShuffleVectorSDNode(MVT VT, DebugLoc dl, SDValue N1, SDValue N2, + const int *M) : SDNode(ISD::VECTOR_SHUFFLE, dl, getSDVTList(VT)), Mask(M) { InitOperands(Ops, N1, N2); } |