Commit e140fe3c authored by Tobias Dammers's avatar Tobias Dammers 🦈

Do not mark NOINLINE bindings as InlineStable

parent 55de5938
Pipeline #7714 passed with stages
in 347 minutes and 43 seconds
......@@ -34,7 +34,7 @@ import PprCore ( pprCoreBindings, pprRules )
import OccurAnal( occurAnalyseExpr, occurAnalysePgm )
import Literal ( Literal(LitString) )
import Id
import IdInfo ( unfoldingInfo, setUnfoldingInfo, IdInfo )
import IdInfo ( unfoldingInfo, setUnfoldingInfo, IdInfo (..) )
import Var ( isNonCoVarId )
import VarSet
import VarEnv
......@@ -566,7 +566,15 @@ add_info env old_bndr top_level new_rhs new_bndr
new_info :: IdInfo
new_info = case mb_new_info of
Just info ->
info `setUnfoldingInfo` (new_unfolding InlineStable)
case unfoldingInfo info of
NoUnfolding ->
case inlinePragInfo info of
InlinePragma { inl_inline = NoInline } ->
info `setUnfoldingInfo` (new_unfolding InlineRhs)
_ ->
info `setUnfoldingInfo` (new_unfolding InlineStable)
_ ->
info
Nothing ->
idInfo old_bndr `setUnfoldingInfo` (new_unfolding InlineRhs)
......
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=1,unsat_ok=True,boring_ok=True)}]
f = \ (@ p) _ [Occ=Dead] -> GHC.Types.True
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 80 30}]
......@@ -5,13 +5,18 @@ Result size of Desugar (after optimization)
-- RHS size: {terms: 6, types: 11, coercions: 0, joins: 0/0}
f :: forall a b. (a ~ b) => a -> b -> Bool
[LclIdX]
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True,
Guidance=ALWAYS_IF(arity=3,unsat_ok=True,boring_ok=True)}]
f = \ (@ a) (@ b) _ [Occ=Dead] _ [Occ=Dead] _ [Occ=Dead] ->
GHC.Types.True
-- RHS size: {terms: 5, types: 0, coercions: 0, joins: 0/0}
T13032.$trModule :: GHC.Types.Module
[LclIdX]
[LclIdX,
Unf=Unf{Src=<vanilla>, TopLvl=True, Value=True, ConLike=True,
WorkFree=True, Expandable=True, Guidance=IF_ARGS [] 80 30}]
T13032.$trModule
= GHC.Types.Module
(GHC.Types.TrNameS "main"#) (GHC.Types.TrNameS "T13032"#)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment