forked from OSchip/llvm-project
[AMDGPU] Fixes -Wrange-loop-analysis warnings
This avoids new warnings due to D68912 adds -Wrange-loop-analysis to -Wall. Differential Revision: https://reviews.llvm.org/D71815
This commit is contained in:
parent
9c11026c1b
commit
2d903cc965
|
@ -862,7 +862,7 @@ void LinearizedRegion::storeLiveOuts(RegionMRT *Region,
|
|||
void LinearizedRegion::print(raw_ostream &OS, const TargetRegisterInfo *TRI) {
|
||||
OS << "Linearized Region {";
|
||||
bool IsFirst = true;
|
||||
for (const auto &MBB : MBBs) {
|
||||
for (auto MBB : MBBs) {
|
||||
if (IsFirst) {
|
||||
IsFirst = false;
|
||||
} else {
|
||||
|
@ -996,7 +996,7 @@ MachineBasicBlock *LinearizedRegion::getExit() { return Exit; }
|
|||
void LinearizedRegion::addMBB(MachineBasicBlock *MBB) { MBBs.insert(MBB); }
|
||||
|
||||
void LinearizedRegion::addMBBs(LinearizedRegion *InnerRegion) {
|
||||
for (const auto &MBB : InnerRegion->MBBs) {
|
||||
for (auto MBB : InnerRegion->MBBs) {
|
||||
addMBB(MBB);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ namespace {
|
|||
return false;
|
||||
MDNode *MaxMD = nullptr;
|
||||
auto MaxVer = 0U;
|
||||
for (const auto &VersionMD : NamedMD->operands()) {
|
||||
for (auto VersionMD : NamedMD->operands()) {
|
||||
assert(VersionMD->getNumOperands() == 2);
|
||||
auto CMajor = mdconst::extract<ConstantInt>(VersionMD->getOperand(0));
|
||||
auto VersionMajor = CMajor->getZExtValue();
|
||||
|
@ -94,7 +94,7 @@ namespace {
|
|||
return false;
|
||||
|
||||
SmallVector<Metadata *, 4> All;
|
||||
for (const auto &MD : NamedMD->operands())
|
||||
for (auto MD : NamedMD->operands())
|
||||
for (const auto &Op : MD->operands())
|
||||
if (std::find(All.begin(), All.end(), Op.get()) == All.end())
|
||||
All.push_back(Op.get());
|
||||
|
|
Loading…
Reference in New Issue