This is the mail archive of the gcc@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: Moving statements from one BB to other BB.


Hi,

> To clarify what Richard means, your assertion that "you have updated
> SSA information" is false.
> If you had updated the SSA information, the error would not occur :).
> 
> How exactly are you updating the ssa information?
> 
> The general way to update SSA for this case would be:
> 
> For each statement you have moved:
>   Call update_stmt (t);
> 
> Then call update_ssa (TODO_update_ssa) (or instead use
> rewrite_into_loop_closed_ssa if this is a loop pass).
>
> If you do not call update_stmt in this case, update_ssa won't actually
> do anything.

actually, it will not do anything even if he calls update_stmt, as the
statements that he is moving are already in ssa form, so update_stmt
will not mark anything for renaming.

IIRC what he tries to do is loop fusion, and according to the error message
that he gets, he probably needs to add the calculations of the induction
variable(s) of the original loop to the new one, and replace their uses
(or maybe just move phi nodes),

Zdenek


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