Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion llvm/lib/CodeGen/GlobalISel/LoadStoreOpt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@ bool LoadStoreOpt::mergeFunctionStores(MachineFunction &MF) {
// Erase all dead instructions left over by the merging.
if (Changed) {
for (auto &BB : MF) {
for (auto &I : make_early_inc_range(make_range(BB.rbegin(), BB.rend()))) {
for (auto &I : make_early_inc_range(reverse(BB))) {
if (isTriviallyDead(I, *MRI))
I.eraseFromParent();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ unsigned getNonFlagSettingVariant(unsigned Opc) {

bool AArch64PostSelectOptimize::doPeepholeOpts(MachineBasicBlock &MBB) {
bool Changed = false;
for (auto &MI : make_early_inc_range(make_range(MBB.begin(), MBB.end()))) {
for (auto &MI : make_early_inc_range(MBB)) {
bool CurrentIterChanged = foldSimpleCrossClassCopies(MI);
if (!CurrentIterChanged)
CurrentIterChanged |= foldCopyDup(MI);
Expand Down
3 changes: 1 addition & 2 deletions llvm/lib/Transforms/Scalar/RewriteStatepointsForGC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1377,8 +1377,7 @@ static Instruction *rematerializeChain(ArrayRef<Instruction *> ChainToBase,
Instruction *LastClonedValue = nullptr;
Instruction *LastValue = nullptr;
// Walk backwards to visit top-most instructions first.
for (Instruction *Instr :
make_range(ChainToBase.rbegin(), ChainToBase.rend())) {
for (Instruction *Instr : reverse(ChainToBase)) {
// Only GEP's and casts are supported as we need to be careful to not
// introduce any new uses of pointers not in the liveset.
// Note that it's fine to introduce new uses of pointers which were
Expand Down
2 changes: 1 addition & 1 deletion llvm/lib/Transforms/Utils/SimplifyCFG.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3391,7 +3391,7 @@ bool SimplifyCFGOpt::speculativelyExecuteBB(BranchInst *BI,
// In "RemoveDIs" non-instr debug-info mode, drop DbgVariableRecords attached
// to these instructions, in the same way that dbg.value intrinsics are
// dropped at the end of this block.
for (auto &It : make_range(ThenBB->begin(), ThenBB->end()))
for (auto &It : *ThenBB)
for (DbgRecord &DR : make_early_inc_range(It.getDbgRecordRange()))
// Drop all records except assign-kind DbgVariableRecords (dbg.assign
// equivalent).
Expand Down