Closed Bug 1253586 Opened 4 years ago Closed 4 years ago
Points which are increasing the number of live variables .
A while ago, Brian Hackett made IonBuilder generates much more resume point inside for-loops, by adding extra nop instructions. The goal of these resume points was to reduce the life-span of variables such that we reduce the register pressure. With the addition of Recover Instruction, we are effectively increasing the life-span of the operands in exchange of better optimized instructions, or in exchange of removed code. As we keep a lot of resume points in loops, we effectively increase the life-span of intermediate state which cannot be computed via recovered instructions, and thus number of variable with a larger life-span. By removing intermediate resume points, we will increase the life-span of a few unused variables, while decreasing the number of variables. Thus reducing the register pressure caused by recovered instructions.
Just for a side-note, as I believed, I tested the code by removing the insertion of Nop with resume points, and this does not improve the performance, likely because each basic block has an entry resume point which also captures the stack, and thus does not compensate enough to out-weight the fact that we have a larger number of variable with an even larger life-span. So the trade-off would be to blocks where this can be done, and decide what is the limit at which we should do it or not.
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1262453
You need to log in before you can comment on or make changes to this bug.