• Mythri's avatar
    [Turbofan] Allow recursive inlining · d72c97e2
    Mythri authored
    Currently, we do not inline recursive functions. This is in general a
    good idea but could be useful in some cases. For example, in rayTrace
    there is a class.create function to create new classes, which basically
    calls the initialize function on the object. When there are classes which
    instantiate other classes this leads to recursion. These are really small
    functions (within the small function budget) and it is good to inline them.
    Allowing such functions to inline improves the score on rayTrace by 12-16%
    and box2d by 24-30%.
    
    There is also an absolute limit on the maximum levels of inlining to avoid
    any corner cases and to ensure inlining always terminates.
    
    Bug: v8:6682
    Change-Id: I6784f68d6395097d126c0850b1a1336b6583d958
    Reviewed-on: https://chromium-review.googlesource.com/608235Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Commit-Queue: Mythri Alle <mythria@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#47255}
    d72c97e2
js-inlining.cc 31.9 KB