?
Solved

Interprocedural and multi-file object files...

Posted on 2005-03-04
2
Medium Priority
?
157 Views
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?
0
Comment
Question by:IAmATeddyBear
2 Comments
 
LVL 22

Accepted Solution

by:
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.  

0
 

Author Comment

by:IAmATeddyBear
ID: 13466854
OK.
Thanks a lot.
0

Featured Post

Become an Android App Developer

Ready to kick start your career in 2018? Learn how to build an Android app in January’s Course of the Month and open the door to new opportunities.

Question has a verified solution.

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

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
Suggested Courses

579 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