Re: [PATCH] tree-optimization/108691 - indirect calls to setjmp

2023-02-13 Thread Richard Biener via Gcc-patches
On Mon, 13 Feb 2023, Jakub Jelinek wrote: > On Mon, Feb 13, 2023 at 12:41:48PM +, Richard Biener wrote: > > > Could we e.g. prevent turning such indirect calls into direct calls? > > > > We do exactly have gimple_call_fntype and gimple_call_ctrl_altering_p > > to not require special-casing in

Re: [PATCH] tree-optimization/108691 - indirect calls to setjmp

2023-02-13 Thread Jakub Jelinek via Gcc-patches
On Mon, Feb 13, 2023 at 12:41:48PM +, Richard Biener wrote: > > Could we e.g. prevent turning such indirect calls into direct calls? > > We do exactly have gimple_call_fntype and gimple_call_ctrl_altering_p > to not require special-casing indirect to direct call promotion here. Ah, so if we m

Re: [PATCH] tree-optimization/108691 - indirect calls to setjmp

2023-02-13 Thread Richard Biener via Gcc-patches
On Mon, 13 Feb 2023, Jakub Jelinek wrote: > On Mon, Feb 13, 2023 at 12:00:56PM +0100, Richard Biener wrote: > > DCE now chokes on indirect setjmp calls becoming direct because > > that exposes them too late to be subject to abnormal edge creation. > > The following patch honors gimple_call_ctrl_al

Re: [PATCH] tree-optimization/108691 - indirect calls to setjmp

2023-02-13 Thread Jakub Jelinek via Gcc-patches
On Mon, Feb 13, 2023 at 12:00:56PM +0100, Richard Biener wrote: > DCE now chokes on indirect setjmp calls becoming direct because > that exposes them too late to be subject to abnormal edge creation. > The following patch honors gimple_call_ctrl_altering for those and > _not_ treat formerly indirec

[PATCH] tree-optimization/108691 - indirect calls to setjmp

2023-02-13 Thread Richard Biener via Gcc-patches
DCE now chokes on indirect setjmp calls becoming direct because that exposes them too late to be subject to abnormal edge creation. The following patch honors gimple_call_ctrl_altering for those and _not_ treat formerly indirect calls to setjmp as calls to setjmp. Unfortunately there's no way to h