3 ms·
Why do you think this is a no-op? Looking at the diff, the code was summing the entry and exit counts. So, by the same argument, that means certain things wer
by boulos 11y ago
Why do you think this is a no-op? Looking at the diff, the code was summing the entry and exit counts. So, by the same argument, that means certain things were being double counted (considered higher cost) and now aren't.
I assume (like you), that someone will come along and point out that this doesn't really apply to all loops.
- DannyBee 11y agoIt's a noop in most cases because the cost of spilling a given loop variable is still the same relative to other loop variables. But yes, the only affect it should have is to possibly value loop variables low enough to spill them instead of non loop variables (note that non loop variables are calculated using both exit and entry frequencies) That is almost certainly a bad idea in general, execution frequencies are what you should use whether in loops or not. It most likely the real issue is a bunch of loops are having their relative (to non loop blocks) execution frequencies over estimated highly, and in reality the loop doesn't execute much