Skip to content

ir3: fix two issues with reloading in predicates RA

Job Noorman requested to merge jnoorman/mesa:ir3-ra-predicates-fixes-2 into main

This MR fixes two related issues with reloading defs in predicates RA:

  1. We would calculate SSA uses too late sometimes. It would happen right before spilling the first time but at this point, some defs might already have been reloaded. In this case, the SSA uses would be incorrect since some original defs would miss some of their uses (since they'd have been replaced by reloads).
  2. When calculating the first use of a def, we would iterate the sources of a use to determine which one refers to the def. However, we would compare the source's def (which could have been reloaded) with the original (non-reloaded) def. This would sometimes lead to not finding the correct first use. This is fixed by simple not checking the sources anymore as knowing the instruction that uses a def is enough.

Merge request reports