[m-rev.] for review: optimize merge_instmap_deltas
jfischer at opturion.com
Sat Apr 16 12:47:58 AEST 2022
On Fri, 15 Apr 2022, Zoltan Somogyi wrote:
> Optimize merge_instmap_deltas.
> Until now, the merge_instmap_deltas predicate has always operated
> by repeated invoking merge_instmap_delta in a two-level loop to fixpoint,
> though how we do the inner loop has changed over the years. However,
> - some of the work done by these invocations of merge_instmap_delta,
> such as finding out which of the instmap_deltas is reachable,
> is repeated in each iteration of the outer (fixpoint) loop, and
> - some other work, such as finding out the types of the variables
> whose insts need to be merged, is repeated many times even within
> each iteration of the inner loop.
> This diff moves such code out of the code of the nested fixpoint loop,
> for invocations of merge_instmap_deltas that are given enough deltas
> to make this worthwhile.
> Carve merge_instmapping_delta_var out merge_instmapping_delta_vars,
> since this is the only part of part of merge_instmap_delta that the
Repeated "part of".
> fixpoint iteration now repeatedly invokes.
> Optimize even the base predicate merge_instmap_delta by testing whether
> the *initial* instmap is reachable just once.
> Standardize on capitalizating the M in InstMap/InstMapping.
The rest looks fine.
More information about the reviews