[PR42294] Fix unsubstitute on bookkeeping-of-bookeeping
Vladimir Makarov
vmakarov@redhat.com
Wed Jan 13 20:17:00 GMT 2010
Alexander Monakov wrote:
> Quoting the PR42294 audit trail:
>
> The problem here is in the incorrect handling of the transformation history.
> When an insn is transformed (i.e. substituted/speculated), this is recorded so
> that the insn could be found during upward code motion. Part of the data
> recorded is the uid of insn on which the transformation happened. As this
> second insn could get removed while filling a parallel group, and its
> bookkeeping copy could be created, we need to undo the transformation while
> moving through this copy instead of original insn. To do this, we also
> maintain a bitmap of insn uids that could generate the copy
> (INSN_ORIGINATORS), and we also check it on the copies. The actual bug was
> that the bitmap should contain all "ancestor insns" of a copy, not only
> "parents", as the copy found could originated from another copy.
> The alternate solution would be to make the search function recurse
> on INSN_ORIGINATORS bitmap, but this one seemed clearer.
>
>
Yes, the current solution seems to me better too.
> 2009-12-30 Alexander Monakov <amonakov@ispras.ru>
>
> PR rtl-optimization/42294
> * sel-sched-ir.h (struct _sel_insn_data): Update comment.
> * sel-sched.c (move_exprs_to_boundary): Transitively add all
> originators' originators.
>
> * gfortran.dg/pr42294.f: New.
>
The patch is ok for the trunk.
More information about the Gcc-patches
mailing list