Set RTX_UNCHANGING is readonly_field_p when clearing

Geoff Keating geoffk@geoffk.org
Mon Apr 21 19:13:00 GMT 2003


kenner@vlsi1.ultra.nyu.edu (Richard Kenner) writes:

>     Isn't it the case that RTX_UNCHANGING_P can be used only when the
>     *entire* type is readonly?  Otherwise, you could have an unchanging
>     store to the entire object followed by a non-unchanging store to a
>     subfield.
> 
> That's fine.
> 
> The rule is different for loads and stores.  For loads, you must *not*
> set RTX_UNCHANGING_P unless *all* fields are readonly,  For stores you
> *must* set RTX_UNCHANGING_P if *any* field is readonly.
> 
> As I said, we already do this in the case of most stores.

The docs currently say:

`RTX_UNCHANGING_P (X)'
     Nonzero in a `reg', `mem', or `concat' if the memory is set at
     most once, anywhere.  This does not mean that it is function
     invariant.  Stored in the `unchanging' field and printed as `/u'.

Could you correct them?

-- 
- Geoffrey Keating <geoffk@geoffk.org>



More information about the Gcc-patches mailing list