[tree-ssa] Speeding up the dominator optimizer

Daniel Berlin dberlin@dberlin.org
Sun Sep 21 20:28:00 GMT 2003



On Sun, 21 Sep 2003 law@redhat.com wrote:

>
>
> I should not that for the one test in question (java/interpret.cc) the
> dominator optimizer went from consuming from 50 seconds to ~5 with that patch.
> It ought to get the dominator optimizer off the radar for a while (with PRE
> and CCP being the biggest hogs for java/interpret.cc).

Is this with or without checking?

With checking, PRE takes a while on functions with large numbers of
bb's because of the naive array walking it does, like

for (i = 0; i < VARRAY_ACTIVE_SIZE (ei->erefs); i++)
{
	tree ref = VARRAY_TREE (ei->erefs, i);
	if (bb_for_stmt (ref) != bb)
		continue;
}


However, most of the time here is actually spend in bb_for_stmt/stmt_ann,
which calls is_gimple_stmt and is_essa_node on each tree.

Without checking, which turns off those calls to
is_gimple_stmt/is_essa_node,  PRE time usually takes 1/4 of the time with
checking.

While I've got patches for PRE to speed this up (by just associating
the eref arrays with the bb_ann's), it doesn't really speed up the
non-checking case by more than 10-20%, because we aren't actually
spending that much time.

It greatly speeds up the with checking case, of course.
>



More information about the Gcc-patches mailing list