summaryrefslogtreecommitdiff
path: root/libstdc++-v3/acinclude.m4
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2021-05-04 12:47:11 +0200
committerEric Botcazou <ebotcazou@adacore.com>2021-05-04 12:54:13 +0200
commit93f8cb4965cebee125f96376367f05e18ee5749b (patch)
tree7c2e52b252af7e8b29870529caa3cd0bc6236701 /libstdc++-v3/acinclude.m4
parentf418bc3cd173bc4e679469928d4d96ffcc05fc7e (diff)
Reuse non-gimple_reg variable for inlining
When a call to a function is inlined and takes a parameter whose type is not gimple_reg, a local variable is created in the caller to hold a copy of the argument passed in the call with the following comment: /* We may produce non-gimple trees by adding NOPs or introduce invalid sharing when operand is not really constant. It is not big deal to prohibit constant propagation here as we will constant propagate in DOM1 pass anyway. * Of course the second sentence of the comment does not apply to non-gimple_reg values, unless they get SRAed later, because we don't do constant propagation for them. This for example prevents two identical calls to a pure function from being merged in the attached Ada testcase. Therefore the attached patch attempts to reuse a read-only or non-addressable local DECL of the caller, the hitch being that expand_call_inline needs to be prevented from creating a CLOBBER for the case where it ends uo being reused. gcc/ * tree-inline.c (insert_debug_decl_map): Delete. (copy_debug_stmt): Minor tweak. (setup_one_parameter): Do not use a variable if the value is either a read-only DECL or a non-addressable local variable in the caller. In this case, insert the debug-only variable in the map manually. (expand_call_inline): Do not generate a CLOBBER for these values. * tree-inline.h (debug_map): Minor tweak.
Diffstat (limited to 'libstdc++-v3/acinclude.m4')
0 files changed, 0 insertions, 0 deletions