This is the mail archive of the gcc-patches@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]

Re: [PATCH] Re-enable store-motion, fix PRs 36204 and 36009


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


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