This is the mail archive of the
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: Richard Guenther <rguenther at suse dot de>
- Cc: Martin Jambor <mjambor at suse dot cz>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 3 Apr 2012 10:01:50 +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> <20120331070601.GA24942@virgil.arch.suse.de> <Pine.LNX.firstname.lastname@example.org>
> Yes, either way I suppose. The following also looks dangerous to me:
> /* If OFFSET is making OP0 more aligned than BIGGEST_ALIGNMENT,
> record its alignment as BIGGEST_ALIGNMENT. */
> if (MEM_P (op0) && bitpos == 0 && offset != 0
> && is_aligning_offset (offset, tem))
> set_mem_align (op0, BIGGEST_ALIGNMENT);
> Maybe we can fall through most of the rest of the function if we
> canonicalized in the above way? Eric?
Probably not, I'm afraid. I agree that the above call to set_mem_align is
potentially problematic if we previously allocated the temp. Moreover, I
think that the other temp allocation around line 9840 is problematic too.
On the other hand, we could avoid skipping set_mem_attributes entirely by
passing the type instead of the expression.
So I'd set a flag for the first temp allocation, skip the set_mem_align call if
it is set and pass the type instead of the expression in the final call to
set_mem_attributes if it is set. And I'd handle the second temp allocation
independently and pass the type here too.