This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [tree-ssa] [RFC] loop versioning
> Hello,
>
>
> > What if I rename it to tree_duplicate_head_bb () and implement
> > new duplicate_bb() as Jan suggested ?
>
> Please avoid creating unnecessary code duplication. If you need to
> extend functionality provided by tree_duplicate_bb in some way, it would
> be probably preferable to either extend it, or use it as a subroutine and
> just add the extra functionality you need.
>
> As for Honza's suggestions, I assume he was speaking about something like
> cfglayout.c:copy_bbs.
Yes, that is what I would like to have (I forgot that we have that
function already). If we make tree_duplicate_bb a CFG hook (I will make
that patch at evening) it will run right away on SSA.
It would be nice if we were able to have companion function to update
SSA, but I will have to give it a deeper tought on whether it is
possible at all. Rewriting tracer to use it will make it magically work
on trees (uhm, once the profile bits are resolved)
Honza
>
> Zdenek