For the below test:
int main() { volatile int foo = 0; int read1 = foo; int brains = foo; if (read1 > 3) { brains *= 2; brains += 1; } return brains; }
When in the debugger, on the line "if (read1 > 3)", and we step from the
'if' condition, onto the addition, then back to the 'if' again, which is
misleading, as described by:
I think function name and comments here could be clearer.
The action seems closer to 'hoisting' than 'promoting'. And the function is hoisting all of the instructions in the IfBlock, not just the phis. How about: 'hoistAllInstructionsInto'?