This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Jump threading in tree dom pass prevents if-conversion & following vectorization
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Bingfeng Mei <bmei at broadcom dot com>
- Cc: Jeff Law <law at redhat dot com>, Andrew Pinski <pinskia at gmail dot com>, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Mon, 25 Nov 2013 10:37:54 +0100
- Subject: Re: Jump threading in tree dom pass prevents if-conversion & following vectorization
- Authentication-results: sourceware.org; auth=none
- References: <B71DF1153024A14EABB94E39368E44A60420FE4A at SJEXCHMB13 dot corp dot ad dot broadcom dot com> <CA+=Sn1=1-k_0wBwMi=xhHERr+MBwgTr=8DnqZn_xQLXEn4wNoA at mail dot gmail dot com> <B71DF1153024A14EABB94E39368E44A604210476 at SJEXCHMB13 dot corp dot ad dot broadcom dot com> <528F8D13 dot 4070703 at redhat dot com> <B71DF1153024A14EABB94E39368E44A604210907 at SJEXCHMB13 dot corp dot ad dot broadcom dot com>
On Fri, Nov 22, 2013 at 6:13 PM, Bingfeng Mei <bmei@broadcom.com> wrote:
> So if we are about to fix this in if-conversion, we need to do both in tree & rtl as both ifcvt & ce passes cannot handle it.
>
> I am still not convinced jump threading is good for target with predicated execution (assuming no fix for if-conversion). I am doing benchmarking on our target now.
Note that the GIMPLE if-conversion issue is simply a stupidity in its
implementation (not a trivial change to fix unless you want to split
critical edges just for sake of its analysis(!) phase).
Richard.
> Bingfeng
>
> -----Original Message-----
> From: Jeff Law [mailto:law@redhat.com]
> Sent: 22 November 2013 16:58
> To: Bingfeng Mei; Andrew Pinski
> Cc: gcc@gcc.gnu.org
> Subject: Re: Jump threading in tree dom pass prevents if-conversion & following vectorization
>
> On 11/22/13 04:03, Bingfeng Mei wrote:
>> Well, in your modified example, it is still due to jump threading that produce
>> code of bad control flow that cannot be if-converted and vectorized, though in
>> tree-vrp pass this time.
>>
>> Try this
>> ~/install-4.8/bin/gcc vect-ifconv-2.c -O2 -fdump-tree-ifcvt-details -ftree-vectorize -save-temps -fno-tree-vrp
>>
>> The code can be vectorized.
>>
>> Grep "threading" in gcc, it seems that dom and vrp passes are two places that apply
>> jump threading. Any other place? I think we need an target hook to control it.
> No no. The right thing to do is fix if-conversion.
>
> jeff
>
>