[RFC] Move ehcleanup pass to before early SRA

Eric Botcazou ebotcazou@adacore.com
Wed Jan 15 09:25:00 GMT 2014


Hi,

we have run into optimization regressions in Ada caused by the interaction 
between the GIMPLE clobbers and SRA: on the one hand GIMPLE clobbers create 
artificial EH handlers for aggregate variables, on the other hand SRA refuses 
to scalarize objects that appear in a statement that can throw internally.  
The result is that GIMPLE clobbers block the scalarization of variables that 
used to be possible up to the 4.6 series.  Testcase attached, compile p.adb on 
x86-64 with -O2 -fdump-tree-ealias -fdump-tree-esra.

This can be solved by moving the ehcleanup pass to before early SRA in 
the pipeline.  It has a small but measurable positive effect on some of our 
benchmarks (with a 4.7-based compiler).  Tested on x86-64/Linux.

Thoughts?


2014-01-15  Eric Botcazou  <ebotcazou@adacore.com>

	* passes.def (pass_early_local_passes): Run first EH cleanup pass early.


-- 
Eric Botcazou
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.diff
Type: text/x-patch
Size: 1029 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/6b316f01/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: p.adb
Type: text/x-adasrc
Size: 302 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/6b316f01/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decls_pack_2.adb
Type: text/x-adasrc
Size: 1678 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/6b316f01/attachment-0002.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decls_pack_2.ads
Type: text/x-adasrc
Size: 894 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/6b316f01/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: decls_support.ads
Type: text/x-adasrc
Size: 1377 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/6b316f01/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: support.ads
Type: text/x-adasrc
Size: 295 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20140115/6b316f01/attachment-0005.bin>


More information about the Gcc-patches mailing list