This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [RFC] By default if-convert only basic blocks that will be vectorized (take 4)
- From: Jakub Jelinek <jakub at redhat dot com>
- To: Sergey Ostanevich <sergos dot gnu at gmail dot com>
- Cc: Richard Biener <rguenther at suse dot de>, "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 24 Oct 2013 13:14:39 +0200
- Subject: Re: [RFC] By default if-convert only basic blocks that will be vectorized (take 4)
- Authentication-results: sourceware.org; auth=none
- References: <20131015123225 dot GO30970 at tucnak dot zalov dot cz> <20131017165556 dot GI30970 at tucnak dot zalov dot cz> <CAGYS_TLmaUXpnEh9oZ8uyX-NT-niFFnQDA=T=zpYXSR9W8CgEg at mail dot gmail dot com> <20131022105614 dot GK30970 at tucnak dot zalov dot cz> <CAGYS_TLTdBm6d-iL=-Nex4SrPTni6Q6Z+MDuS7fjnCKiUM4=7A at mail dot gmail dot com> <CAGYS_TLjBfd6bLLh5Tc8Bysa9OXYdxfKKf_PgrqnPLpqJrrv2w at mail dot gmail dot com> <20131022132658 dot GM30970 at tucnak dot zalov dot cz> <CAGYS_T+UvX8YBUEpd5=vf8Xm5+kFDfY9pgsruiJ=6y=h_qEdnw at mail dot gmail dot com> <CAGYS_TJmppbJs-kbuxHnEr_swG+c1hDRg=wBywohFW=jBH8SEQ at mail dot gmail dot com> <20131023172220 dot GW30970 at tucnak dot zalov dot cz>
- Reply-to: Jakub Jelinek <jakub at redhat dot com>
On Wed, Oct 23, 2013 at 07:22:20PM +0200, Jakub Jelinek wrote:
> On Tue, Oct 22, 2013 at 08:27:54PM +0400, Sergey Ostanevich wrote:
> > still fails on 403 et al.
>
> Ok, reproduced, unfortunately the pending stmt sequences already pretty much
> assume that they will end up in a single combined basic block. I went
> through various alternatives (deferring update_ssa (TODO_update_ssa) call
> until after combine_blocks - doesn't work, because it is unhappy about
> basic blocks being removed, temporarily putting all the stmts into latch
> (doesn't work, because there are no PHIs for it in the loop), so the final
> fix as discussed with Richard on IRC is not to predicate_bbs early before
> versioning (unless -ftree-loop-if-convert-stores it is easily achievable
> by just using a better dominance check for that), or for the stores stuff
> doing it and freeing again (at least for now).
>
> The predicate_bbs stuff would certainly appreciate more TLC in the future.
>
> Attaching whole new patchset, the above mentioned fix is mostly in the
> first patch (which also contains a tree-cfg.h include that is needed for
> today's header reshufling), the other two patches are just tweaked to
> apply on top of that. All 3 patches together have been
> bootstrapped/regtested on x86_64-linux and i686-linux, the first one
> and first+second just compile time tested.
BTW, to test the effect of not disabling if-conversion for non-vectorized
loops unless there were conditional loads/stores, instead of patching
you could just test with additional -ftree-loop-if-convert I guess.
Jakub