|Is interprocedural optimization worth it? firstname.lastname@example.org (Dmitry Shaporenkov) (2002-03-31)|
|Re: Is interprocedural optimization worth it? email@example.com (Mark Lacey \[MSFT\]) (2002-04-06)|
|From:||"Mark Lacey \[MSFT\]" <firstname.lastname@example.org>|
|Date:||6 Apr 2002 23:15:00 -0500|
|Posted-Date:||06 Apr 2002 23:15:00 EST|
It's a difficult question to answer without knowing what architecture
you're generating code for, and what interproc optimizations you're
considering. Not having access to the entire code generator can
definitely be a significant drawback.
The latest revision of the Microsoft Visual C++ compiler does
whole-program optimization at link-time. See:
http://www.codeproject.com/tips/gloption.asp for more information.
My experience from having worked on this definitely showed that
inlining across the entire program can often be a big win, but it can
be relatively hard to tune this inlining without profile information
being available. It can also be a big loss if not tuned properly (in
particular inlining very agressively, on all but the smallest
programs, tends to blow the I-cache out so badly that it's an overall
Improved memory disambiguation can have a large effect on
architectures where you have a lot of registers (like IA-64) but less
of an effect on architectures where you have very few registers (like
You may want to consider referencing one of the recent compiler texts
and the papers referenced in those texts before embarking on a
detailed design or implementation. Muchnick's book (Advanced Compiler
Design and Implementation) has a chapter on interprocedural
optimizations and if it's like the rest of the book (sorry, don't have
it handy) it should have a lot of references.
mlacey at microsoft dot com
Microsoft Visual C++ Program Management
"Dmitry Shaporenkov" <email@example.com> wrote in message
> My question is, does anybody know the successful examples of
> interprocedural optimizers in modern C compilers, commercial or free?
> Or, aliasing problems and procedure boundaries are too hard obstacles
> to make such optimizations really useful (on the other hand, is it
> better to inline as much code as possible)? It would also be
> interesting which interprocedural optimizations are performed in
> compilers, and which of them produce best results?
Return to the
Search the comp.compilers archives again.