Skip to content

Commit c8d3ccf

Browse files
committed
[RISCV] Use llvm::reverse instead of make_range(rbegin, rend). NFC
1 parent 7e22180 commit c8d3ccf

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1719,8 +1719,7 @@ void RISCVInsertVSETVLI::coalesceVSETVLIs(MachineBasicBlock &MBB) const {
17191719
ToDelete.push_back(VLOpDef);
17201720
};
17211721

1722-
for (MachineInstr &MI :
1723-
make_early_inc_range(make_range(MBB.rbegin(), MBB.rend()))) {
1722+
for (MachineInstr &MI : make_early_inc_range(reverse(MBB))) {
17241723

17251724
if (!isVectorConfigInstr(MI)) {
17261725
Used.doUnion(getDemanded(MI, ST));

llvm/lib/Target/RISCV/RISCVVLOptimizer.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1365,7 +1365,7 @@ bool RISCVVLOptimizer::runOnMachineFunction(MachineFunction &MF) {
13651365
if (!MDT->isReachableFromEntry(&MBB))
13661366
continue;
13671367

1368-
for (auto &MI : make_range(MBB.rbegin(), MBB.rend())) {
1368+
for (auto &MI : reverse(MBB)) {
13691369
if (!isCandidate(MI))
13701370
continue;
13711371
if (!tryReduceVL(MI))

0 commit comments

Comments
 (0)