This is the mail archive of the 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: [patch]Fix the aliasing on vector replacements to match the original scalar array


> Will replace with
>       FOR_EACH_SSA_TREE_OPERAND (def, stmt, iter, SSA_OP_VMAYDEF)
>         {
>           SSA_NAME_DEF_STMT (def) = *vec_stmt;
>           mark_sym_for_renaming (SSA_NAME_VAR (def));
>         }
> > 
> > Also add a comment describing why we need to mark V_MAY_DEFs for 
> renaming.
> I was very surprised that I needed to call mark_sym_for_renaming.  IIRC 
> the
> peeling done in the vectorizer renamed a v-def in the loop for which there
> was a v-use outside the loop.  The loop wasn't in loop-closed form, i.e., 
> there
> wasn't a PHI node v-def.outside = v-def.inside in the exit block.  I think 
> the
> modifications done by peeling try to update PHI nodes in exit blocks 
> because
> it assumes loop-closed form but looks no further.  Calling 
> mark_sym_for_renaming
> cleared up the problem.  I'll see if I can find the test again that caused 
> me
> to add the call to mark_sym_for_renaming just to make sure.

virtual operands are no longer in loop closed ssa form; thus all the
virtual defs inside loop must be marked for ssa update.


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