[all-commits] [llvm/llvm-project] ad8db9: [RISCV] Eagerly delete instructions in MergeBaseOf...
Craig Topper via All-commits
all-commits at lists.llvm.org
Mon Aug 1 09:33:53 PDT 2022
Author: Craig Topper <craig.topper at sifive.com>
Date: 2022-08-01 (Mon, 01 Aug 2022)
[RISCV] Eagerly delete instructions in MergeBaseOffset.
The only iterator we're holding points to HiLUI and we never
delete that so I think it is safe to delete everything else
I want to split detectAndFoldOffset into two phases. First, combine
LUI+ADDI with any ADD/ADDI/SHXADD that comes after it. This may
open opportunities to fold the ADDI from the LUI+ADDI into a
load/store address. So the load/store folding should run as a
second phase even if the ADD/ADDI/SHXADD made changes.
In order to do this we need to eagerly delete instructions in the
first phase so that we don't have dead users of the LUI+ADDI
when we start the second phase.
Patches to split the phases will come later.
Reviewed By: asb, luismarques
Differential Revision: https://reviews.llvm.org/D130119
More information about the All-commits