This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
RFD: marking a variable as addressable - need new hook? (pr26004)
- From: Joern RENNECKE <joern dot rennecke at st dot com>
- To: gcc at gcc dot gnu dot org
- Date: Mon, 30 Jan 2006 19:38:14 +0000
- Subject: RFD: marking a variable as addressable - need new hook? (pr26004)
gimplify.c:gimplify_modify_expr_rhs tries to optimize calls to functions
which return their value in memory, if the result is assigned to a
variable, by using the address of that variable as the location where
the result is top be stored. It uses lang_hooks.mark_addressable to
mark the variable
as addressable.
There is a preceding check that is supposed to verify that the variable
is not a register variable, but the function called -
is_gimple_reg_type - is really more a heuristic for optimizations.
The necessary information to decide if we can safely call
lang_hooks.mark_addressable is not available in a frontend-independet
manner. I think we need a new frontend hook that can tell an optimizer
if a call to lang_hooks.mark_addressable would succeed.