[GHC] #14672: Make likelyhood of branches/conditions available throughout the compiler.
GHC
ghc-devs at haskell.org
Tue Jan 30 15:18:09 UTC 2018
#14672: Make likelyhood of branches/conditions available throughout the compiler.
-------------------------------------+-------------------------------------
Reporter: AndreasK | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.2.2
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s): Phab:D4316
Wiki Page: | Phab:D4324 Phab:D4327
-------------------------------------+-------------------------------------
Comment (by svenpanne):
Just a general remark: [https://phabricator.haskell.org/D4327 D4327] talks
about annotations as a source of likelihood values, which is fine, but
having actual data from previous runs, i.e. using profile-guided
optimization, would probably have much more potential. Humans are
notoriously bad at guessing what actually eats performace, so manual
annotations can only get you so far.
As an example: The performance of the CPython interpreter itself increases
by roughly 10% if it is compiled with PGO and LTO (link-time
optimization), see e.g.
* https://bugs.python.org/issue24915
* https://www.activestate.com/blog/2014/06/python-performance-boost-
using-profile-guided-optimization
Of course the effect of PGO heavily depends on the actual program and the
programming language, but I think it is something which should be
considered in the long run. Perhaps our LLVM backend already has some
(relatively) easy way to make profile data available to the LLVM pipeline,
but I might be wrong here.
https://msdn.microsoft.com/en-us/library/e7k32f4k.aspx lists a few PGOs,
and some are definitely worthwhile for GHC, e.g. using profile data in the
register allocator to decide which registers to spill etc.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/14672#comment:8>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list