IR rewrite pass before instruction selection
Some instructions such as NEW
will be expanded into a sequence of code (may involve new blocks), and some instructions such as THREADEXIT
will be expanded into a CCall into runtime service functions. Currently this is done at instruction selection pass, by directly expanding such instructions into machine code. Alternatively, a better choice is to rewrite/expand such instructions into Mu IR before instruction selection.