[PATCH] D127296: [AArch64] Remove ToBeRemoved from AArch64MIPeepholeOpt

Dave Green via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 8 06:27:34 PDT 2022


dmgreen created this revision.
dmgreen added reviewers: jaykang10, efriedma, mstorsjo.
Herald added subscribers: hiraditya, kristof.beyls.
Herald added a project: All.
dmgreen requested review of this revision.
Herald added a project: LLVM.

The ToBeRemoved is used to remove any MachineInstructions that are no longer needed, making sure we don't invalidate the iterator that is currently in use by erasing the instruction straight away. This makes issues for keeping the code in SSA from though, where subsequent transforms that require SSA form may have been broken by previous.

If, instead, we use make_early_inc_range the iteration issue shouldn't be present, so long as we do not remove the subsequent instruction in the peephole optimizations.


https://reviews.llvm.org/D127296

Files:
  llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
  llvm/test/CodeGen/AArch64/peephole-orr.mir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D127296.435102.patch
Type: text/x-patch
Size: 10306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220608/ac89ecaa/attachment.bin>


More information about the llvm-commits mailing list