[GHC] #12659: Unactionable core lint warning due to floating out
GHC
ghc-devs at haskell.org
Tue Oct 4 11:23:35 UTC 2016
#12659: Unactionable core lint warning due to floating out
-------------------------------------+-------------------------------------
Reporter: mpickering | Owner:
Type: bug | Status: new
Priority: low | Milestone:
Component: Compiler | Version: 8.0.1
Keywords: newcomer | Operating System: Unknown/Multiple
Architecture: | Type of failure: None/Unknown
Unknown/Multiple |
Test Case: | Blocked By:
Blocking: | Related Tickets:
Differential Rev(s): | Wiki Page:
-------------------------------------+-------------------------------------
I was looking through the build log to try and make it a bit less noisy by
removing some warnings. There were quite a lot of core lint warnings which
complain about INLINE progams on loop breakers. However,
sometimes these bindings are not marked INLINE at the source level but by
GHC itself.
{{{
cmmDebugLink :: [Label] -> [DebugBlock] -> [DebugBlock]
cmmDebugLink labels blocks = map link blocks
where blockPos :: LabelMap Int
blockPos = mapFromList $ flip zip [0..] labels
link block = block { dblPosition = mapLookup (dblLabel block)
blockPos
, dblBlocks = map link (dblBlocks block)
}
}}}
For example, in this function, `link` gets floated out to the top level
and then marked as `INLINE` even though it is self-recursive. This causes
the following warning:
{{{
*** Core Lint warnings : in result of CorePrep ***
5170 <no location info>: warning:
5171 [RHS of link_slxp :: DebugBlock -> DebugBlock]
5172 INLINE binder is (non-rule) loop breaker: link_slxp
5173
}}}
But because it's generated by the compiler, there isn't a sensible way to
suppress the warning.
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/12659>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list