This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Question about simplify_cond_and_lookup_avail_expr
- From: Jeffrey A Law <law at redhat dot com>
- To: Richard Kenner <kenner at vlsi1 dot ultra dot nyu dot edu>
- Cc: gcc at gcc dot gnu dot org
- Date: Wed, 24 Nov 2004 10:38:00 -0700
- Subject: Re: Question about simplify_cond_and_lookup_avail_expr
- Organization: Red Hat, Inc
- References: <10411241707.AA28576@vlsi1.ultra.nyu.edu>
- Reply-to: law at redhat dot com
On Wed, 2004-11-24 at 12:07 -0500, Richard Kenner wrote:
> When looking at prev->low and prev->high, how do we know they've already
> been computed? Isn't the computation done lazily?
Yes the computation is done lazily, but there will never be more
than one unprocessed vrp element.
1. We always call simplify_cond ... before we walk down its children
in the dominator tree. If there is an element on the vrp element
stack, we process it.
2. When we walk down the true arm's dominator children, we record an
unprocessed range for the true condition. When we're done with the
true arm we pop that range off.
3. Same as 2, but for the false arm.
If we encounter another conditional during step #2 or step #3 we
start the entire process again with a new conditional. Thus
we can never have more than 1 unprocessed element on any SSA_NAME's
vrp element stack.
jeff