0005-Search-all-dominated-blocks-for-expressions-to-hoist.patch
Jeff Law
law@redhat.com
Mon Jun 21 19:45:00 GMT 2010
On 06/16/10 10:27, Steven Bosscher wrote:
> On Wed, Jun 16, 2010 at 5:58 PM, Maxim Kuvyrkov<maxim@codesourcery.com> wrote:
>
>> Currently, code hoisting only checks immediately-dominated blocks for
>> expressions to hoist. I wonder if limiting the search for expressions is
>> intentional.
>>
>> This patch makes code hoisting search through all dominated blocks for
>> expressions to hoist.
>>
> And makes the algorithm quadratic in the size of the CFG. You should
> limit the depth not only to avoid excessive live range lengths but
> also for corner cases of strangely-formed CFGs.
>
Technically true, but we only care about the dominance tree here, not
the entire CFG. The change which made code hoisting only look at the
immediate dominators was a mistake. It's unfortunate that
get_dominated_by only returns immediate dominators -- based on the name,
one could reasonably expect to get the full set of dominators which I
suspect happened back in 2002 when that change was made.
Maxim -- can you test f90-intrinsic-bit.f with and without this change
and report back on how the compilation time changes?
Thanks,
Jeff
More information about the Gcc-patches
mailing list