This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Re-enable store-motion, fix PRs 36204 and 36009
- From: Zdenek Dvorak <rakdver at kam dot mff dot cuni dot cz>
- To: Richard Guenther <rguenther at suse dot de>
- Cc: gcc-patches at gcc dot gnu dot org, Zdenek Dvorak <ook at ucw dot cz>
- Date: Wed, 14 May 2008 16:45:30 +0200
- Subject: Re: [PATCH] Re-enable store-motion, fix PRs 36204 and 36009
- References: <Pine.LNX.4.64.0805141617180.4134@zhemvz.fhfr.qr>
Hi,
> This re-enables store-motion for the cases in the PRs which was disabled
> by the alias oracle patch hunk
>
> (movement_possibility): Do not allow moving statements
> that store to memory.
>
> Bootstrapped and tested on x86_64-unknown-linux-gnu (I also tested
> a variant that returns NULL in mem_ref_in_stmt for stores which also
> works).
>
> Zdenek, does this look ok or was there a particular reason for the
> above hunk?
we do not want the statements with virtual defs to be moved out of the
loop by invariant motion. As far as I can see, store motion does not
seem to use movement_possibility at all, so I do not understand the fix.
Let me check what's happening there.
> (mem_ref_in_stmt): For a store return NULL.
> *************** mem_ref_in_stmt (tree stmt)
> *** 614,620 ****
>
> if (!mem)
> return NULL;
> - gcc_assert (!store);
>
> hash = iterative_hash_expr (*mem, 0);
> ref = htab_find_with_hash (memory_accesses.refs, *mem, hash);
> --- 611,616 ----
The changelog entry does not seem to match the change?
Zdenek