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: [tree-ssa] 'out_of_ssa_tag' question


On Wed, 2003-12-31 at 14:18, Devang Patel wrote:
> On Dec 31, 2003, at 8:19 AM, Diego Novillo wrote:
> 
> >> OR am I taking wrong path by going in and out of SSA form for this 
> >> loop
> >> transformation? Is it better to take care of SSA vars and phi nodes
> >> while copying loop body ?
> >>
> > Well, it does seem a bit heavy handed.  Maybe a better alternative 
> > would
> > be to just mark the affected variables for renaming.  So, you duplicate
> > the loop, insert all the variables referenced in the loop in the
> > vars_to_rename bitmap, and then call rewrite_into_ssa.
> 
> One problem with this approach is that candidate variable is referenced
> in two loops and we want to rename only one. OR we want to inform ssa
> renaming pass that they are different vars with same name.
> 
Different vars with the same name?  As in different VAR_DECLs with
*different* UIDs?  If they are different VAR_DECLs, they'd better have
different UIDs.  If you used add_referenced_tmp_var() then you should be
OK.

Marking one of them for renaming won't affect the other.  Now, if both
have the same UID and they're different variables, that will give you
headaches down the road.


Diego.


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