SSA vs cross jumping/tail merging
law@redhat.com
law@redhat.com
Wed Aug 15 09:09:00 GMT 2001
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
OK.
> 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
runs).
> 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
> optimizers.
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.
jeff
More information about the Gcc
mailing list