On 9/18/23 19:41, Jeff Law wrote:
On 9/18/23 13:45, Vineet Gupta wrote:
For the cases which do require sign extends, but not being eliminated
due to "missing definition(s)" I'm working on adapting Ajit's REE ABI
interfaces work [2] to work for RISC-V as well.
I wonder if we could walk the DECL_ARGUMENTS for current_function_decl
and create sign extensions for integer arguments smaller than XLEN at
the start of the function. Record them in a list.
Then we just let the rest of REE do its thing. When REE is done we go
back and delete those sign extensions we created.
Forgot to add that even if we were to do this (and the test is doing
this already), REE would fail anyways. It does DF use/def traversal -
starting with use in an extension insn and finding the defs. If the def
was implicit - as in a function arg, it bails out. This is essentially
what Ajit is trying to fix by identifying the def as a potential
function arg and not bailing.
Thx,
-Vineet