[PATCH] D42846: [PartialInlining] Use isInlineViable to detect constructs preventing inlining.

Florian Hahn via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 14 07:27:07 PST 2018


fhahn added a comment.

I could not find a case where not considering reachability would prevent us from partial inlining with this patch.

Currently, CodeExtractor won't extract unreachable blocks (via DT), blocks with vastart/vaend or blockaddresses in the function we use for partial inlining. That only leaves `localescape` which  isInlineViable prevents, and those calls always have to be in the entry block, so they are always reachable. I think it would be better to avoid extracting blocks with localesacpe calls for now and just assert isInlineViable.

If we teach CodeExtractor to consider reachability beyond using the dominator tree, we should consider the same reachability in isInlineViable.

Independent of this patch, considering reachability in isInlineViable could be beneficial for alwaysinline functions, but that should be an independent patch I think. What do you think @efriedma  , does this make sense?


https://reviews.llvm.org/D42846





More information about the llvm-commits mailing list