Interprocedural and multi-file object files...

Posted on 2005-03-04
Medium Priority
Last Modified: 2010-04-01
Help of my compiler:
Enable and specify the scope of Interprocedural (IP) Optimizations:
/Qip     enable single-file IP optimizations (within files, same as /Ob2)
/Qipo[n] enable multi-file IP optimizations (between files)
/Qipo_c  generate a multi-file object file (ipo_out.obj)
/Qipo_S  generate a multi-file assembly file (ipo_out.asm)

What is:
interprocedural (IP) Optimizations ?
and what are the advantages of multi-file object files?
Question by:IAmATeddyBear
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
LVL 22

Accepted Solution

grg99 earned 500 total points
ID: 13458852
usually whenever a compiler sees a function call, it has to stop optimizing, as it has no way of knowing what the called function is going to do with registers.

But a really smart compiler could keep track of each function it has compiled and its register usage, in order to do a better job of optimization.

Usually a compiler resets all its tables after compiling each source file.  But what if one source file calls functions in another, separately compiled source file?   The compiler normally wouldnt know anything about those externally compiled functions, so it wouldnt be able to optimize against them.

But a REALLY clever compiler could keep that information, perhaps in a comment record in the object file.  Then it just might be able to read up that comment record in order to get knowledge about that previously compiled function.

this is rather hard to do correctly--  the poor compiler has to check a whole lot of things to ensure the external function was compile din a optimization-compatible way.  


Author Comment

ID: 13466854
Thanks a lot.

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Templates For Beginners Or How To Encourage The Compiler To Work For You Introduction This tutorial is targeted at the reader who is, perhaps, familiar with the basics of C++ but would prefer a little slower introduction to the more ad…
Introduction This article is the first in a series of articles about the C/C++ Visual Studio Express debugger.  It provides a quick start guide in using the debugger. Part 2 focuses on additional topics in breakpoints.  Lastly, Part 3 focuses on th…
The viewer will learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question