[GHC] #9279: Local wrapper function remains in final program; result = extra closure allocation
GHC
ghc-devs at haskell.org
Mon Sep 10 11:14:13 UTC 2018
#9279: Local wrapper function remains in final program; result = extra closure
allocation
-------------------------------------+-------------------------------------
Reporter: simonmar | Owner: simonpj
Type: bug | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 7.8.2
Resolution: | Keywords: LateLamLift
Operating System: Unknown/Multiple | Architecture:
Type of failure: Runtime | Unknown/Multiple
performance bug | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by sgraf):
If I apply this diff
{{{
diff --git a/compiler/basicTypes/Literal.hs
b/compiler/basicTypes/Literal.hs
index 21f4a92290..4444f69c7b 100644
--- a/compiler/basicTypes/Literal.hs
+++ b/compiler/basicTypes/Literal.hs
@@ -618,6 +618,8 @@ absentLiteralOf tc = lookupUFM absent_lits (tyConName
tc)
absent_lits :: UniqFM Literal
absent_lits = listToUFM [ (addrPrimTyConKey, MachNullAddr)
+ , (mutVarPrimTyConKey, MachNullAddr)
+ , (tVarPrimTyConKey, MachNullAddr)
, (charPrimTyConKey, MachChar 'x')
, (intPrimTyConKey, mkMachIntUnchecked 0)
, (int64PrimTyConKey, mkMachInt64Unchecked 0)
}}}
Everything WWs properly and the troubling binding `$wlvl` gets lifted to
top-level. Given that this might bite somewhere else, should we maybe
generalise `absentLiteralOf` by returning `MachNullAddr` whenever it gets
a boxed type?
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9279#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list