You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue comes from @chriso saying there may be dependencies being created between YMM registers that could be avoiding by manually picking registers: #58 (comment).
I haven't looked closely at what dependencies exist today though, so I don't know if there is an actual problem. I'd be happy to open an issue on avo if I have something concrete! Did a quick scan of the register allocation, which looks like:
I'm curious why Y15 wasn't used. At first glance I'm a little surprised to have registers like Y10 that are used for many things, but Y13 and Y14 that are only used on a short section of the loop.
Ah, okay, so it's not failing to find an allocation, but you think a different allocation would improve performance.
Regarding Y15, I think the algorithm as written will use the minimum number of registers it can, so that should be equal to the max number of live variables at any point. In your case that must be 15, so the highest used is Y14.
I can't remember the precise implementation, but it's picking an allocation from a pool of available registers. Perhaps changing this logic to LRU would approximate what you're looking for, and minimize dependencies. There's likely a ton of research on this that I should read up on. The original allocator was intended to be simple.
Activity
mmcloughlin commentedon Apr 24, 2022
Could you elaborate on the problem you've seen with the
avoallocator, and consider filing an issue on theavoside?pelletier commentedon Apr 26, 2022
This issue comes from @chriso saying there may be dependencies being created between YMM registers that could be avoiding by manually picking registers: #58 (comment).
I haven't looked closely at what dependencies exist today though, so I don't know if there is an actual problem. I'd be happy to open an issue on
avoif I have something concrete! Did a quick scan of the register allocation, which looks like:I'm curious why Y15 wasn't used. At first glance I'm a little surprised to have registers like
Y10that are used for many things, butY13andY14that are only used on a short section of the loop.mmcloughlin commentedon Apr 26, 2022
Ah, okay, so it's not failing to find an allocation, but you think a different allocation would improve performance.
Regarding Y15, I think the algorithm as written will use the minimum number of registers it can, so that should be equal to the max number of live variables at any point. In your case that must be 15, so the highest used is Y14.
I can't remember the precise implementation, but it's picking an allocation from a pool of available registers. Perhaps changing this logic to LRU would approximate what you're looking for, and minimize dependencies. There's likely a ton of research on this that I should read up on. The original allocator was intended to be simple.