This is the mail archive of the
mailing list for the GCC project.
Re: Can we speed up the gcc_target structure?
> On Sun, Jan 18, 2004 at 09:14:14PM +0000, Joseph S. Myers wrote:
> > When --enable-intermodule is used, does (or should) the compiler manage to
> > detect which parts of the target structure are in fact constant (even
> > without constifying)?
> I'm certain that it doesn't.
> It's not inconcievable that a compiler could not that there are
> never any writes to a structure, promote it to readonly, and then
> constant propagate the values out of that structure.
> However, that sort of optimization requires that you see the *entire*
> program, not just large parts of it, as with the current intermodule
> code. So I expect this sort of thing is relatively far away.
> One possibility is a switch that says "except for main, nothing
> outside these files reference any of the symbols herein defined."
> That might get you the same effect as whole-program optimization
> without having to have extra info about external runtime libraries.
I do have such prototype of -fwhole-program optimization. What is
preventing me from putting it into tree-SSA branch is that I don't like
the symbols that are considered local to appear as external symbols in
output object file and I am not sure whether frobbing of TREE_PUBLIC
flag is best idea around.
I also hacked up Makefiles to use it, but with our current way to do IPA
it means that all backend functions are parsed and optimized over and
over for each frontend binary that results in verly long bootstrap times
and memory consumption.
What is preventing us from declaring the structure as constant so we
should get propagation even with current design?