On Fri, Jan 6, 2012 at 6:05 PM, Aldy Hernandez <al...@redhat.com> wrote: > On 01/05/12 09:36, Richard Guenther wrote: >> >> On Thu, Jan 5, 2012 at 3:48 PM, Aldy Hernandez<al...@redhat.com> wrote: >>> >>> As you suggested here: >>> >>> http://gcc.gnu.org/ml/gcc-patches/2012-01/msg00232.html >>> >>> Bootregged on x86-64 Linux. >>> >>> OK? >> >> >> No, this pessimizes things too much at gimplification time, please simply >> inline the predicate instead. >> >> Richard. > > > It wasn't clear from your other message whether you want me to replace the > call with: > > !is_gimple_reg () && !TREE_ADDRESSABLE () > > or outright inline the exact function call as we have now. > > I have done the later. Let me know if you want the former. > > Tested on x86-64 Linux. > > OK?
Ok with simply excluding SSA_NAMEs like @@ -4411,16 +4411,27 @@ gimplify_modify_expr_rhs (tree *expr_p, /* It's OK to use the target directly if it's being initialized. */ use_target = true; - else if (TREE_CODE (*to_p) != SSA_NAME && ....) - /* Don't use the original target if it's already addressable; - if its address escapes, and the called function uses the - NRV optimization, a conforming program could see *to_p - change before the called function returns; see c++/19317. - When optimizing, the return_slot pass marks more functions - as safe after we have escape info. */ - use_target = false; - else - use_target = true; as SSA_NAMEs can never become addressable during gimplification. Thanks, Richard.