[GHC] #12650: Too many warnings about consistentCafInfo (was: Too many warnigns about consistentCafInfo)
GHC
ghc-devs at haskell.org
Tue Apr 4 09:19:34 UTC 2017
#12650: Too many warnings about consistentCafInfo
-------------------------------------+-------------------------------------
Reporter: nomeata | Owner: (none)
Type: task | Status: new
Priority: normal | Milestone:
Component: Compiler | Version: 8.0.1
Resolution: | Keywords:
Operating System: Unknown/Multiple | Architecture:
| Unknown/Multiple
Type of failure: None/Unknown | Test Case:
Blocked By: | Blocking:
Related Tickets: | Differential Rev(s):
Wiki Page: |
-------------------------------------+-------------------------------------
Description changed by mpickering:
Old description:
> Building GHC with debug on yiedls in many (97!) warnings of the form
> {{{
> WARNING: file compiler/stgSyn/CoreToStg.hs, line 252
> $fFunctorIOEnv True False
> }}}
>
> The code in question is
> {{{
> -- Assertion helper: this checks that the CafInfo on the Id matches
> -- what CoreToStg has figured out about the binding's SRT. The
> -- CafInfo will be exact in all cases except when CorePrep has
> -- floated out a binding, in which case it will be approximate.
> consistentCafInfo :: Id -> GenStgBinding Var Id -> Bool
> consistentCafInfo id bind
> = WARN( not (exact || is_sat_thing) , ppr id <+> ppr id_marked_caffy
> <+> ppr binding_is_caffy )
> safe
> where
> safe = id_marked_caffy || not binding_is_caffy
> exact = id_marked_caffy == binding_is_caffy
> id_marked_caffy = mayHaveCafRefs (idCafInfo id)
> binding_is_caffy = topStgBindHasCafRefs bind
> is_sat_thing = occNameFS (nameOccName (idName id)) == fsLit "sat"
> }}}
>
> It would be nice to have less warnings, to make them more useful. I don’t
> know if the warning is not right, or if there is something that can be
> fixed about the thing it is warning about.
New description:
Building GHC with debug on yields in many (97!) warnings of the form
{{{
WARNING: file compiler/stgSyn/CoreToStg.hs, line 252
$fFunctorIOEnv True False
}}}
The code in question is
{{{
-- Assertion helper: this checks that the CafInfo on the Id matches
-- what CoreToStg has figured out about the binding's SRT. The
-- CafInfo will be exact in all cases except when CorePrep has
-- floated out a binding, in which case it will be approximate.
consistentCafInfo :: Id -> GenStgBinding Var Id -> Bool
consistentCafInfo id bind
= WARN( not (exact || is_sat_thing) , ppr id <+> ppr id_marked_caffy <+>
ppr binding_is_caffy )
safe
where
safe = id_marked_caffy || not binding_is_caffy
exact = id_marked_caffy == binding_is_caffy
id_marked_caffy = mayHaveCafRefs (idCafInfo id)
binding_is_caffy = topStgBindHasCafRefs bind
is_sat_thing = occNameFS (nameOccName (idName id)) == fsLit "sat"
}}}
It would be nice to have less warnings, to make them more useful. I don’t
know if the warning is not right, or if there is something that can be
fixed about the thing it is warning about.
--
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12650#comment:4>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list