This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: calculate CDI_DOMINATORS in tree-ssa-sink


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]