[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 immediately. 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
parent
71b7c03f
Please register or sign in to comment