bottomIsGuaranteed, workerExists,
)
import CoreSyn ( CoreExpr, CoreBinding, GenCoreExpr, GenCoreBinding(..) )
-import CoreUnfold ( calcUnfoldingGuidance, UnfoldingGuidance(..), Unfolding )
+import CoreUnfold ( calcUnfoldingGuidance, UnfoldingGuidance(..), Unfolding,
+ okToUnfoldInHiFile
+ )
import FreeVars ( exprFreeVars )
import Name ( isLocallyDefined, isWiredInName, modAndOcc, nameModule, pprOccName,
OccName, occNameString, nameOccName, nameString, isExported,
unfolding_is_ok
= case inline_pragma of
- IMustBeINLINEd -> True
- IWantToBeINLINEd -> True
+ IMustBeINLINEd -> definitely_ok_to_unfold
+ IWantToBeINLINEd -> definitely_ok_to_unfold
IDontWantToBeINLINEd -> False
IMustNotBeINLINEd -> False
NoPragmaInfo -> case guidance of
UnfoldNever -> False -- Too big
- other -> True
+ other -> definitely_ok_to_unfold
+ definitely_ok_to_unfold = okToUnfoldInHiFile rhs
guidance = calcUnfoldingGuidance opt_InterfaceUnfoldThreshold rhs
------------ Specialisations --------------