This is the mail archive of the
mailing list for the GCC project.
Re: [tree-ssa] Tail recursion improvement
- From: Diego Novillo <dnovillo at redhat dot com>
- To: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- Cc: Jeff Law <law at redhat dot com>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jan Hubicka <jh at suse dot cz>, Richard Henderson <rth at redhat dot com>
- Date: Thu, 04 Mar 2004 12:47:04 -0500
- Subject: Re: [tree-ssa] Tail recursion improvement
- Organization: Red Hat Canada
- References: <20040225075130.GA20753@atrey.karlin.mff.cuni.cz> <200403030418.i234Ia47027067@speedy.slc.redhat.com> <20040304153621.GA6206@atrey.karlin.mff.cuni.cz>
On Thu, 2004-03-04 at 10:36, Zdenek Dvorak wrote:
> There seems to be a problem in tree-ssa.c:mark_def_sites; we process
> operands of vdefs after the definitions, which prevents the phi node
> for the type tag of x to be created.
Yes, the patch looks OK.
> In case it indeed is a bug, where should it be fixed? Adding some more
> conditions to mark_stmt_if_obviously_necessary? Or setting
> DECL_NEEDS_TO_LIVE_IN_MEMORY_INTERNAL also for the type tag, somewhere?
The problem here is that alias analysis is properly marking the name tag
as a global variable, but not the type tag. That's why stores to TMT
are killed by DCE.
Since the program has no aliasing and the type tag is not associated
with an obviously global variable, we never mark it call-clobbered.
I'll have a patch for it shortly. I'll apply both patches once I fix