mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-04-08 05:10:29 +08:00
when Fortran functions pass array descriptors they receive as a parameter to another function, they actually rebuild it. Thanks to work done mainly by Feng, IPA-CP can already handle the cases when they pass directly the values loaded from the original descriptor. Unfortunately, perhaps the most important one, stride, is first checked against zero and is replaced with one in that case: _12 = *a_11(D).dim[0].stride; if (_12 != 0) goto <bb 4>; [50.00%] else goto <bb 3>; [50.00%] <bb 3> // empty BB <bb 4> # iftmp.22_9 = PHI <_12(2), 1(3)> ... parm.6.dim[0].stride = iftmp.22_9; ... __x_MOD_foo (&parm.6, b_31(D)); in the most important and hopefully common cases, the incoming value is already 1 and we fail to propagate it. I would therefore like to propose the following way of encoding this situation in pass-through jump functions using using ASSERTT_EXPR operation code meaning that if the incoming value is the same as the "operand" in the jump function, it is passed on, otherwise the result is unknown. This of course captures only the single (but most important) case but is an improvement and does not need enlarging the jump function structure and is simple to pattern match. Encoding that zero needs to be changed to one would need another field and matching it would be slightly more complicated too. gcc/ 2020-06-12 Martin Jambor <mjambor@suse.cz> * ipa-prop.h (ipa_pass_through_data): Expand comment describing operation. * ipa-prop.c (analyze_agg_content_value): Detect new special case and encode it as ASSERT_EXPR. * ipa-cp.c (values_equal_for_ipcp_p): Move before ipa_get_jf_arith_result. (ipa_get_jf_arith_result): Special case ASSERT_EXPR. gcc/testsuite/ 2020-06-12 Martin Jambor <mjambor@suse.cz> * gfortran.dg/ipcp-array-2.f90: New test.
…
…
…
…
…
…
…
…
…
…
…
…
This directory contains the GNU Compiler Collection (GCC). The GNU Compiler Collection is free software. See the files whose names start with COPYING for copying permission. The manuals, and some of the runtime libraries, are under different terms; see the individual source files for details. The directory INSTALL contains copies of the installation information as HTML and plain text. The source of this information is gcc/doc/install.texi. The installation information includes details of what is included in the GCC sources and what files GCC installs. See the file gcc/doc/gcc.texi (together with other files that it includes) for usage and porting information. An online readable version of the manual is in the files gcc/doc/gcc.info*. See http://gcc.gnu.org/bugs/ for how to report bugs usefully. Copyright years on GCC source files may be listed using range notation, e.g., 1987-2012, indicating that every year in the range, inclusive, is a copyrightable year that could otherwise be listed individually.
Description
Languages
C++
31.9%
C
31.3%
Ada
12%
D
6.5%
Go
6.4%
Other
11.5%