This is the mail archive of the
mailing list for the GCC project.
Re: SSA vs cross jumping/tail merging
- To: Jan Hubicka <jh at suse dot cz>
- Subject: Re: SSA vs cross jumping/tail merging
- From: law at redhat dot com
- Date: Wed, 15 Aug 2001 10:11:13 -0600
- cc: Daniel Berlin <dan at cgsoftware dot com>, gcc at gcc dot gnu dot org
- Reply-To: law at redhat dot com
In message <20010815105626.F19872@atrey.karlin.mff.cuni.cz>you write:
> Hmm, I see you are running to similar issue, as reg-stack does. In that
> case we also emit code to the edges, that is (partially) equivalent for
> other edges incomming to the same block.
OK. Also note we can get this kind of stuff from gcse too, though I suspect
it's less likely than SSA to generate sequences that can be optimized via
cross jumping/tail merging.
> We do use crossjumping sucesfully to cleanup. In SSA case this should
> work well, but you need to consider drawbacks:
> 1) Crossjumping is rather expensive pass
> 2) As implemented, it breaks natural loops
OK. This is potentially bad since we'd want to zap the unwanted stuff
just after conversion back to normal form (ie before the loop optimizer
> 3) Currently it is not able to get around case, where different pseudos
> are used as temporaries in different copies of code.
Not an issue.
> 4) Overall it increases number of basic blocks, that does bad to our local
For the cases I'm looking at it will decrease the number of basic blocks.
> All problems are avoidable of course, but overall, maybe practical
> sollution can be to teach commit edge insertion to discover duplicates
> and merge them while modifying the CFG,
Possibly. And the more I hear about the state of the cross jumping code
the more I'm inclined to go this direction. Particularly since it would
potentially help insertions done by gcse and reg-stack.