This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: calculate CDI_DOMINATORS in tree-ssa-sink
- From: Jeffrey Law <law at redhat dot com>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, Josh Conner <jconner at apple dot com>
- Date: Wed, 03 Jan 2007 16:34:06 -0700
- Subject: Re: PATCH: calculate CDI_DOMINATORS in tree-ssa-sink
- References: <459AF8EE.2060105@apple.com> <200701040024.50749.steven.bosscher@gmail.com>
- Reply-to: law at redhat dot com
On Thu, 2007-01-04 at 00:24 +0100, Steven Bosscher wrote:
> On Wednesday 03 January 2007 01:29, Josh Conner wrote:
> > All -
> >
> > There's a relatively obvious fix that should be made in
> > execute_sink_code. This statement:
> >
> > calculate_dominance_info (CDI_DOMINATORS | CDI_POST_DOMINATORS);
> >
> > assuming it is intended to calculate both dominators and
> > post-dominators, is incorrect. Since CDI_*DOMINATORS are enums and not
> > bitfields (CDI_DOMINATORS==0 and CDI_POST_DOMINATORS==1), we're only
> > calculating post-dom info.
>
> This is not the first time that this bug had to be fixed in some
> pass. You get to score Mega Bonus Points if you can fix the
> problem at the root:
Or add a new warning for applying bitwise operations on enums...
Most of the time that's going to be a mistake...
Twiddling the enum values really isn't the answer.
jeff