On 6/3/2022 11:27 AM, Roger Sayle wrote:
Hi Richard,
Here's a revised version of my patch incorporating both your suggestions.
The algorithm now uses two worklist vectors, and pointers to them,
alternating between them on each iteration, which allows the code to
handle an arbitrary number of passes without the previous code duplication.
This then allows a "for (pass=2; pass<=passes; pass++)"-like idiom, that allows
it to try two passes (the current behaviour) at -O1, but three passes with
-O2 and higher.  This also provides a convenient point, should someone
wish to control the number of cprop_hardreg pass iterations from the
command line (or a backend) in future.

This patch has been retested on x86_64-pc-linux-gnu, both with an without
the proposed i386 backend patch for reduced register shuffling, with
make bootstrap and make -k check, both with/without target_board=
unix{-m32}, with no new failures.  Is this what you had in mind?

2022-06-03  Roger Sayle  <ro...@nextmovesoftware.com>
             Richard Biener  <rguent...@suse.de>

gcc/ChangeLog
         * regcprop.cc (pass_cprop_hardreg::execute): Perform a third
         iteration over each basic block that was updated by the second
         iteration.
OK
jeff

Reply via email to