
#14677: Code generator does not correctly tag a pointer -------------------------------------+------------------------------------- Reporter: simonpj | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 8.2.2 Resolution: | Keywords: CodeGen Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: 15155 | Blocking: 14626 Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by simonpj): If you didn't have that `{-# NOINLINE a #-}`, then the `IND_STATIC` would point directly to `a1_closure`, and would be correctly tagged. And in general, absent `{-# NOINLINE #-}` directives, I believe that all that cases your patch optimises would be optimised by the simplifier to get the code you want. So that seems to narrow the scope of the optimisation considerably: * You save code-size on many (or perhaps all?) `IND_STATIC` closures. * You save entering any such `IND_STATIC`s that are marked `NOINLINE`. So yes, it's an improvement, but I wonder whether it's worth the extra code and maintenance burden? I'm thinking of someone looking at this code in 5 yrs time. Do you think it is? Thanks for doing this -- I'm not criticising, just trying to understand with precision what is and is not happening. Clarity is good! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/14677#comment:33 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler