[PATCH] Eliminate TREE_INVARIANT

Paolo Bonzini bonzini@gnu.org
Sat Apr 5 14:35:00 GMT 2008


> Not really, but maybe the FEs depend on things like
> 
> const int i = 5;
> &a[i]
> 
> being an invariant address?  Of course after ccp (or even gimplification) that
> will become &a[5], but you might want to check what happens here with -O0,
> whether we create different code for the proposed variants of the check.

Ok.

> Why is SAVE_EXPR special here btw?  SAVE_EXPR should just "clear"
> TREE_SIDE_EFFECTS, but not change invariantness or constness of its
> argument, no?

The point of SAVE_EXPR is to make something invariant even though it has 
side effects.  From the GENERIC point of view, SAVE_EXPR must be treated 
as invariant.

Paolo



More information about the Gcc-patches mailing list