
#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 AndreasK):
- Find a good layout algorithm which can make use of partial information. There are descriptions for algorithms which work with full information about block entry counts. But Implementing one which works well on partial information is something I couldn't find anything on yet. Rolling my own is not out of the question but seems like something for a few weeks and not a few days. * Chose a design for lowering likelyhood information to the asm level. How isn't yet clear. Annotate the instructions? Add information about blocks in a sidechannel? It's also not static since things like the register allocator also generate new blocks on the fly. Shortcutting might remove blocks and so on. * Besides block layout if we lower that information it should also be used by the register allocators.
It wrote up a patch for #15124 (Phab:D4726) which implements a new code layout algorithm. Putting the implementation for likelyhood detection (Phab:D4327) on top of the new layout code lead to runtime improvements of about -0.7%. However until I have verified these results on another machine I wouldn't consider them actionable. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14672#comment:17 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler