[PATCH] D32249: [PartialInl] Enhance partial inliner to handle more complex conditions
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 20 10:29:39 PDT 2017
davidxl added a comment.
>> Is it possible that some of the BBs on the chain may be very big and we don't want to partial inline them?
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).
>> The existing pattern handles if (a || b || c ...) case, but it may not be easy to extend for cases like (a && b && c) and ((a && b) || c). Basically, we want to find a collection of bbs with small sizes starting from entry. The bb collection only have two exits. one of them is ReturnBlock and the other is NonReturnBlock. The edges inside of the collection can be of any pattern.
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.
https://reviews.llvm.org/D32249
More information about the llvm-commits
mailing list