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: Zdenek Dvorak <rakdver at atrey dot karlin dot mff dot cuni dot cz>
- To: Josh Conner <jconner at apple dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 3 Jan 2007 02:02:29 +0100
- Subject: Re: PATCH: calculate CDI_DOMINATORS in tree-ssa-sink
- References: <459AF8EE.2060105@apple.com>
Hello,
> 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 goes unnoticed because the call is, well, dominated by a previous
> call to loop_optimizer_init that happens to calculate CDI_DOMINATORS.
>
> I haven't tested this patch beyond verifying that the compiler rebuilds.
> Regression testing seemed like overkill to me, but I'd be glad to do so
> if anyone is concerned about this patch.
although it may appear to be overkill, bootstrap & regtesting is
required even for similar "trivial" changes (take it as a self-defense
-- you would look really stupid if you managed to break bootstrap
by a similar change :-)
Zdenek