Re: [GHC] #5889: -fno-prof-count-entries leads to linking errors

#5889: -fno-prof-count-entries leads to linking errors
-------------------------------------+-------------------------------------
Reporter: akio | Owner: bgamari
Type: bug | Status: new
Priority: highest | Milestone: 8.4.1
Component: Compiler | Version: 8.3
Resolution: | Keywords:
Operating System: Linux | Architecture: x86_64
| (amd64)
Type of failure: GHC rejects | Test Case:
valid program | profiling/should_compile/T5889
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Comment (by osa1):
I just checked what simplifier pass optimizes these cost centers in the
definition site, and then checked why the same pass does not optimize the
same way in the use site. The pass is `post-worker-wrapper`. Before the
pass `bar` looks like this:
{{{
bar
= \ (n_a1Gx :: Integer) (m_a1Gy [Dmd=] :: Maybe Integer) ->
scc<bar>
let {
ds_s2rs [Dmd=] :: (Integer, Integer)
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 30
0}]
ds_s2rs
= let {
ds_s2rs [Dmd=] :: (Integer, Integer)
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=False, Value=False,
ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS
[] 30 0}]
ds_s2rs = scc], ww_s2se [Dmd=]) ->
(ww_s2sd, ww_s2se)
} in
plus_noinline
(scc], z_a2pB [Dmd=]) ->
z_a2pB
})
}}}
after:
{{{
bar
= \ (n_a1Gx :: Integer) (m_a1Gy :: Maybe Integer) ->
scc<bar>
case scc], ww_s2se [Dmd=]) ->
plus_noinline ww_s2sd ww_s2se
}
}}}
The same pass in `A` does nothing. The program before and after the pass
looks like this:
{{{
ds_s4uU :: (Integer, Integer)
[LclId,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False,
WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 50 30}]
ds_s4uU
= scc<bar>
scc], z_a2pB [Dmd=])
->
z_a2pB
}))
(GHC.Types.[] @ Char)
of
{ (# ww3_a376, ww4_a377 #) ->
GHC.Types.: @ Char ww3_a376 ww4_a377
}
}}}
--
Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/5889#comment:20
GHC http://www.haskell.org/ghc/
The Glasgow Haskell Compiler
participants (1)
-
GHC