Thanks for working on this!
On 1/28/25 12:11 PM, Surya Kumari Jangala wrote:
> + FOR_ALL_BB_FN (bb, cfun) {
{ should be on the next line.
> + FOR_BB_INSNS (bb, insn) {
Likewise.
> + pat_code = GET_CODE (PATTERN (insn));
> + if (pat_code == ASM_INPUT || pat_code == USE || pat_code == CLOBBER)
> + continue;
Why ignore these? I think particularly the USE and CLOBBER insns
that mention hard regs should definitely be relied on. Maybe the
hardreg use isn't apparent???
> + if (GET_CODE (op) == SUBREG)
You can use SUBREG_P (op) here.
> + if (REG_P (op) && REGNO (op) < FIRST_PSEUDO_REGISTER)
...and HARD_REGISTER_P (op) here.
> + for (int j = hard_regno_nregs (hard_regno, mode) - 1; j >= 0; j--)
> + allocated_hardreg_p[hard_regno + j] = true;
I'm not really a fan of the countdown loop. How about the following instead?
for (int j = 0; j < hard_regno_nregs (hard_regno, mode); j++)
Peter