Context: the prologue/epilogue logic includes the following steps:
uni import: insert prolgue/epilogue
uni extend: insert optional spill/unspill
uni augment: move some spill to after prologue; some unspill to before epilogue
This has to do with two types of spill/unspill:
callee-saved: done with push before prologue and pop after prologue (no problem)
others: done with store after prologue and load before epilogue (problem)
Only the latter is subject to moving. This breaks down if the block is split after the epilogue, because then the unspills to move and the epilogue are in different blocks.
Context: the prologue/epilogue logic includes the following steps:
uni import
: insert prolgue/epilogueuni extend
: insert optional spill/unspilluni augment
: move some spill to after prologue; some unspill to before epilogueThis has to do with two types of spill/unspill: callee-saved: done with push before prologue and pop after prologue (no problem) others: done with store after prologue and load before epilogue (problem)
Only the latter is subject to moving. This breaks down if the block is split after the epilogue, because then the unspills to move and the epilogue are in different blocks.
Example from running
uni import
:Before
splitBlocks
:After
splitBlocks
:So the newly spawned
b9
is an exit block without an epilogue, which breaks the logic.Work-around for now: not using
--maxblocksize
.