Closed Bug 835877 Opened 11 years ago Closed 11 years ago

IonMonkey: always allow inlining when functions are small

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla21

People

(Reporter: h4writer, Assigned: h4writer)

References

Details

Attachments

(1 file)

Currently the inline depth is max. 3. For raytrace we hit this limit to inline "Flog.RayTracer.Color". Now it would be possible to just increase the inline depth, but that could have bad consequences for larger scripts.

Therefore I think it would be good to not use this inline depth for small functions. For small functions the overhead of inlining is really small and we can discard the call.
Blocks: 835178
This is the outstanding issue for bug 835178 to inline it. This will increase the score with the mentioned 7% in that bug
Assignee: general → hv1989
Attachment #707686 - Flags: review?(dvander)
Comment on attachment 707686 [details] [diff] [review]
Always allow inlining when functions are small

Review of attachment 707686 [details] [diff] [review]:
-----------------------------------------------------------------

We need some kind of cutoff to not blow out the stack - but you could make a hard cutoff of like 10, or use JS_CHECK_RECURSION().
Attachment #707686 - Flags: review?(dvander) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/84597bf0120d

I added smallFunctionMaxInlineDepth with default value 10 for now, but could get increased if we find other places where it would help. I do think 10 should be more than enough though.
https://hg.mozilla.org/mozilla-central/rev/84597bf0120d
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla21
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: