mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 11:42:57 +01:00
[c++11] Range'ify use list loops in InstrEmitter.
llvm-svn: 206015
This commit is contained in:
parent
6f9873ee9f
commit
0d0ea8cdb5
@ -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…
Reference in New Issue
Block a user