This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] C++-ify and move control dependence code
- From: Richard Biener <rguenther at suse dot de>
- To: Steven Bosscher <stevenb dot gcc at gmail dot com>
- Cc: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 06 Sep 2013 08:41:21 +0200
- Subject: Re: [PATCH] C++-ify and move control dependence code
- Authentication-results: sourceware.org; auth=none
- References: <alpine dot LNX dot 2 dot 00 dot 1309051604290 dot 3869 at zhemvz dot fhfr dot qr> <CABu31nMhdxVwnsw0vgGO7jZd=nZuXUD8ZyNkqmctq7gqBvdyhQ at mail dot gmail dot com>
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
> 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
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).