[patch] Store motion rewrite

Richard Henderson rth@redhat.com
Tue Mar 4 00:54:00 GMT 2003


On Tue, Mar 04, 2003 at 12:37:50AM +0100, Zdenek Dvorak wrote:
> no, its much simpler; just
> (insn 177 176 374 33 0x2a98de5b40 (set (mem/s:SI (plus:DI (reg/v/f:DI 59 [ this ])
>                 (const_int 40 [0x28])) [17 <variable>.pos+0 S4 A64])
>         (reg:SI 121)) -1 (nil)
>     (expr_list:REG_EH_REGION (const_int 1 [0x1])
>         (nil)))
> 
> is converted into
> 
> (insn 431 176 374 33 (nil) (set (reg:SI 169)
>         (reg:SI 121)) -1 (nil)
>     (nil))
> by store motion.
> 
> Unfortunately probably the only correct fix is to disable the
> transformation in this case at all; which is unpleasant considering that
> we will miss most of the opportunities :-(

Yep.  There's no helping the fact that you can't perform
load or store motion on trapping memories when they matter.

What we *should* do is have a global optimization pass that
discovers which memories cannot trap due to being shadowed
by another memory which would have trapped first.

Also, I think Andrew Haley has a patch to allow the Java
front end to do more annotation on memories that are known
to not trap, but that has not gone in.


r~



More information about the Gcc-patches mailing list