This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]