mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-22 10:33:23 +00:00
[c++11] Range'ify use list loops in InstrEmitter.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206015 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
84f004436a
commit
ae64ab542a
@ -107,9 +107,7 @@ EmitCopyFromReg(SDNode *Node, unsigned ResNo, bool IsClone, bool IsCloned,
|
||||
UseRC = TLI->getRegClassFor(VT);
|
||||
|
||||
if (!IsClone && !IsCloned)
|
||||
for (SDNode::use_iterator UI = Node->use_begin(), E = Node->use_end();
|
||||
UI != E; ++UI) {
|
||||
SDNode *User = *UI;
|
||||
for (SDNode *User : Node->uses()) {
|
||||
bool Match = true;
|
||||
if (User->getOpcode() == ISD::CopyToReg &&
|
||||
User->getOperand(2).getNode() == Node &&
|
||||
@ -242,9 +240,7 @@ void InstrEmitter::CreateVirtualRegisters(SDNode *Node,
|
||||
}
|
||||
|
||||
if (!VRBase && !IsClone && !IsCloned)
|
||||
for (SDNode::use_iterator UI = Node->use_begin(), E = Node->use_end();
|
||||
UI != E; ++UI) {
|
||||
SDNode *User = *UI;
|
||||
for (SDNode *User : Node->uses()) {
|
||||
if (User->getOpcode() == ISD::CopyToReg &&
|
||||
User->getOperand(2).getNode() == Node &&
|
||||
User->getOperand(2).getResNo() == i) {
|
||||
@ -470,9 +466,7 @@ void InstrEmitter::EmitSubregNode(SDNode *Node,
|
||||
|
||||
// If the node is only used by a CopyToReg and the dest reg is a vreg, use
|
||||
// the CopyToReg'd destination register instead of creating a new vreg.
|
||||
for (SDNode::use_iterator UI = Node->use_begin(), E = Node->use_end();
|
||||
UI != E; ++UI) {
|
||||
SDNode *User = *UI;
|
||||
for (SDNode *User : Node->uses()) {
|
||||
if (User->getOpcode() == ISD::CopyToReg &&
|
||||
User->getOperand(2).getNode() == Node) {
|
||||
unsigned DestReg = cast<RegisterSDNode>(User->getOperand(1))->getReg();
|
||||
|
Loading…
x
Reference in New Issue
Block a user