[Ada] Disable selected optimizations done in gigi at -Og
Eric Botcazou
ebotcazou@adacore.com
Mon Sep 23 08:32:00 GMT 2019
This disables 3 optimizations done in gigi when the -Og switch is passed: the
rotation of loops, the NRV optimization (Named Return Value) and the inlining
of local finalizers.
Tested on x86_64-suse-linux, applied on the mainline.
2019-09-23 Eric Botcazou <ebotcazou@adacore.com>
* gcc-interface/trans.c (Regular_Loop_to_gnu): Do not rotate the loop
if -Og is enabled.
(build_return_expr): Do not perform NRV if -Og is enabled.
(Subprogram_Body_to_gnu): Likewise.
(gnat_to_gnu) <N_Simple_Return_Statement>: Likewise.
(Handled_Sequence_Of_Statements_to_gnu): Do not inline finalizers if
-Og is enabled.
* gcc-interface/utils.c (convert_to_index_type): Return early if -Og
is enabled.
--
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 2511 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20190923/6c0eb936/attachment.bin>
More information about the Gcc-patches
mailing list