https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113372

--- Comment #6 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
So, couldn't we attempt at least a partial workaround at add_scope_conflicts
time?
I mean, for SSA_NAME uses in statements with some caching try to check if those
SSA_NAMEs may contain addresses (or because of ivopts also in pointer-sized
integers) of particular DECL_RTL_IF_SET (op) == pc_rtx vars or set of them and
treat those as if they were the addresses too?
I mean where we call walk_stmt_load_store_addr_ops also check uses of SSA_NAMEs
which are based on those ADDR_EXPRs and treat those similarly.
It wouldn't handle say const or pure functions taking address of some var and
say returning something based on it, but perhaps could workaround the most
common issues in the wild with stack sharing.

Reply via email to