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: [tree-ssa] dead const/pure/alloca call removal


> On Sun, Nov 09, 2003 at 11:59:53AM +0100, Jan Hubicka wrote:
> > We don't loose it, but we first gimplify, then realize that calee is
> > const (during it's RTL expansion, but soon from the trees in global
> > cgraph optimization pass) and then optimize the caller with bit still
> > set to side effects.  Thus we need to re-consider it.
> 
> I see.  It's a mater of deducing constness after gimplifcation,
> rather than losing it from a declaration.  Yes, that makes sense.
> In which case, you should also update the NOTHROW bit on the call.

We currently don't store nothrow attribute on the CALL_EXPR itself.
I see that in the case of duplicated function decls we may loose.  I can
add code into same place as constantness is discovered that looks into
callgraph_node for last version of function decl we should use.

Can this be dealt with by separate patch? (or shall I prepare updated
version?)

Honza
> 
> 
> r~


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