This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: rfa: vectorize strided loads [2/2] [PR 18437]


On Tue, Apr 10, 2012 at 6:05 PM, Michael Matz <matz@suse.de> wrote:
> Hi,
>
> On Tue, 10 Apr 2012, Richard Guenther wrote:
>
>> > + ? ? ? ? vec_inv = build_constructor (vectype, v);
>> > + ? ? ? ? new_temp = vect_init_vector (stmt, vec_inv, vectype, gsi);
>> > + ? ? ? ? new_stmt = SSA_NAME_DEF_STMT (new_temp);
>> > + ? ? ? ? mark_symbols_for_renaming (new_stmt);
>>
>> This should not be necessary - in fact please manually set the proper
>> VUSE here.
>
> I don't see how I could know the right VUSE. ?It might not even exist yet.
> Reusing the existing vuse from the load that is replaced isn't correct.
> Consider that there are (unrelated) stores or calls before the load, and
> those are vectorized. ?When updating their operands they'll get a new
> vdef, and I'd need to use _that_ one:
>
> original:
> ?#vdef MEM_1
> ?scalar_store = .... ?(this insn will be removed by vectorizable_store)
> ?#vuse MEM_1
> ?... = A[i]
>
> --->
>
> ?#vdef MEM ? (note, no ssaname yet)
> ?vect_store = ...
> ?#vuse MEM_1
> ?... = A[i] ?( will be later removed as unused LHS)
> ?#vuse XXX
> ?... = A[i]
> ?#vuse XXX
> ?... = A[i+stride]
>
> So, which SSA name to use for XXX, when the vect_store doesn't yet know
> (which it doesn't).
>
> Tracking (and generating) proper VDEF SSA names is possible (we only
> vectorize a single BB, and that in stmt order), but that requires some
> rework of the vectorizer main loops, which should be a separate patch.
> Agreed?

Yeah, ok.  Still the renaming is not necessary here, the operand scanner
does that automagically.  The vectorizer forcefully rewrites virtual SSA form
anyways :/

Richard.

>
> Ciao,
> Michael.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]