[GHC] #7198: New codegen more than doubles compile time of T3294
GHC
ghc-devs at haskell.org
Mon Jun 19 12:15:59 UTC 2017
#7198: New codegen more than doubles compile time of T3294
-------------------------------------+-------------------------------------
Reporter: simonmar | Owner: simonmar
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.4.2
(CodeGen) |
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
Type of failure: Compile-time | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: #4258 | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"6a2264d2bd47e993c43a592bd614ab7917184e22/ghc" 6a2264d/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="6a2264d2bd47e993c43a592bd614ab7917184e22"
cmm/CmmLayoutStack: avoid generating unnecessary reloads
This tries to be more precise when generating reloads of local
registers in proc points. Previously we'd reload all local registers
that were live. But we used liveness information that assumed local
registers survive native calls. For the purpose of reloading registers
this is an overapproximation and might lead to generating huge amounts
of unnecessary reloads (in case there's another proc point before the
register is used).
This change takes the approach of moving the generation of reloads to
a second pass over the Cmm, which allows to recompute the liveness and
can use the knowledge that local registers do *not* survive calls.
This leads to generating only useful reloads. For an extreme example
where this helps a lot please see T3294. This should also fix #7198
Finally, this re-introduces the code to do Cmm rewriting using in
`Dataflow` module (with the difference that we know operate on a whole
block at a time).
Signed-off-by: Michal Terepeta <michal.terepeta at gmail.com>
Reviewers: austin, bgamari, simonmar
Reviewed By: simonmar
Subscribers: kavon, rwbarton, thomie
GHC Trac Issues: #7198
Differential Revision: https://phabricator.haskell.org/D3586
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7198#comment:15>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list