RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-10-05 Thread Li, Pan2
app@gmail.com; juzhe.zh...@rivai.ai; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook > Conceptually the rounding mode is just a property. The call, in > effect, should demand a "normal" rounding mode and set the rounding

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-10-02 Thread Robin Dapp
> Conceptually the rounding mode is just a property. The call, in > effect, should demand a "normal" rounding mode and set the rounding > mode to unknown if I understand how this is supposed to work. If my > understanding is wrong, then maybe that's where we should start -- > with a good

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-09-29 Thread Jeff Law
On 8/23/23 22:53, Li, Pan2 wrote: Thanks Jeff. That implies a save/restore pair around the call (possibly optimized so that we minimize the number of save/restores). I would have expected x86 to already be doing this. But maybe there's some ABI thing around mmx vs x86 state that allows it

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-09-29 Thread Jeff Law
On 8/25/23 06:44, Li, Pan2 wrote: Hi Jeff, You might also peek at the RTL gcse/pre code which is also LCM based and has the same class of problems. I found a similar approach to take care of this in gcse.cc/pre_edge_insert with some comments as below. /* We can't insert anything on

RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-09-27 Thread Li, Pan2
...@gmail.com Subject: RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook Hi Jeff, Kindly ping for the Patch V2 as below. https://gcc.gnu.org/pipermail/gcc-patches/2023-August/628508.html Pan -Original Message- From: Li, Pan2 Sent: Friday, August 25, 2023 8:45 PM To: Li, Pan2

RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-09-11 Thread Li, Pan2 via Gcc-patches
; kito.ch...@gmail.com Subject: RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook Hi Jeff, > You might also peek at the RTL gcse/pre code which is also LCM based and > has the same class of problems. I found a similar approach to take care of this in gcse.cc/pre_edge_insert with

RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-25 Thread Li, Pan2 via Gcc-patches
: Gcc-patches On Behalf Of Li, Pan2 via Gcc-patches Sent: Thursday, August 24, 2023 12:54 PM To: Jeff Law ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; Wang, Yanzhang ; kito.ch...@gmail.com Subject: RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook Thanks Jeff. > That implies a s

RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-23 Thread Li, Pan2 via Gcc-patches
, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook On 8/23/23 08:54, Li, Pan2 wrote: > Thanks Jeff for comments. > >> Understood. So the natural question is

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-23 Thread Jeff Law via Gcc-patches
On 8/23/23 08:54, Li, Pan2 wrote: Thanks Jeff for comments. Understood. So the natural question is why does x86/sh not need this for its mode switching? Don't all the same issues exist on those targets as well? AFAIK, it comes from the different design principle between the risc-v and

RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-23 Thread Li, Pan2 via Gcc-patches
try based on your suggestion soon as I am in the middle of something. Pan -Original Message- From: Jeff Law Sent: Wednesday, August 23, 2023 10:25 PM To: Li, Pan2 ; gcc-patches@gcc.gnu.org Cc: juzhe.zh...@rivai.ai; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] Mode-Switc

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-23 Thread Jeff Law via Gcc-patches
On 8/23/23 00:03, Li, Pan2 wrote: Thanks Jeff for comments, and sorry for late response. The background comes from the CALL insn. For the RISC-V dynamic rounding mode we need to 1. restore the frm BEFORE call, to avoid the static rounding mode pollute the call. 2. Backup the frm AFTER

RE: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-23 Thread Li, Pan2 via Gcc-patches
u.org Cc: juzhe.zh...@rivai.ai; Wang, Yanzhang ; kito.ch...@gmail.com Subject: Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook On 8/21/23 01:26, pan2...@intel.com wrote: > From: Pan Li > > We have EMIT hook in mode switching already, which will insert the > insn before in mos

Re: [PATCH v1] Mode-Switching: Add optional EMIT_AFTER hook

2023-08-21 Thread Jeff Law via Gcc-patches
On 8/21/23 01:26, pan2...@intel.com wrote: From: Pan Li We have EMIT hook in mode switching already, which will insert the insn before in most cases. However, in some arch like RISC-V, it requires the additional insn to be inserted after when meet a call. | | <- EMIT HOOK,