Skip to content

Commit

Permalink
[AMDGPU] Drop const for value that is copied (NFC).
Browse files Browse the repository at this point in the history
This fixes

    warning: loop variable 'Def' of type 'const llvm::Register' creates a copy from type 'const llvm::Register' [-Wrange-loop-analysis]

llvm::Register just contains a single unsigned and should be copied.

Reviewers: rampitec

Reviewed By: rampitec

Differential Revision: https://reviews.llvm.org/D77011
  • Loading branch information
fhahn committed Mar 30, 2020
1 parent 84c1fba commit c3b03f3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llvm/lib/Target/AMDGPU/SIPostRABundler.cpp
Expand Up @@ -76,7 +76,7 @@ bool SIPostRABundler::isDependentLoad(const MachineInstr &MI) const {
if (!Op.isReg())
continue;
Register Reg = Op.getReg();
for (const Register Def : Defs)
for (Register Def : Defs)
if (TRI->regsOverlap(Reg, Def))
return true;
}
Expand Down

0 comments on commit c3b03f3

Please sign in to comment.