[PATCH] D15289: Avoid inlining CallSites leading to unreachable

Xinliang David Li via llvm-commits llvm-commits at lists.llvm.org
Fri Dec 11 08:56:03 PST 2015


On Fri, Dec 11, 2015 at 5:25 AM, Jun Bum Lim <junbuml at codeaurora.org> wrote:
> junbuml added a comment.
>
> @hfinkel @AndyAyers @davidxl
> As you mentioned, using BPI directly in this patch must be the right thing to do. As a first step, I will limit the use of BPI to identify blocks leading to a real cold unreachable blocks and inliner will only use BPI without any function name check. I should enhance calcUnreachableHeuristics() to consider unwinding edges of InvokeInst and exit(0).
>
> @majnemer
> Regarding threshold, base on my spec2006 runs, I'm trying to find the maximum possible value so that we can avoid inlining only when the call site leading to cold region is large enough. Hopefully, I will be able to finish my tests today.
>
> @davidxl
> For me it appears that Easwaran's change performs aggressive inlining for the hot sites based on profile data? I think my change somewhat different because it statically try to identify cold blocks and perform conservative inlining.

The plan is to first add the infrastructure change so that BFI
information is available to inliner (with incremental update). With
that ready, the inliner can use profile data (including static
profile) to drive inlining decisions for both speed and size
optimization.

David

>
>
> http://reviews.llvm.org/D15289
>
>
>


More information about the llvm-commits mailing list