mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-12-20 02:28:23 +00:00
Eliminate unnecessary operands-list traversals.
llvm-svn: 63088
This commit is contained in:
parent
c39a03f3fa
commit
2e0343e321
@ -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…
Reference in New Issue
Block a user