Re: Question about merging if-else blocks

2023-10-04 Thread Florian Weimer via Gcc
* Richard Biener: >> By disassembling the exe file generated by icc, I found that icc will >> merge these two blocks with the example code below. So I think there >> maybe some ways to make it. > > ... glibc for example allows user-provided printf format callbacks so > printf might call back into

Re: Question about merging if-else blocks

2023-10-04 Thread Richard Biener via Gcc
On Sun, Oct 1, 2023 at 6:13 AM Hanke Zhang wrote: > > Richard Biener 于2023年9月27日周三 15:30写道: > > > > On Wed, Sep 27, 2023 at 7:21 AM Hanke Zhang via Gcc wrote: > > > > > > Thanks! I understand what you mean, then can I think that if the > > > function here is not an external function, but a funct

Re: Question about merging if-else blocks

2023-09-30 Thread Hanke Zhang via Gcc
Richard Biener 于2023年9月27日周三 15:30写道: > > On Wed, Sep 27, 2023 at 7:21 AM Hanke Zhang via Gcc wrote: > > > > Thanks! I understand what you mean, then can I think that if the > > function here is not an external function, but a function visible to > > the compiler and the function doesn't modify `

Re: Question about merging if-else blocks

2023-09-27 Thread Richard Biener via Gcc
On Wed, Sep 27, 2023 at 7:21 AM Hanke Zhang via Gcc wrote: > > Thanks! I understand what you mean, then can I think that if the > function here is not an external function, but a function visible to > the compiler and the function doesn't modify `a`, then these two > blocks can be merged? Yes. T

Re: Question about merging if-else blocks

2023-09-26 Thread Hanke Zhang via Gcc
Thanks! I understand what you mean, then can I think that if the function here is not an external function, but a function visible to the compiler and the function doesn't modify `a`, then these two blocks can be merged? Marc Glisse 于2023年9月27日周三 12:51写道: > > On Wed, 27 Sep 2023, Hanke Zhang via

Re: Question about merging if-else blocks

2023-09-26 Thread Marc Glisse via Gcc
On Wed, 27 Sep 2023, Hanke Zhang via Gcc wrote: Hi, I have recently been working on merging if-else statement blocks, and I found a rather bizarre phenomenon that I would like to ask about. A rough explanation is that for two consecutive if-else blocks, if their if statements are exactly the sam

Question about merging if-else blocks

2023-09-26 Thread Hanke Zhang via Gcc
Hi, I have recently been working on merging if-else statement blocks, and I found a rather bizarre phenomenon that I would like to ask about. A rough explanation is that for two consecutive if-else blocks, if their if statements are exactly the same, they should be merged, like the following progra