https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101014

--- Comment #4 from Andrew Macleod <amacleod at redhat dot com> ---
When a range is being calculated for an ssa-name, the propagation process often
goes along back edges. These back edges sometime require other ssa-names which
have not be processed yet. These are flagged as "poor values" and when
propagation is done, we visit the list of poor values, calculate them, and see
if that may result if a better range for the original ssa-name. 

The problem is that calculating these poor values may also spawn another set of
requests since the block at the far end of the back edge has not been processed
yet... its highly likely that some additional unprocessed ssa-names are used in
the calculation of that name, but typically they do not affect the current
range in a significant way. 

Thus we mostly we care about the first order effect only.  It turns out to be
very rare that a 2nd order effect on a back edge affects anything that we don't
catch later. 

This patch turns off poor-value tagging when looking up the first order values,
thus avoiding the 2nd order and beyond cascading effects.

I haven't found a test case we miss yet because of this change, yet it probably
resolves a number of the outstanding compilation problems in a significant way.

I think this will probably apply to gcc 11 in some form as well, so I'll look
at an equivalent patch for there.

Reply via email to