Author: Steve LionelSteve Lionel Date: Apr 10, 2008 13:51
On Thu, 10 Apr 2008 14:38:28 GMT, Charles Coldwell gmail.com> wrote:
>So it looks to me like the compiler is trying to do branch prediction,
>but how is this information transmitted to the hardware?
It's not.
>Is ifort really guessing what the branch prediction hardware is going to do for purposes
>of optimization?
Well, I would say that the compiler is guessing on its own what the branch
probability is for purpose of optimization. The hardware is not static, it
can take into account actual behavior (if this branch was taken before, it's
likely to be taken again, etc.)
The compiler does flow analysis to determine how to lay out code for
optimization. It uses its own branch prediction, or profile-guided feedback
if available, to make these decisions. It can also affect register allocation
and inlining decisions.
--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH
|