This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] Fix PR89779
- From: Richard Biener <rguenther at suse dot de>
- To: gcc-patches at gcc dot gnu dot org
- Cc: bin dot cheng at linux dot alibaba dot com
- Date: Mon, 25 Mar 2019 13:18:58 +0100 (CET)
- Subject: Re: [PATCH] Fix PR89779
- References: <alpine.LSU.2.20.1903211053030.4934@zhemvz.fhfr.qr>
On Thu, 21 Mar 2019, Richard Biener wrote:
>
> The testcase in this PR shows that IVOPTs ends up using cached
> control IV information of IVs that have been elimiated by it.
> IVOPTs fails to properly release that information as scev_reset
> just resets ->nb_iterations but not control-IVs.
>
> A proper fix is to avoid doing the above for each loop and instead
> delay IV def removal until IVOPTs has finished and there ensure
> also possibly invalidated control-IVs are released.
>
> Bootstrap & regtest running on x86_64-unknown-linux-gnu.
>
> IMHO this is the proper fix, I'll test and install also a patch
> restoring defensive checks that avoided the ICE before.
>
> Slightly safe might be to prune control-IVs where we do
> scev_reset () now instead of delaying DEF removal. I'm only 99%
> sure IVOPTs, when processing outer loops, is not affected by
> the dead IVs being still in the IL (all uses are already updated
> but feeding defs are not elimiated either).
>
> Bin?
Applied as rev. 269914.
Richard.