This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Dom patch
- From: Jeffrey A Law <law at redhat dot com>
- To: James Morrison <ja2morri at csclub dot uwaterloo dot ca>
- Cc: gcc at gcc dot gnu dot org
- Date: Thu, 25 Aug 2005 11:46:06 -0600
- Subject: Re: Dom patch
- References: <20050825064227.94B34A8542@perpugilliam.csclub.uwaterloo.ca>
- Reply-to: law at redhat dot com
On Thu, 2005-08-25 at 02:42 -0400, James Morrison wrote:
> Hey,
>
> I'm going to do more testing on this, but it seems this patch reduces the
> number of DOM iterations from the number of else if statements in pr19097 to
> 2 DOM iterations.
Certainly any time we can optimize more of the comparisons in a smaller
number of iterations, it's going to be a compile-time win.
> This is a massive savings and the savings if from
> calling fold_build2 (cond_code, boolean_type_node, op0, op1) in
> thread_across_edge since the folded expression is now saved for the rest of
> the iteration where the folded expression wasn't before.
Huh? I don't follow this explanation. Nor after a quick read of
the code do I see how you've made any real change here. Both before
and after your change we still fold the condition and store the
result in cached_lhs.
Also note that both cached_lhs and the dummy condition are only valid
for a single call to thread_across_edge -- so if you're saving a value
from one call and expecting it to be valid across another call (from the
standpoint of the correctness of the target program), then it's clearly
wrong.
Jeff