limit checks in FFT
Stephen Weeks
sweeks@research.nj.nec.com
Sat, 13 Feb 1999 22:37:06 -0500
> I talked to Suresh about this, but he also can't explain it: why did his
> inliner, which decreased the number of trampolines in FFT from 20,975,390 to
> 904, increase the number of limit checks from 7,888,027 to 13,127,749?
Here is a possibility. I did not look at the code, but remember that
limit checks are inserted at:
* function entry
* continuation/handler entry
* loop header
* array allocation
So, if you have the following code:
if ...
then ... no allocation ...
else f(x)
where
* the body of f does allocation, and hence a limit check
* the then branch is dynamically the common branch
Then, inlining f will increase the dynamic number of limit checks
because the limit check will be moved in front of the if.