[GHC] #12659: Unactionable core lint warning due to floating out

#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

#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 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): That's odd. Can you identify where in the compiler this INLINE pragma is getting added? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12659#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 Resolution: | Keywords: newcomer Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by mpickering): Do you have any ideas where to look? I had a brief search but it wasn't clear to me where that could happen. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12659#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 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: | -------------------------------------+------------------------------------- Changes (by mpickering): * keywords: newcomer => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12659#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#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 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: | -------------------------------------+------------------------------------- Comment (by simonpj): Well I'd start with `-dverbose-core2core` and see which pass introduces the INLINE pragma. Try that? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12659#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC