[all-commits] [llvm/llvm-project] a1aef4: [AArch64] Remove ToBeRemoved from AArch64MIPeephol...

David Green via All-commits all-commits at lists.llvm.org
Wed Jun 8 09:26:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a1aef4f3747063a1a111cc84338c06dba42d2edf
      https://github.com/llvm/llvm-project/commit/a1aef4f3747063a1a111cc84338c06dba42d2edf
  Author: David Green <david.green at arm.com>
  Date:   2022-06-08 (Wed, 08 Jun 2022)

  Changed paths:
    M llvm/lib/Target/AArch64/AArch64MIPeepholeOpt.cpp
    A llvm/test/CodeGen/AArch64/peephole-orr.mir

  Log Message:
  -----------
  [AArch64] Remove ToBeRemoved from AArch64MIPeepholeOpt

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
peepholes.

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. That way the code between transforms is kept
in SSA form, meaning hopefully less things that can go wrong.

Differential Revision: https://reviews.llvm.org/D127296




More information about the All-commits mailing list