ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Core.Opt.Simplify.Inline

Contents

- Cheap and cheerful inlining checks.
- The smart inlining decisions are made by callSiteInline

Synopsis

- couldBeSmallEnoughToInline :: UnfoldingOpts -> Int -> CoreExpr -> Bool
- smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool
- activeUnfolding :: SimplMode -> Id -> Bool
- callSiteInline :: SimplEnv -> Logger -> Id -> Bool -> [ArgSummary] -> CallCtxt -> Maybe CoreExpr
- data CallCtxt
  - = BoringCtxt
  - | RhsCtxt RecFlag
  - | DiscArgCtxt
  - | RuleArgCtxt
  - | ValAppCtxt
  - | CaseCtxt

# Cheap and cheerful inlining checks.

couldBeSmallEnoughToInline :: UnfoldingOpts -> Int -> CoreExpr -> Bool #

smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool #

activeUnfolding :: SimplMode -> Id -> Bool #

# The smart inlining decisions are made by callSiteInline

callSiteInline :: SimplEnv -> Logger -> Id -> Bool -> [ArgSummary] -> CallCtxt -> Maybe CoreExpr #

data CallCtxt #

Constructors

BoringCtxt |
RhsCtxt RecFlag |
DiscArgCtxt |
RuleArgCtxt |
ValAppCtxt |
CaseCtxt |

#### Instances

Instances details

Outputable CallCtxt # |
Instance details Defined in GHC.Core.Unfold Methods ppr :: CallCtxt -> SDoc #