diff options
author | Jan Hubicka <hubicka@ucw.cz> | 2021-11-08 18:40:17 +0100 |
---|---|---|
committer | Jan Hubicka <hubicka@ucw.cz> | 2021-11-08 18:40:17 +0100 |
commit | 33a7a63275c959f97b25064cfbe3e7f0dc7f7e9c (patch) | |
tree | d4d7952d55da5d737dc955a871694ae1f6787b1f /gcc/function.c | |
parent | 666d780426f39883db8362f5cc24cdf9b4d3e98d (diff) | |
download | gcc-33a7a63275c959f97b25064cfbe3e7f0dc7f7e9c.zip gcc-33a7a63275c959f97b25064cfbe3e7f0dc7f7e9c.tar.gz gcc-33a7a63275c959f97b25064cfbe3e7f0dc7f7e9c.tar.bz2 |
Improve handling of some builtins.
For nested functions we output call to builtin_dwarf_cfa which
initializes frame entry used only for debugging. This however
prevents us from detecting functions containing nested functions
as const/pure or analyze side effects in modref.
builtin_dwarf_cfa is not documented and I wonder if it should be turned to
internal function. But I think we could consider functions using it const even
if in theory one can do things like test the return address and see the
difference between different frame addreses.
While doing so I also noticed that special_buitin_state handles quite few
builtins that are not special cased by ipa-modref. They do not make
user visible loads/stores and thus I think they shoul dbe annotated by
".c" to make this explicit for both modref and PTA.
Finally I aded dwarf_cfa and similar return_address to list of simple
bulitins since it compiles to simple stack frame load (and we consider
simple other builtins doing so).
* builtins.c (is_simple_builtin): Add builitin_dwarf_cfa
and builtin_return_address.
(builtin_fnspec): Annotate builtin_return,
bulitin_eh_pointer, builtin_eh_filter, builtin_unwind_resume,
builtin_cxa_end_cleanup, builtin_eh_copy_values,
builtin_frame_address, builtin_apply_args,
builtin_asan_before_dynamic_init, builtin_asan_after_dynamic_init,
builtin_prefetch, builtin_dwarf_cfa, builtin_return_addrss
as ".c"
* ipa-pure-const.c (special_builtin_state): Add builtin_dwarf_cfa
and builtin_return_address.
Diffstat (limited to 'gcc/function.c')
0 files changed, 0 insertions, 0 deletions