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 call, to ensure the frm value after call is live.

Currently, we don’t take care of it elegantly but we would like to refine this 
part by the optional EMIT_AFTER.
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?


I'm not aware of a case where we can have an insn with control flow that
isn't the end of the block.  So perhaps then that second conditional
into an assertion inside the true arm?

Not very sure my understanding is correct, but there may be a call insn in the 
middle of the bb,
And can be considered as control flow?
In the case where the call is control flow, then it'll end the block. Examples of this would be if the call could throw or perform a nonlocal goto. For "normal" calls, they are not considered control flow and can show up in the middle of a block.


Is this really correct for EDGE_ABNORMAL?  If the abnormal edge is
created by, say a nonlocal goto, exception handling, etc, then the insn
you insert at the end of the block will never be executed.

Got it, let me have a try for this, as well as there is somewhere take care of 
this already.
You might also peek at the RTL gcse/pre code which is also LCM based and has the same class of problems.

jeff

Reply via email to