[PATCH, PR 32824] Add an additional LIM pass to assist dead code elimination

Fang, Changpeng Changpeng.Fang@amd.com
Tue Mar 16 16:00:00 GMT 2010


Hi, Richard:

Moving the current LIM before the copyprop/dce is fine to remove the dead code and
vectorize the loop. However, there are some corner cases that copyprop will help LIM.

Anyway, I think your suggestion is better. I am going to run some tests on it and re-propose
the patch like that.

Thanks,

Changpeng


________________________________________
From: Richard Guenther [richard.guenther@gmail.com]
Sent: Tuesday, March 16, 2010 5:24 AM
To: Fang, Changpeng
Cc: gcc-patches@gcc.gnu.org; rakdver@gcc.gnu.org; spop@gcc.gnu.org
Subject: Re: [PATCH, PR 32824] Add an additional LIM pass to assist dead code   elimination

On Mon, Mar 15, 2010 at 10:14 PM, Fang, Changpeng
<Changpeng.Fang@amd.com> wrote:
> This patch fixes bug 32824: Missed reduction vectorizer after store to global is LIM'd
>
> Patch Description:
> After store to global is LIM'ed, we need a copy propagation and dead code elimination to eliminate
> the dead store in the loop, and thus make the reduction vectorizable. In this patch, I added an additional LIM
> pass at the very beginning of the loop optimizer, then the dead code can be eliminated by pass_dce_loop
> before the vectorizer.
>
> With this patch, the related fortran code (refer to bug 32824 report) can also be vectorized.
>
> I have bootstrapped gcc with the patch and compiled and spec cpu2006 and found no apparent regression
> in both compilation time and spec scores.

I'm not too keen on adding another expensive pass like LIM.  Did you
try simply moving the existing LIM pass before copyprop/dce?

Thanks,
Richard.

> Thanks,
>
> Changpeng
>
>




More information about the Gcc-patches mailing list