summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-06-26 18:17:36 +0000
committerPete Cooper <peter_cooper@apple.com>2015-06-26 18:17:36 +0000
commit3af9a25b65ae8684fbc2b73ead7c7f15e5e67e22 (patch)
treec5aaa124f98c62fc66db4a0740745bcb8edd6074 /llvm/lib
parentb447ac643576a3a207fc751ae825804fadb22d72 (diff)
downloadbcm5719-llvm-3af9a25b65ae8684fbc2b73ead7c7f15e5e67e22.tar.gz
bcm5719-llvm-3af9a25b65ae8684fbc2b73ead7c7f15e5e67e22.zip
Add op_values() to iterate over the SDValue operands of an SDNode.
SDNode already had ops() which would iterate over the operands and return SDUse*. This version instead gets the SDValue's out of the SDUse's so that we can use foreach in more places. Reviewed by David Blaikie. llvm-svn: 240805
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64ISelLowering.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
index 2dc1ac20413..f3242cdd971 100644
--- a/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
+++ b/llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
@@ -1777,8 +1777,7 @@ static bool isExtendedBUILD_VECTOR(SDNode *N, SelectionDAG &DAG,
if (N->getOpcode() != ISD::BUILD_VECTOR)
return false;
- for (unsigned i = 0, e = N->getNumOperands(); i != e; ++i) {
- SDNode *Elt = N->getOperand(i).getNode();
+ for (const SDValue &Elt : N->op_values()) {
if (ConstantSDNode *C = dyn_cast<ConstantSDNode>(Elt)) {
unsigned EltSize = VT.getVectorElementType().getSizeInBits();
unsigned HalfSize = EltSize / 2;
OpenPOWER on IntegriCloud