This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH,4.2] Use edge probabilities to control speculation in interblockscheduler


The interblock instruction scheduler computes static probabilities for
reaching the blocks of the region being scheduled.  It starts at the region
entry point with an assumed probability of 100% and distributes that
downward to the other blocks of the region, equally dividing the
probability amongst successor blocks, and assuming a small rate of escape
along paths that exit the region.  The scheduler uses these computed block
probabilities to determine the potential usefulness of speculatively moving
an instruction from one block to another.

A more accurate way to distribute the probability is to make use of the
edge probability data in the control flow graph.  In the absence of FDO,
the edge probabilities are set by static branch prediction.  When FDO data
is present, the actual counts are used to set the edge probabilities.

Using this approach gives the interblock scheduler a more accurate view of
the hot paths through the region and results in smarter decisions as to
which paths should be favored for speculative motions, and which paths
should be avoided.

Performance tests show that the generated code using edge probabilities
behaves equally well or better on PowerPC.

Bootstrapped and regtested on powerpc64-unknown-linux-gnu with no failures.

Ok for 4.2? .. could be considered for 4.1 since the code impact is minimal
and there is potential for improved performance.

Pete.
(See attached file: patch.use-edge-probabilities)

Attachment: patch.use-edge-probabilities
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]