Created attachment 22400
llc input
I was experimenting with a pre-isl loop pass and found that by running the
LoopSimplify pass I saw generally more spilling. This happened also when I
turned off my optimization, so that *only* canonicalization of loop was the
difference.
I am not sure this is something worth looking into, but it looks like a
potential area improvement since an empty block after a loop (exit block) by
itself does not change the register allocation problem.
llc -mcpu=z14 ./tc.mir -o out.0.s -start-before=greedy
llc -mcpu=z14 ./tc.emptyexitblock.mir -o out.1.s -start-before=greedy
out.1.s has one more spilled interval, around the loop. The only (real)
difference between the two mir files is:
< bb66: ; preds = %bb51, %bb19
---
> bb66.loopexit: ; preds = %bb51
> br label %bb66
>
> bb66: ; preds = %bb66.loopexit,
tc.mir
(12097 bytes, text/plain)tc.emptyexitblock.mir
(12230 bytes, text/plain)