summary refs log tree commit diff
path: root/arm64/targ.c
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin@c9x.me>2019-02-21 22:35:12 +0100
committerQuentin Carbonneaux <quentin@c9x.me>2019-02-26 08:51:59 +0100
commitb2ea8c11b61014cb90e2a025d605ac77a1c7d6bc (patch)
treec3d3c5c7372ea7c2a29bec69110e8e70246258a9 /arm64/targ.c
parentdadf6d69d8ef24ada3461ddc81cf56418cfdc91e (diff)
downloadroux-b2ea8c11b61014cb90e2a025d605ac77a1c7d6bc.tar.gz
new copy elimination pass
The sparse data-flow analysis used for
copy elimination before this patch
could sometimes diverge.  The core
reason for this behavior is that the
visitphi() function was not monotonic
in the following copy-of lattice:

     top   (represented as the temp
    / | \   itself)
   x  y  z ...
    \ | /
     bot   (represented as R)

This monotonicity defect could be
fixed by reverting 2f41ff03, but
then the pass would end up missing
some redundant phis.

This patch re-implements the pass
from scratch using a different
approach.  The new algorithm should
get rid of all redundant copies.  On
the other hand, it can run slower
than the monotonic sparse data-flow
analysis because, in the worst case,
an instruction in a phi cluster can
be visited as many times as there
are phis in the input program.

Thanks to Michael Forney for reviewing
and testing the new pass.
Diffstat (limited to 'arm64/targ.c')
0 files changed, 0 insertions, 0 deletions