This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: intermodule optimisation patch


> Eh?  "Only" the interprocedural optimizations?
> 
> Given that information should be used during the high-level
> optimization phases (in particular for noticing what memory
> is read/written by a function), this does in fact mean 
> starting over from near-scratch.  The only thing you get to
> skip is parsing and semantic analysis, which ought to be 
> near the bottom of the profile during optimization anyway.

I would expect that with optimizer organized in a way saving
intermediate representation after parsing and optimizing in the linker
would try hard to push local optimizations and analysis into the
"compiling pass" instead of linking, so there is some room for savings.
Doing simple constant propagation and dead code removal before global
pass would probably make sense even when it needs to be re-done later.
Additionally the saved files can be re-used when linked into multiple
files and it helps to reduce memory overhead as you don't need to keep
whole program in the memory at once.

Anyway when I would like to see GCC being able to save such intermediate
objects in future, doing intermodule optimization together with parsing
is usefull intermediate step that would give unit-at-a-time code more
sense :)

Honza
> 
> 
> 
> r~


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]