diff options
author | Dan Gohman <gohman@apple.com> | 2009-01-27 02:37:43 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-01-27 02:37:43 +0000 |
commit | e8ecf4876adf7fde02c744ca37a399b9c90eb105 (patch) | |
tree | 2d93bf7ab32e406f58e0c53e4fe625dcb7a5c4fa /lib | |
parent | 49237f04a8982e919bce667a47e0024cd0705d60 (diff) | |
download | external_llvm-e8ecf4876adf7fde02c744ca37a399b9c90eb105.zip external_llvm-e8ecf4876adf7fde02c744ca37a399b9c90eb105.tar.gz external_llvm-e8ecf4876adf7fde02c744ca37a399b9c90eb105.tar.bz2 |
Eliminate unnecessary operands-list traversals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63088 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Target/X86/X86ISelDAGToDAG.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/Target/X86/X86ISelDAGToDAG.cpp b/lib/Target/X86/X86ISelDAGToDAG.cpp index 04ba430..c5a6edd 100644 --- a/lib/Target/X86/X86ISelDAGToDAG.cpp +++ b/lib/Target/X86/X86ISelDAGToDAG.cpp @@ -242,12 +242,9 @@ namespace { static SDNode *findFlagUse(SDNode *N) { unsigned FlagResNo = N->getNumValues()-1; for (SDNode::use_iterator I = N->use_begin(), E = N->use_end(); I != E; ++I) { - SDNode *User = *I; - for (unsigned i = 0, e = User->getNumOperands(); i != e; ++i) { - SDValue Op = User->getOperand(i); - if (Op.getNode() == N && Op.getResNo() == FlagResNo) - return User; - } + SDUse &Use = I.getUse(); + if (Use.getResNo() == FlagResNo) + return Use.getUser(); } return NULL; } |