mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 11:30:21 +01:00
aco/ra: fix usage of invalidated iterator
Signed-off-by: Rhys Perry <pendingchaos02@gmail.com>
Reviewed-by: Daniel Schürmann <daniel@schuermann.dev>
Fixes: 58bd9a379e ("aco/ra: fix live-range splits of phi definitions")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16454>
This commit is contained in:
parent
42a4a123a6
commit
cd2b4c319a
1 changed files with 4 additions and 1 deletions
|
|
@ -2120,7 +2120,10 @@ get_regs_for_phis(ra_ctx& ctx, Block& block, RegisterFile& register_file,
|
|||
}
|
||||
|
||||
/* find registers for phis where the register was blocked or no operand was assigned */
|
||||
for (aco_ptr<Instruction>& phi : instructions) {
|
||||
|
||||
/* Don't use iterators because get_reg_phi() can add phis to the end of the vector. */
|
||||
for (unsigned i = 0; i < instructions.size(); i++) {
|
||||
aco_ptr<Instruction>& phi = instructions[i];
|
||||
Definition& definition = phi->definitions[0];
|
||||
if (definition.isFixed())
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue