On 4/11/23 02:55, Richard Biener wrote:


Just to throw in a comment here - I think you should present LCM
with something it can identify as the same for compatible vsetvl and
then it should just work?  OTOH if "compatible" is not transitive
that's not possible (but then I can't quickly make up an example
where it wouldn't be).
I'm not sure it's that simple. Or at least not with a single iteration of LCM.

One problem is that kills may affecting one setting, but not the other. I couldn't mentally come up with a single pass LCM to handle the case Juzhe was handling. ie, you may have two compatible settings where you can unify them and hoist the compatible setting to a less executed point. But the transp set for one of two compatible settings may be different for the other compatible setting because of vector instructions in a block.

What was starting to form was a two pass approach. One which worked with individual vsetvl settings, another which worked on unified vsetvl settings. It wasn't clear to me which ordering would be better, but I didn't work through the likely scenarios -- it was clear this wasn't the time to introduce that kind of conceptual change.

jeff



Reply via email to