regalloc2 icon indicating copy to clipboard operation
regalloc2 copied to clipboard

Stop moving Early FixedReg Use operands in certain conditions when Reuse operands are present.

Open Iizerd opened this issue 1 year ago • 2 comments

One of the reasons for the panic at here is that Early FixedReg Uses are having their position updated to Late when there is already a Late FixedReg Def or clobber of the fixed PReg. This fixes that by not moving the operand's position if one of these already exist.

It's still possible to cause this behavior if a Late Def operand Reuses an Early FixedReg Def. However that is also easy to fix if Reuse operands are checked to see if they reuse a FixedReg operand.

Thoughts? Am I missing something here? I ran the fuzzer overnight and compiled a few large binaries 200mb plus without fail; All run fine.

Iizerd avatar Sep 06 '24 19:09 Iizerd

I think the new logic makes sense. However, as with #180, which I see is included here as the first commit, could you extend the fuzzer to generate multiple reuse-input defs, and fuzz with that?

cfallin avatar Sep 06 '24 19:09 cfallin

Yeah sorry about including #180 that again, I probably should have just put this commit in that same PR. This doesn't yet solve all the reason for that panic occurring, there is one more(at least?) I'm working on.

Iizerd avatar Sep 06 '24 19:09 Iizerd