After each iteration of the function specializer, constant
stack values are promoted to constant globals in order to
enable recursive function specialization.
This should also be done once before running the specializer:
- Since by default the specializer is ran once, without an initial call to this function worthwhile specialization opportunities may be missed. This is especially true for Fortran programs where function arguments are passed by reference.
- This also results in more consistent specialization behaviour when the specializer is ran more than once. Currently there are cases where functions will be specialized depending on if an unrelated specializable function is added.