Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-06 Thread Andrew Pinski
On Tue, May 6, 2025 at 2:04 PM H.J. Lu wrote: > > On Wed, May 7, 2025 at 12:29 AM Andi Kleen wrote: > > > > On 2025-05-06 09:48, H.J. Lu wrote: > > > On Mon, May 5, 2025 at 9:56 PM Andi Kleen wrote: > > >> > > >> On Mon, May 05, 2025 at 06:20:40AM -0700, Andi Kleen wrote: > > >> > > If the branc

Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-06 Thread H.J. Lu
On Wed, May 7, 2025 at 12:29 AM Andi Kleen wrote: > > On 2025-05-06 09:48, H.J. Lu wrote: > > On Mon, May 5, 2025 at 9:56 PM Andi Kleen wrote: > >> > >> On Mon, May 05, 2025 at 06:20:40AM -0700, Andi Kleen wrote: > >> > > If the branch edge destination is a basic block with only a direct > >> > >

Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-06 Thread Andi Kleen
On 2025-05-06 09:48, H.J. Lu wrote: On Mon, May 5, 2025 at 9:56 PM Andi Kleen wrote: On Mon, May 05, 2025 at 06:20:40AM -0700, Andi Kleen wrote: > > If the branch edge destination is a basic block with only a direct > > sibcall, change the jcc target to the sibcall target, decrement the > > de

Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-06 Thread H.J. Lu
On Mon, May 5, 2025 at 9:56 PM Andi Kleen wrote: > > On Mon, May 05, 2025 at 06:20:40AM -0700, Andi Kleen wrote: > > > If the branch edge destination is a basic block with only a direct > > > sibcall, change the jcc target to the sibcall target, decrement the > > > destination basic block entry la

Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-06 Thread H.J. Lu
On Mon, May 5, 2025 at 9:20 PM Andi Kleen wrote: > > > If the branch edge destination is a basic block with only a direct > > sibcall, change the jcc target to the sibcall target, decrement the > > destination basic block entry label use count and redirect the edge > > to the exit basic block. Ca

Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-05 Thread Andi Kleen
On Mon, May 05, 2025 at 06:20:40AM -0700, Andi Kleen wrote: > > If the branch edge destination is a basic block with only a direct > > sibcall, change the jcc target to the sibcall target, decrement the > > destination basic block entry label use count and redirect the edge > > to the exit basic bl

Re: [PATCH 2/3] x86: Add a pass to fold tail call

2025-05-05 Thread Andi Kleen
> If the branch edge destination is a basic block with only a direct > sibcall, change the jcc target to the sibcall target, decrement the > destination basic block entry label use count and redirect the edge > to the exit basic block. Call delete_unreachable_blocks to delete > the unreachable bas