This is the mail archive of the
mailing list for the GCC project.
Re: gcse, store motion and loop optimizer
> Making induction variables global is bad news. I'll check whether that
> is happening in the samples I sent; if changing the source to make the
> induction variables local solves the problem, I'll be satisified. I'd
It don't seems to be dificult to teach gcc to grok them. Load/store motion does
the trick, basically all we need is to sanize load/store motion output.
Looking at that more, there are few thinks that confuse loop optimizer,
basically the dummy register temporaries (code like:
(set (reg A) (expression))
(set (reg B) (reg A)) reg A dies here.
This is arteface of memory store, where such code makes sense, for registers
it does not. All I need is to utilize loglinks and lifeness information
to fix that, but for that I need life information safe at loop optimizer
Mark has tried that, but it iddn't work, as the REG_EQUAL notes get
messed up. I will try to paper around that issue.
> even consider it good for the compiler to warn in -Wall -O mode if that
> happens, and to indicate that it disables optimization. If it happens
It does not disable and making warning is somewhat dificult, as we
detect the case relativly late in loop optimizer and we are likely going
to lost track what is going on.
> in SPEC, I'm sure many compilers fail to optimize that. Does this
> answer part of your question?