
#16039: 'GHC.Magic.noinline <var>' should not float out -------------------------------------+------------------------------------- Reporter: heisenbug | Owner: heisenbug Type: bug | Status: new Priority: normal | Milestone: 8.8.1 Component: Compiler | Version: 8.2.1 Resolution: | Keywords: FloatOut Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #15155 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by heisenbug): Thanks, I did not have this `exprIsTrivial` change on my radar yet. So far I have: {{{#!hs notWorthFloating e abs_vars = go e (count isId abs_vars) where go (Var {}) n = n >= 0 go (Lit lit) n = ASSERT( n==0 ) litIsTrivial lit -- Note [Floating literals] go (Tick t e) n = not (tickishIsCode t) && go e n go (Cast e _) n = go e n go (App e arg) n | Type {} <- arg = go e n | Coercion {} <- arg = go e n | App (Var v) Type {} <- e -- added clause , v `hasKey` noinlineIdKey , is_triv arg = True | n==0 = False | is_triv arg = go e (n-1) | otherwise = False }}} `interestingDict` might need a similar treatment too. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/16039#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler