On 12/7/21 02:12, Richard Biener wrote:
On Mon, Dec 6, 2021 at 7:39 PM Andrew MacLeod <amacl...@redhat.com> wrote:
On
Well, its only does the fill now when there is range info located on an
outgoing edge of the dominator.  Its still used, just on a much smaller
portion of the graph.

We could do even better if we knew whether one edge was involved. ie

bb3:
a = foo()
if (a > 4)
     blah1;       bb4
else
     blah2;       bb5
bb6:
   = a;

The use of a in bb6 will look to bb3 as the dominator, but if it knew
that both edges are used in that dominance relation (ie, neither
outgoing edge dominates bb6),  it wouldn't have to calculate a range for
'a'.

But as it stands, it cant really tell the above situation from:

bb3:
a = foo()
if (a > 4)
      = a        bb4

In this case, only the one edge is used, and we DO need to calculate a
range for a.  The edge from 3->4 does dominate bb4

In both cases, bb3 is the dominator, and bb3 can generate an outgoing
range, but only in one case do we need to calculate a range.

What would be really useful would be to be able to tell if an edge
dominates a block :-)

I have thoughts on this for next release, and may overhaul the cache...
but I don't think there is any such facility in the dominator subsystem?
Well, dominance of an edge is dominance of the edge destination if the
destination has only a single non-backedge.  If the destination has more
than one non-backedge then the edge does not dominate anything.  So
to generally answer dominance queries for edges you have to have
backedges marked.

Are back edges not always marked if dominance information is available?

OR does one need to do something to ensure they are up to date.

And if an edge is marked as DFS_BACK, is that guaranteed to be true always, regardless of dominance info, assuming no CFG manipulation is going on?

Thanks

Andrew

Reply via email to