This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Dissociate store_expr's temp from exp so that it is not marked as addressable
- From: Eric Botcazou <ebotcazou at adacore dot com>
- To: Martin Jambor <mjambor at suse dot cz>
- Cc: Richard Guenther <rguenther at suse dot de>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 6 Apr 2012 18:21:55 +0200
- Subject: Re: [PATCH] Dissociate store_expr's temp from exp so that it is not marked as addressable
- References: <20120329232205.GB2817@virgil.arch.suse.de> <201204031102.12177.ebotcazou@adacore.com> <20120404131401.GA19344@virgil.arch.suse.de>
> @@ -9870,7 +9871,14 @@ expand_expr_real_1 (tree exp, rtx target
> if (op0 == orig_op0)
> op0 = copy_rtx (op0);
>
> - set_mem_attributes (op0, exp, 0);
> + /* If op0 is a temporary because of forcing to memory, pass only the
> + type to set_mem_attributes so that the original expression is never
> + marked as ADDRESSABLE through MEM_EXPR of the temporary. */
> + if (mem_attrs_from_type)
> + set_mem_attributes (op0, TREE_TYPE (exp), 0);
set_mem_attributes (op0, type, 0); is equivalent.
--
Eric Botcazou