aboutsummaryrefslogtreecommitdiff
path: root/gcc/c/c-parser.c
diff options
context:
space:
mode:
authorSandra Loosemore <sandra@codesourcery.com>2020-09-19 07:32:35 -0700
committerSandra Loosemore <sandra@codesourcery.com>2020-09-19 13:54:16 -0700
commit83e037364e0d6dd74d595751e8bc8c461b4cb8fa (patch)
treed066e45803a7fe9fbbb3d26813c0ef8f014ed9c8 /gcc/c/c-parser.c
parentcba079f354a55363916759f6f186f92c5616b98a (diff)
downloadgcc-83e037364e0d6dd74d595751e8bc8c461b4cb8fa.zip
gcc-83e037364e0d6dd74d595751e8bc8c461b4cb8fa.tar.gz
gcc-83e037364e0d6dd74d595751e8bc8c461b4cb8fa.tar.bz2
Use C-style loop lowering instead of C++-style.
The C and C++ front ends used to use the same strategy of lowering loops to gotos with the end test canonicalized to the bottom of the loop. In 2014 the C++ front end was changed to emit LOOP_EXPRs instead (commit 1a45860e7757ee054f6bf98bee4ebe5c661dfb90). As part of the unification of the C and C++ loop handling, it's desirable to use the same lowering strategy for both languages. Applying the C++ strategy to C caused a number of regressions in C optimization tests, related to flipping the sense of the COND_EXPR for the exit test and changes in block ordering in the output code. Many of these regressions just require updating regexps in the test cases but a few appear to be genuine optimization failures. Since it appears the optimizers handle the C code better than C++ code, let's go back to using the C strategy for both languages. The rationale for the 2014 C++ patch (support for constexpr evaluation) has been solved in other ways meanwhile. 2020-08-12 Sandra Loosemore <sandra@codesourcery.com> gcc/c-family/ * c-gimplify.c (genericize_c_loop): Rewrite to match c_finish_loop in c-typeck.c.
Diffstat (limited to 'gcc/c/c-parser.c')
0 files changed, 0 insertions, 0 deletions