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 | 13f24a77bab91f60c1d6de8b05719d509ff5a6b7 (patch) | |
tree | 2d93bf7ab32e406f58e0c53e4fe625dcb7a5c4fa | |
parent | a2404ae4e6d20d6a7151c268e75ffdcb733df0b0 (diff) | |
download | external_llvm-13f24a77bab91f60c1d6de8b05719d509ff5a6b7.zip external_llvm-13f24a77bab91f60c1d6de8b05719d509ff5a6b7.tar.gz external_llvm-13f24a77bab91f60c1d6de8b05719d509ff5a6b7.tar.bz2 |
Eliminate unnecessary operands-list traversals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63088 91177308-0d34-0410-b5e6-96231b3b80d8
-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; } |