[all-commits] [llvm/llvm-project] fd58e5: [RISCV] Reverse iteration/deletion structure in vs...
Philip Reames via All-commits
all-commits at lists.llvm.org
Tue Jul 23 08:52:27 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: fd58e508803483f566f446193250a581107d7181
https://github.com/llvm/llvm-project/commit/fd58e508803483f566f446193250a581107d7181
Author: Philip Reames <preames at rivosinc.com>
Date: 2024-07-23 (Tue, 23 Jul 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
Log Message:
-----------
[RISCV] Reverse iteration/deletion structure in vsetvli coalescing [NFC] (#98936)
The code previously deferred deleting the vsetvli to avoid invalidating
iterators, but eagerly deleted any ADDIs feeding the AVL register
operand. This was safe because the iterator was known to point to a
non-ADDI instruction (the vsetvli which was the previous user.) This
change switches to using an early_inc_range so that we can eagerly
delete the vsetvlis, but have to track ADDIs for later deletion.
This is purely stylistic, but IMO makes the code easier to follow. It
will also simplify a future change to support recursive deletion of
trivially dead instructions (i.e. LUI/ADDI pairs.)
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list