Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-15 Thread Jeff Law via Gcc-patches
On 11/14/22 08:38, Christoph Müllner wrote: Ok, I will add the check. Still, I don't think that the optimization changes the behavior in the case of different ABIs (i.e. the situation is problematic regardless if there is an indirect call or a guarded direct call). What could be done addition

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Christoph Müllner
On Mon, Nov 14, 2022 at 2:48 PM Richard Biener wrote: > On Mon, Nov 14, 2022 at 12:46 PM Christoph Müllner > wrote: > > > > > > > > On Mon, Nov 14, 2022 at 11:10 AM Richard Biener < > richard.guent...@gmail.com> wrote: > >> > >> On Mon, Nov 14, 2022 at 10:32 AM Christoph Müllner > >> wrote: > >

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Richard Biener via Gcc-patches
On Mon, Nov 14, 2022 at 12:46 PM Christoph Müllner wrote: > > > > On Mon, Nov 14, 2022 at 11:10 AM Richard Biener > wrote: >> >> On Mon, Nov 14, 2022 at 10:32 AM Christoph Müllner >> wrote: >> > >> > >> > >> > On Mon, Nov 14, 2022 at 10:00 AM Richard Biener >> > wrote: >> >> >> >> On Mon, Nov

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Christoph Müllner
On Mon, Nov 14, 2022 at 11:10 AM Richard Biener wrote: > On Mon, Nov 14, 2022 at 10:32 AM Christoph Müllner > wrote: > > > > > > > > On Mon, Nov 14, 2022 at 10:00 AM Richard Biener < > richard.guent...@gmail.com> wrote: > >> > >> On Mon, Nov 14, 2022 at 9:13 AM Christoph Müllner > >> wrote: > >

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Richard Biener via Gcc-patches
On Mon, Nov 14, 2022 at 10:32 AM Christoph Müllner wrote: > > > > On Mon, Nov 14, 2022 at 10:00 AM Richard Biener > wrote: >> >> On Mon, Nov 14, 2022 at 9:13 AM Christoph Müllner >> wrote: >> > >> > >> > >> > On Mon, Nov 14, 2022 at 8:31 AM Richard Biener >> > wrote: >> >> >> >> On Sun, Nov 1

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Christoph Müllner
On Mon, Nov 14, 2022 at 10:00 AM Richard Biener wrote: > On Mon, Nov 14, 2022 at 9:13 AM Christoph Müllner > wrote: > > > > > > > > On Mon, Nov 14, 2022 at 8:31 AM Richard Biener < > richard.guent...@gmail.com> wrote: > >> > >> On Sun, Nov 13, 2022 at 4:09 PM Christoph Muellner > >> wrote: > >>

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Richard Biener via Gcc-patches
On Mon, Nov 14, 2022 at 9:13 AM Christoph Müllner wrote: > > > > On Mon, Nov 14, 2022 at 8:31 AM Richard Biener > wrote: >> >> On Sun, Nov 13, 2022 at 4:09 PM Christoph Muellner >> wrote: >> > >> > From: Christoph Müllner >> > >> > This patch adds a new pass that looks up function pointer assi

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-14 Thread Christoph Müllner
On Mon, Nov 14, 2022 at 8:31 AM Richard Biener wrote: > On Sun, Nov 13, 2022 at 4:09 PM Christoph Muellner > wrote: > > > > From: Christoph Müllner > > > > This patch adds a new pass that looks up function pointer assignments, > > and adds guarded direct calls to the call sites of the function

Re: [RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-13 Thread Richard Biener via Gcc-patches
On Sun, Nov 13, 2022 at 4:09 PM Christoph Muellner wrote: > > From: Christoph Müllner > > This patch adds a new pass that looks up function pointer assignments, > and adds guarded direct calls to the call sites of the function > pointers. > > E.g.: Lets assume an assignment to a function pointer

[RFC PATCH] ipa-guarded-deref: Add new pass to dereference function pointers

2022-11-13 Thread Christoph Muellner
From: Christoph Müllner This patch adds a new pass that looks up function pointer assignments, and adds guarded direct calls to the call sites of the function pointers. E.g.: Lets assume an assignment to a function pointer as follows: b->cb = &myfun; Other part of the program can u