gcc-10-20200905 is now available
Snapshot gcc-10-20200905 is now available on https://gcc.gnu.org/pub/gcc/snapshots/10-20200905/ and on various mirrors, see http://gcc.gnu.org/mirrors.html for details. This snapshot has been generated from the GCC 10 git branch with the following options: git://gcc.gnu.org/git/gcc.git branch releases/gcc-10 revision 56744d9ed626805bb4ff5f5de7f9bb20d8475adc You'll find: gcc-10-20200905.tar.xz Complete GCC SHA256=53b1acecb1d08062fcf4f4ff3b5644b47a36d5033d5b8473d87dd583ed63daa2 SHA1=46ae6ed1f3e29a2cf0cb7111efe987322c7be79d Diffs from 10-20200829 are available in the diffs/ subdirectory. When a particular snapshot is ready for public consumption the LATEST-10 link is updated and a message is sent to the gcc list. Please do not use a snapshot before it has been announced that way.
A couple GIMPLE questions
First off one of the questions just me being curious but second is quite serious. Note, this is GIMPLE coming into my optimization and not something I've modified. Here's the C code: type_t * do_comp( type_t *data, size_t len) { type_t *res; type_t *x = min_of_x( data, len); type_t *y = max_of_y( data, len); res = y; if ( x < y ) res = 0; return res; } And here's the resulting GIMPLE: ;; Function do_comp.constprop (do_comp.constprop.0, funcdef_no=5, decl_uid=4392, cgraph_uid=3, symbol_order=68) (executed once) do_comp.constprop (struct type_t * data) { struct type_t * res; struct type_t * x; struct type_t * y; size_t len; [local count: 1073741824]: [local count: 1073741824]: x_2 = min_of_x (data_1(D), 1); y_3 = max_of_y (data_1(D), 1); if (x_2 < y_3) goto ; [29.00%] else goto ; [71.00%] [local count: 311385128]: [local count: 1073741824]: # res_4 = PHI return res_4; } The silly question first. In the "if" stmt how does GCC get those probabilities? Which it shows as 29.00% and 71.00%. I believe they should both be 50.00%. The serious question is what is going on with this phi? res_4 = PHI This makes zero sense practicality wise to me and how is it supposed to be recognized and used? Note, I really do need to transform the "0B" into something else for my structure reorganization optimization. Thanks, Gary Oblock CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any unauthorized review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto.
Re: A couple GIMPLE questions
On Sat, 5 Sep 2020, Gary Oblock via Gcc wrote: First off one of the questions just me being curious but second is quite serious. Note, this is GIMPLE coming into my optimization and not something I've modified. Here's the C code: type_t * do_comp( type_t *data, size_t len) { type_t *res; type_t *x = min_of_x( data, len); type_t *y = max_of_y( data, len); res = y; if ( x < y ) res = 0; return res; } And here's the resulting GIMPLE: ;; Function do_comp.constprop (do_comp.constprop.0, funcdef_no=5, decl_uid=4392, cgraph_uid=3, symbol_order=68) (executed once) do_comp.constprop (struct type_t * data) { struct type_t * res; struct type_t * x; struct type_t * y; size_t len; [local count: 1073741824]: [local count: 1073741824]: x_2 = min_of_x (data_1(D), 1); y_3 = max_of_y (data_1(D), 1); if (x_2 < y_3) goto ; [29.00%] else goto ; [71.00%] [local count: 311385128]: [local count: 1073741824]: # res_4 = PHI return res_4; } The silly question first. In the "if" stmt how does GCC get those probabilities? Which it shows as 29.00% and 71.00%. I believe they should both be 50.00%. See the profile_estimate pass dump. One branch makes the function return NULL, which makes gcc guess that it may be a bit less likely than the other. Those are heuristics, which are tuned to help on average, but of course they are sometimes wrong. The serious question is what is going on with this phi? res_4 = PHI This makes zero sense practicality wise to me and how is it supposed to be recognized and used? Note, I really do need to transform the "0B" into something else for my structure reorganization optimization. That's not a question? Are you asking why PHIs exist at all? They are the standard way to represent merging in SSA representations. You can iterate on the PHIs of a basic block, etc. CONFIDENTIALITY NOTICE: This e-mail message, including any attachments, is for the sole use of the intended recipient(s) and contains information that is confidential and proprietary to Ampere Computing or its subsidiaries. It is to be used solely for the purpose of furthering the parties' business relationship. Any unauthorized review, copying, or distribution of this email (or any attachments thereto) is strictly prohibited. If you are not the intended recipient, please contact the sender immediately and permanently delete the original and any copies of this email and any attachments thereto. Could you please get rid of this when posting on public mailing lists? -- Marc Glisse