]> git.ipfire.org Git - thirdparty/gcc.git/commit
Handle addresses of more constants in IPA-CP
authorEric Botcazou <ebotcazou@adacore.com>
Sat, 11 Nov 2023 18:43:07 +0000 (19:43 +0100)
committerEric Botcazou <ebotcazou@adacore.com>
Sat, 11 Nov 2023 22:36:44 +0000 (23:36 +0100)
commite0787da263322fc18dfff55218b12129765f7bd3
treee7eee96cda2bcdb9983d2b356ddd20ebb9fa1c4b
parent85b49ad863965408668627f10b5b1b106053f319
Handle addresses of more constants in IPA-CP

IPA-CP can handle addresses of scalar constants (CONST_DECL) so this extends
that to addresses of constants in the pool (DECL_IN_CONSTANT_POOL).  Again
this is helpful for so-called fat pointers in Ada, i.e. objects that are
semantically pointers but represented by structures made up of two pointers.

This also moves the unused function print_ipcp_constant_value from ipa-cp.cc
to ipa-prop.cc and renames it.

gcc/
* ipa-cp.cc (print_ipcp_constant_value): Move to...
(values_equal_for_ipcp_p): Deal with VAR_DECLs from the
constant pool.
* ipa-prop.cc (ipa_print_constant_value): ...here.  Likewise.
(ipa_print_node_jump_functions_for_edge): Call the function
ipa_print_constant_value to print IPA_JF_CONST elements.
gcc/ipa-cp.cc
gcc/ipa-prop.cc