mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-25 04:02:41 +01:00
ExecutionDomainFix.cpp - use const refs in for-range loops. NFCI.
Avoid unnecessary copies. Reported by clang-tidy.
This commit is contained in:
parent
bd3db94c3e
commit
b96bc31852
@ -380,7 +380,7 @@ void ExecutionDomainFix::visitSoftInstr(MachineInstr *mi, unsigned mask) {
|
||||
|
||||
// Finally set all defs and non-collapsed uses to dv. We must iterate through
|
||||
// all the operators, including imp-def ones.
|
||||
for (MachineOperand &mo : mi->operands()) {
|
||||
for (const MachineOperand &mo : mi->operands()) {
|
||||
if (!mo.isReg())
|
||||
continue;
|
||||
for (int rx : regIndices(mo.getReg())) {
|
||||
@ -454,16 +454,14 @@ bool ExecutionDomainFix::runOnMachineFunction(MachineFunction &mf) {
|
||||
// Traverse the basic blocks.
|
||||
LoopTraversal Traversal;
|
||||
LoopTraversal::TraversalOrder TraversedMBBOrder = Traversal.traverse(mf);
|
||||
for (LoopTraversal::TraversedMBBInfo TraversedMBB : TraversedMBBOrder) {
|
||||
for (const LoopTraversal::TraversedMBBInfo &TraversedMBB : TraversedMBBOrder)
|
||||
processBasicBlock(TraversedMBB);
|
||||
}
|
||||
|
||||
for (LiveRegsDVInfo OutLiveRegs : MBBOutRegsInfos) {
|
||||
for (DomainValue *OutLiveReg : OutLiveRegs) {
|
||||
for (const LiveRegsDVInfo &OutLiveRegs : MBBOutRegsInfos)
|
||||
for (DomainValue *OutLiveReg : OutLiveRegs)
|
||||
if (OutLiveReg)
|
||||
release(OutLiveReg);
|
||||
}
|
||||
}
|
||||
|
||||
MBBOutRegsInfos.clear();
|
||||
Avail.clear();
|
||||
Allocator.DestroyAll();
|
||||
|
Loading…
Reference in New Issue
Block a user