mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-07-30 02:25:19 +00:00
Add ops() method to SDNode that returns an ArrayRef<SDUse>. Use it to simplify some code.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211993 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -7337,10 +7337,9 @@ static bool findConsecutiveLoad(LoadSDNode *LD, SelectionDAG &DAG) {
|
||||
if (!Visited.count(ChainLD->getChain().getNode()))
|
||||
Queue.push_back(ChainLD->getChain().getNode());
|
||||
} else if (ChainNext->getOpcode() == ISD::TokenFactor) {
|
||||
for (SDNode::op_iterator O = ChainNext->op_begin(),
|
||||
OE = ChainNext->op_end(); O != OE; ++O)
|
||||
if (!Visited.count(O->getNode()))
|
||||
Queue.push_back(O->getNode());
|
||||
for (const SDUse &O : ChainNext->ops())
|
||||
if (!Visited.count(O.getNode()))
|
||||
Queue.push_back(O.getNode());
|
||||
} else
|
||||
LoadRoots.insert(ChainNext);
|
||||
}
|
||||
@@ -8236,12 +8235,11 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
|
||||
++UI;
|
||||
|
||||
SmallVector<SDValue, 8> Ops;
|
||||
for (SDNode::op_iterator O = User->op_begin(),
|
||||
OE = User->op_end(); O != OE; ++O) {
|
||||
if (*O == Use)
|
||||
for (const SDUse &O : User->ops()) {
|
||||
if (O == Use)
|
||||
Ops.push_back(To);
|
||||
else
|
||||
Ops.push_back(*O);
|
||||
Ops.push_back(O);
|
||||
}
|
||||
|
||||
DAG.UpdateNodeOperands(User, Ops);
|
||||
|
Reference in New Issue
Block a user