This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH]: Improve ability of PRE to detect redundancies
On Tue, Nov 30, 2004 at 11:00:24AM -0500, Daniel Berlin wrote:
> I would expect whatever is doing rematerialization would determine
> whether it wants to undo that or not :).
A solution for avoiding this "do/undo game" is to help PRE to decide
in which case to transform or not, based on accurate information.
You're clearly missing the information about the register pressure.
Would it be possible to have an analyzer at the PRE level, that
approximates the number of registers needed for a given loop?
We would need the same kind of information when applying fusion and
fission of loops, but in this case there is no pardon once it is done,
because it won't be possible to undo the transformation at RTL level.
So I'm just asking experts whether the analyzer part of reg-alloc is
feasible at GIMPLE level ;-)
> However, this is all theoretical since as i said, i've told it not to do
> that, and don't have plans to change it. I only emailed Sebastian about
> it because i noticed it created variables that we should have been able
> to analyze, but couldn't.
I suspect there are other optimizations than PRE that obfuscate the
code by creating obvious wrap-around variables.