This is the mail archive of the 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: [Bug tree-optimization/21356] [4.1 Regression] Dominance error after aggressive dead code elimination (cd_dce)


> On Tue, 2005-07-05 at 23:29 -0600, Jeffrey A Law wrote:
> > DCE in aggressive mode sometimes is able to remove control structures
> > and thus edge from the CFG.  Sometimes removal of edges from the CFG
> > changes the dominator tree, but we make no attempt to actually keep
> > the dominators up-to-date.
> > 
> > In this testcase failure to keep the dominators up-to-date leads to
> > a checking failure.  This is trivially addressed by arranging for the
> > dominators to be recomputed if we remove edges from the CFG.  An
> > enterprising individual might be able to incrementally update the
> > dominators,
> Uh, we have code to incrementally update the dominators.
> Just use iterate_fix_dominators 

note however that to use it you must precisely know the set of basic
blocks whose dominators may change (which may or may not be the case
with CDDCE, I haven't thought about it), and the set should rather be
small -- iterate_fix_dominators is O(n^3) in the size of the set.

All in all, if the changes to cfg are indeed rare (which they should be,
given that the problem remained unnoticed so far), just having the
dominators to be recomputed is much easier and safer.


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