On 3/24/23 15:34, Peter Bergner wrote:
On 3/23/23 6:12 PM, Jeff Law via Gcc-patches wrote:
Is there a reason why REE cannot see that our (reg:QI 4) is a param register
and thus due to our ABI, already correctly sign/zero extended?

I don't think REE has ever considered exploiting ABI constraints. Handling
that might be a notable improvement on various targets.  It'd be a great
place to do some experimentation.

Ok, so sounds like a good follow-on project after this patch is reviewed
and committed (stage1).  Thanks for your input!

Agreed.  I suspect that risc-v will benefit from such work as well.
With that in mind, if y'all start poking at this, please loop in Raphael
(on cc) who's expressed an interest in this space.

Will do.  I suspect that it'll be best to come up with some generic interface
using target hooks like "param regs are sign/zero extended" or "call return
values are sign/zero extended", etc. that targets can conditionally opt into
depending on their ABI that is in effect.
I wonder if we already have some of this in place via the ABI interfaces. Or if the ABI interfaces could be slightly revamped to utilize the same information as REE. That way there's a single source of truth for this aspect of the ABI.

But we can cross that bridge when we start poking around.

jeff

Reply via email to