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: How do I modify SSA and copy basic blocks?


On Thu, 2013-04-25 at 09:53 +0200, Richard Biener wrote:

> > Interesting you should mention this; one of the things I really want to get
> > back to is a more generic mechanism to copy block regions.
> 
> We have gimple_duplicate_sese_region for this.  It may be not perfect though.
> Eventually it should be changed to handle SEME regions as well and all
> loop copying / versioning code should use it as well (though I don't think
> any of the loop copying / versioning code handles multiple exits).
> 
> I've slowly started to move us in this direction by removing duplicate
> functionality
> in the compiler as I come along it ...
> 
> Richard.

This looks interesting.  If it handled SEME regions I think I could use
it because any single block by itself is going to be an SEME region,
right?  I notice the routine does not update the SSA web.  Is there a
reason for that?  It looks like copy_loop_headers calls update_ssa after
it calls gimple_duplicate_sese_region (the only use of
gimple_duplicate_sese_region that I see).  Unfortunately, at least some
of the blocks I want to copy have multiple exit edges where an SSA
variable defined in that block is needed on each of the exit edges from
the block.  Do you know what bad things will happen if I call this with
a block that is SEME instead of SESE?  Is there anyway (even if it was a
hack) that I could compensate for it by regenerating some of the
information, i.e. freeing the dominator information so it gets
recalculated from scratch or something like that?

Steve Ellcey
sellcey@imgtec.com



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