Patch to allow Ada to work with tree-ssa

Diego Novillo dnovillo@redhat.com
Thu Jul 29 17:13:00 GMT 2004


On Wed, 2004-07-28 at 23:35, Richard Kenner wrote:
>     Given a volatile variable 'x', '&x' is not marked TREE_CONSTANT,
> 
> Why?  That seems wrong.  The address of a volatile variable is still
> constant.  recompute_tree_invarant_for_addr_expr correctly knows that
> the address of a volatile decl is constant and invariant.
> 
To check whether an ADDR_EXPR is invariant, you should use
TREE_INVARIANT.  TREE_CONSTANT is a superset of TREE_INVARIANT. 
TREE_CONSTANT means that it is constant across different function
calls.  The FE ought to set TREE_INVARIANT on ADDR_EXPRs, when
appropriate.

Perhaps one of the FE folks can elaborate a little more.  We use
is_gimple_min_invariant() everywhere we want a "constant".


Diego.



More information about the Gcc-patches mailing list