Re: Question about function splitting

2023-10-04 Thread Hanke Zhang via Gcc
But when I change the code 'opstatus = rand()' to 'opstatus = rand() %2', the probability of opstatus being 0 should be 50%, but the result remains the same, i.e. still split at that point. And the specific information can be found in Bugzilla, the link is https://gcc.gnu.org/bugzilla/show_bug.cgi

Re: Question about function splitting

2023-10-04 Thread Richard Biener via Gcc
On Mon, Oct 2, 2023 at 7:15 PM Hanke Zhang via Gcc wrote: > > Martin Jambor 于2023年10月3日周二 00:34写道: > > > > Hello, > > > > On Mon, Oct 02 2023, Hanke Zhang via Gcc wrote: > > > Hi, I have some questions about the strategy and behavior of function > > > splitting in gcc, like the following code: >

Re: Question about function splitting

2023-10-02 Thread Hanke Zhang via Gcc
Martin Jambor 于2023年10月3日周二 00:34写道: > > Hello, > > On Mon, Oct 02 2023, Hanke Zhang via Gcc wrote: > > Hi, I have some questions about the strategy and behavior of function > > splitting in gcc, like the following code: > > > > int glob; > > void f() { > > if (glob) { > > printf("short path

Re: Question about function splitting

2023-10-02 Thread Martin Jambor
Hello, On Mon, Oct 02 2023, Hanke Zhang via Gcc wrote: > Hi, I have some questions about the strategy and behavior of function > splitting in gcc, like the following code: > > int glob; > void f() { > if (glob) { > printf("short path\n"); > return; > } > // do lots of expensive thing