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: [PATCH] C++-ify and move control dependence code

On 9/5/13 11:58 PM, Steven Bosscher wrote:
> On Thu, Sep 5, 2013 at 4:05 PM, Richard Biener wrote:
>> This C++-ifies and moves the control dependence code from tree-ssa-dce.c
>> to cfganal.c as I am about to re-use that code from loop distribution.
> I'd recommend re-implementing the control dependence code, then. The
> current implementation is basically taken from old RTL-SSA dce.c and
> uses a now old-fashioned view of the CFG, e.g. using edge lists.
> You're probably better off starting from the dominance frontiers code
> (control dependence is the same as dominance frontiers on the reverse
> CFG).
> Ceterum censeo edge_listem esse delendam.

Well, I'm not in a position to do the re-implementation at the moment.
Would a re-implementation give me control-dependence in a more useful
way for PHI nodes?  That is, what block is an incoming edge (to compute
the PHI arg) control dependent on?  The current DCE query looks for
control dependece of the incoming edges predecessor, but for

    | <empty>
    |  /
   PHI <1, 2>

this gets us the right answer for the edge from the <empty> block
but a wrong one for the one that uses the if block (as DCE has to
consider all incoming edges that probably doesn't matter as it
just gets one step ahead here instead of waiting for the control
dependence of the if block being marked).


> Ciao!
> Steven

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