Directly insert the freeze instructions generated by SLU to the place it will be hoisted by LICM. Thus, we do not require LICM as a following pass for SLU.
Hmm, aren't there other places in the code that rely on instructions being hoisted out by LICM? Unless I am mis-remembering, It's not clear to me if/why freeze should be treated in a special way.
This patch is related to D127698, for migrating SLU from LoopPass to FuncPass. In the original O3 pipeline, both LICM and SLU are in the same LoopPass Manager. After migrating SLU to FuncPass, it will be removed from the LoopPass Manager. So some loops won't be changed by LICM after applying SLU. Thus, we need to apply parts of LICM in SLU. We found the only instruction we need to hoist is the freeze instruction, as it is the only instruction inserted by SLU.