aboutsummaryrefslogtreecommitdiff
path: root/gcc/tree-ssa-alias.c
diff options
context:
space:
mode:
authorJan Hubicka <jh@suse.cz>2021-11-13 12:13:42 +0100
committerJan Hubicka <jh@suse.cz>2021-11-13 12:13:42 +0100
commitecdf414bd89e6ba251f6b3f494407139b4dbae0e (patch)
tree24cbfb095f17562f3f29ad32a65c512e3dda473a /gcc/tree-ssa-alias.c
parentdc777f6b0646fed2f18a580ce249cb6404f89205 (diff)
downloadgcc-ecdf414bd89e6ba251f6b3f494407139b4dbae0e.zip
gcc-ecdf414bd89e6ba251f6b3f494407139b4dbae0e.tar.gz
gcc-ecdf414bd89e6ba251f6b3f494407139b4dbae0e.tar.bz2
Enable ipa-sra with fnspec attributes
Enable some ipa-sra on fortran by allowing signature changes on functions with "fn spec" attribute when ipa-modref is enabled. This is possible since ipa-modref knows how to preserve things we trace in fnspec and fnspec generated by fortran forntend are quite simple and can be analysed automatically now. To be sure I will also add code that merge fnspec to parameters. This unfortunately hits bug in ipa-param-manipulation when we remove parameter that specifies size of variable length parameter. For this reason I added a hack that prevent signature changes on such functions and will handle it incrementally. I tried creating C testcase but it is blocked by another problem that we punt ipa-sra on access attribute. This is optimization regression we ought to fix so I filled https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103223. As a followup I will add code classifying the type attributes (we have just few) and get stats on access attribute. gcc/ChangeLog: * ipa-fnsummary.c (compute_fn_summary): Do not give up on signature changes on "fn spec" attribute; give up on varadic types. * ipa-param-manipulation.c: Include attribs.h. (build_adjusted_function_type): New parameter ARG_MODIFIED; if it is true remove "fn spec" attribute. (ipa_param_adjustments::build_new_function_type): Update. (ipa_param_body_adjustments::modify_formal_parameters): update. * ipa-sra.c: Include attribs.h. (ipa_sra_preliminary_function_checks): Do not check for TYPE_ATTRIBUTES.
Diffstat (limited to 'gcc/tree-ssa-alias.c')
0 files changed, 0 insertions, 0 deletions