mirror of
https://github.com/RPCSX/llvm.git
synced 2025-01-19 02:42:58 +00:00
Eliminate unnecessary operands-list traversals.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@63088 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
49237f04a8
commit
e8ecf4876a
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user