[llvm] ca134e4 - [NFC] fix diagnostic
JF Bastien via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 30 21:49:12 PDT 2020
Author: JF Bastien
Date: 2020-06-30T21:49:01-07:00
New Revision: ca134e4c525babf0c414c78fb53d648fbee364d8
URL: https://github.com/llvm/llvm-project/commit/ca134e4c525babf0c414c78fb53d648fbee364d8
DIFF: https://github.com/llvm/llvm-project/commit/ca134e4c525babf0c414c78fb53d648fbee364d8.diff
LOG: [NFC] fix diagnostic
It's pretty silly to diagnose on a scalar copy but the build does that:
loop variable 'SibReg' of type 'const llvm::Register' creates a copy from type 'const llvm::Register' [-Wrange-loop-analysis]
Added:
Modified:
llvm/lib/CodeGen/InlineSpiller.cpp
Removed:
################################################################################
diff --git a/llvm/lib/CodeGen/InlineSpiller.cpp b/llvm/lib/CodeGen/InlineSpiller.cpp
index a150f89f22da..7e4a89c8ec47 100644
--- a/llvm/lib/CodeGen/InlineSpiller.cpp
+++ b/llvm/lib/CodeGen/InlineSpiller.cpp
@@ -1197,7 +1197,7 @@ bool HoistSpillHelper::isSpillCandBB(LiveInterval &OrigLI, VNInfo &OrigVNI,
SmallSetVector<Register, 16> &Siblings = Virt2SiblingsMap[OrigReg];
assert(OrigLI.getVNInfoAt(Idx) == &OrigVNI && "Unexpected VNI");
- for (auto const SibReg : Siblings) {
+ for (const Register &SibReg : Siblings) {
LiveInterval &LI = LIS.getInterval(SibReg);
VNInfo *VNI = LI.getVNInfoAt(Idx);
if (VNI) {
More information about the llvm-commits
mailing list