This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix stdarg optimization (PR tree-optimization/23818)
- From: Jeffrey A Law <law at redhat dot com>
- To: Jakub Jelinek <jakub at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Mon, 12 Sep 2005 14:51:27 -0600
- Subject: Re: [PATCH] Fix stdarg optimization (PR tree-optimization/23818)
- References: <20050912140926.GC7403@devserv.devel.redhat.com>
- Reply-to: law at redhat dot com
On Mon, 2005-09-12 at 10:09 -0400, Jakub Jelinek wrote:
> Hi!
>
> The testcase below ICEs on x86-64. The problem is that tree-stdarg.c relied
> on CDI_DOMINATORS info being computed, but never made sure it actually is
> computed. Fixed thusly, ok to commit?
>
> 2005-09-12 Jakub Jelinek <jakub@redhat.com>
>
> PR tree-optimization/23818
> * tree-stdarg.c (execute_optimize_stdarg): Call
> calculate_dominance_info.
>
> * gcc.dg/pr23818.c: New test.
OK.
For 4.2 we really should make dominators and post-dominators a pass
property. I wouldn't be terribly surprised if there are other
places where we could possibly look at dominators without having
computed them. Removing most (all?) of the calls to
calculate_dominance_info and making it a pass property would make
it easier to spot this kind of problem and avoid creating the problem
in new code as well.
jeff