[PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Aldy Hernandez via Gcc-patches
As discussed in the PR, the loop header copying pass avoids doing so when optimizing for size. However, sometimes we can determine the loop entry conditional statically for the first iteration of the loop. This patch uses the path solver to determine the outgoing edge out of preheader->header->xx

Re: [PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Jeff Law via Gcc-patches
On 11/10/2021 11:20 AM, Aldy Hernandez via Gcc-patches wrote: As discussed in the PR, the loop header copying pass avoids doing so when optimizing for size. However, sometimes we can determine the loop entry conditional statically for the first iteration of the loop. This patch uses the path

Re: [PATCH] Allow loop header copying when first iteration condition is known.

2021-11-10 Thread Richard Biener via Gcc-patches
On Wed, Nov 10, 2021 at 9:42 PM Jeff Law wrote: > > > > On 11/10/2021 11:20 AM, Aldy Hernandez via Gcc-patches wrote: > > As discussed in the PR, the loop header copying pass avoids doing so > > when optimizing for size. However, sometimes we can determine the > > loop entry conditional staticall

Re: [PATCH] Allow loop header copying when first iteration condition is known.

2021-11-11 Thread Aldy Hernandez via Gcc-patches
On Thu, Nov 11, 2021 at 8:30 AM Richard Biener wrote: > > On Wed, Nov 10, 2021 at 9:42 PM Jeff Law wrote: > > > > > > > > On 11/10/2021 11:20 AM, Aldy Hernandez via Gcc-patches wrote: > > > As discussed in the PR, the loop header copying pass avoids doing so > > > when optimizing for size. Howev

Re: [PATCH] Allow loop header copying when first iteration condition is known.

2021-11-11 Thread Richard Biener via Gcc-patches
On Thu, Nov 11, 2021 at 11:33 AM Aldy Hernandez wrote: > > On Thu, Nov 11, 2021 at 8:30 AM Richard Biener > wrote: > > > > On Wed, Nov 10, 2021 at 9:42 PM Jeff Law wrote: > > > > > > > > > > > > On 11/10/2021 11:20 AM, Aldy Hernandez via Gcc-patches wrote: > > > > As discussed in the PR, the loo