Q: Profile-directed optimizations
Lassi A. Tuura
Wed Sep 2 07:28:00 GMT 1998
|> Some folks might also claim #2. I'm not convinced either way on whether
|> or not profile directed feedback helps real code.
I don't know about "normal" code, but I could imagine that for C++ the
impact could be signficant if the profiler information is comprehensive
enough to let compiler reason about polymorphic features, such as
optimising virtual function calls. For example, if at some call site
the calls always or sufficiently often end up in one particular
function, compiler could turn it to a quick check and inlined virtual
function body (plus a fallback to a regular virtual call).
I believe much research has been done on this in the experimental
compiler projects at universities (I don't remember the names right now
and don't have access to my archives, but I can dig them up if somebody
wants). Some of them are whole program optimisations, though.
With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going
to land, and it could be dangerous sitting under them as they fly
overhead. --RFC1925, "The Twelve Networking Truths"
More information about the Gcc