On 10/31/24 4:30 AM, Robin Dapp wrote:
So it's quite conservative, essentially using vector configuration as a
sort key of last resort and only for the highest priority insns in the
ready queue and only when it's going to let us eliminate a vsetvl.
On the one hand I wondered if it does make sense to re-use compatible_p from
the vsetvl pass for the match check but on the other hand I don't see a clear
gain by doing that and it would increase the complexity significantly.
So your approach makes sense to me.
Yea, that would have been my preference rather than writing a new
function, but there was enough of an impedance mismatch that the
simplest approach was cleaner.
My first very simple attempt with re-ordering actually involved only the last
vector mode but I didn't continue with that attempt. Out of curiosity, did
you try that as well at some point?
Do you mean only testing vector modes, ignoring the other attributes?
No, I never tested that. Stay conservative and iterate later if we
find the desire was my mantra.
We could do things similar to the vsetvl insertion pass were we realize
that two configs are equivalent even if they aren't the same for data
movement. But given it's not expected to actually improve performance,
but just drop the icount and make code look cleaner, I kept it as simple
as possible.
jeff