Thanks @Jamey Sharp @Chris Fallin and @L. Pereira for your feedback on using PRegSet over Vec<PReg>: I completely understand Chris’ point that this will be completely undesirable if it leads to slowdowns in the allocator or if it requires unclear bit hacking to avoid that.
However is was wondering if it also came (inadvertently) with extra guarantees on the allocator: namely that unlike passing Vec<PReg> , the same register cannot be passed twice into (un)preferred_regs_by_class
and it causes the iteration order to always be from lowest numbered to highest numbered register as opposed to relying on the order they were passed in: unclear whether this is acc desirable or not tho?
No, I don't think those properties are terribly important, as compared to the high-order bit of allowing random access for the randomized probe order
Good question! And I'm still working on understanding how RegTraversalIter
is intended to work; I think we can get the current behavior efficiently while switching to PRegSet
IMHO, strong disagree
why so strong on moving to PRegSet?
(how traversal is intended to work: random probe to spread out the "load" between registers; big impact on allocation perf vs. same probe order at every inst)
(I don't want to burn a ton of time on this, I think moving to PRegSet is a bad idea, I guess I'm just curious why the arguments I've already given are not enough)
Chris and I just talked about this a little bit separately. I don't understand this part of RA2 well enough and haven't been able to spend much time on it today, which is why I haven't been able to respond to these questions. I might have answers to Chris' concerns, but he wrote most of this code so I may just be confused. I'll get back to you all as soon as I can.
Chris Fallin said:
(I don't want to burn a ton of time on this, I think moving to PRegSet is a bad idea, I guess I'm just curious why the arguments I've already given are not enough)
This wasn’t supposed to be strong in favour of, I was mostly wondering if it came along with extra restrictions that were meaningfully different to the original code that I didn’t realise initially : agree with points you made on the GitHub about why it is probably not ideal thing to do
Last updated: Nov 22 2024 at 16:03 UTC