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=<S,U>] :: Maybe Integer) -> scc<bar> let { ds_s2rs [Dmd=<S(SS),U(U,U)>] :: (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=<S(SS),U(U,U)>] :: (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<bar.(...)> split n_a1Gx m_a1Gy } in case ds_s2rs of ww_s2sc { (ww_s2sd [Dmd=<S,U>], ww_s2se [Dmd=<S,U>]) -> (ww_s2sd, ww_s2se) } in plus_noinline (scc<bar.y> case ds_s2rs of { (y_a2pz [Dmd=<S,U>], z_a2pB [Dmd=<L,A>]) -> y_a2pz }) (scc<bar.z> case ds_s2rs of { (y_a2pz [Dmd=<L,A>], z_a2pB [Dmd=<S,U>]) -> z_a2pB }) }}} after: {{{ bar = \ (n_a1Gx :: Integer) (m_a1Gy :: Maybe Integer) -> scc<bar> case scc<bar.(...)> split n_a1Gx m_a1Gy of { (ww_s2sd [Dmd=<S,U>], ww_s2se [Dmd=<S,U>]) -> 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<bar.(...)> case B.$wsplit n_s4uS (GHC.Base.Nothing @ Integer) of { (# ww1_s2sg, ww2_s2sh #) -> (ww1_s2sg, ww2_s2sh) } main_s37c :: String [LclId, Unf=Unf{Src=<vanilla>, TopLvl=True, Value=False, ConLike=False, WorkFree=False, Expandable=False, Guidance=IF_ARGS [] 110 30}] main_s37c = case GHC.Show.$w$cshowsPrec4 0# (scc<bar> plus_noinline (scc<bar.y> case ds_s4uU of { (y_a2pz [Dmd=<S,U>], z_a2pB [Dmd=<L,A>]) -> y_a2pz }) (scc<bar.z> case ds_s4uU of { (y_a2pz [Dmd=<L,A>], z_a2pB [Dmd=<S,U>]) -> 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