[llvm] 3a02052 - [RISCV] Use make_range instead of iterator_range for code from 8e6c3094
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 13 11:18:23 PST 2022
Author: Philip Reames
Date: 2022-12-13T11:17:59-08:00
New Revision: 3a020527c2af10741b12e756de45bd6f774885a4
URL: https://github.com/llvm/llvm-project/commit/3a020527c2af10741b12e756de45bd6f774885a4
DIFF: https://github.com/llvm/llvm-project/commit/3a020527c2af10741b12e756de45bd6f774885a4.diff
LOG: [RISCV] Use make_range instead of iterator_range for code from 8e6c3094
Jordan fixed this once in 4f9d069, but using make_range is more idiomatic than my accidental iterator_range usage, even with the template type to fix the warning.
Added:
Modified:
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
index e5effe47b706..891bc3afeee3 100644
--- a/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
+++ b/llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
@@ -1227,8 +1227,7 @@ void RISCVInsertVSETVLI::doLocalPostpass(MachineBasicBlock &MBB) {
Used.VL = true;
Used.demandVTYPE();
SmallVector<MachineInstr*> ToDelete;
- for (MachineInstr &MI : iterator_range<MachineBasicBlock::reverse_iterator>(
- MBB.rbegin(), MBB.rend())) {
+ for (MachineInstr &MI : make_range(MBB.rbegin(), MBB.rend())) {
if (!isVectorConfigInstr(MI)) {
doUnion(Used, getDemanded(MI));
More information about the llvm-commits
mailing list