https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65177

--- Comment #12 from Sebastian Pop <spop at gcc dot gnu.org> ---
(In reply to Jeffrey A. Law from comment #11)
> That is unless the SEME copier tries to update SSA internally, but that's
> painful.

I have also tried to update the SSA only in the copied basic blocks: graphite's
code generator in sese.c does exactly that only on the path that has been
duplicated.  sese.c has its own rename_map. In SEME I was not able to access
easily the rename maps set by copy_bb: when copying statements, it sets a map
of (old_def, new_def) that are used to rename all the uses dominated by the new
definition.  We could use this rename map to rename all uses in the copied bbs.

I think it would be less painful to fix the SSA in a local way than what the
patch that I just sent out does:

> From a sequencing standpoint, you do your block copying & wire up the new
> blocks.  Then you have to remove unreachable blocks, rebuild dominators then
> update hte SSA graph.

Reply via email to