This handles case :
if (a || b)
return;
// Large_body of slow path code
do_something here.
Differential D32249
[PartialInl] Enhance partial inliner to handle more complex conditions davidxl on Apr 19 2017, 3:07 PM. Authored by
Details This handles case : if (a || b) return; // Large_body of slow path code
Diff Detail Event Timeline
Comment Actions I am thinking of another two issues:
Sorry I didn't come up with them at the first beginning and dive into details. Comment Actions
Yes, i was thinking adding a limit on the chain length as an option. Probably do this a a follow up -- which also needs to look at profile data. (Note that Partialinlininer is currently not enabled in any optimization pipeline yet).
a&b&c case is already partially handled -- the partial inliner can partially peel the first iteration which may be good enough. However I do like your suggestion of computing the entry predicate region idea. Comment Actions
I think instruction count will be better limit than chain length.
Comment Actions Address review feedback. The new version now can handle more general conditions (see test cases).
Comment Actions Some minor comments.
Comment Actions LGTM. Please add a comment to explain the condition for exiting the loop for exceeding MaxNumInlineBlocks.
|
Expressing this as instructions will make this somewhat similar to inlining cost.