ghc-lib-parser-9.12.2.20250421: 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 Source #

smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool Source #

activeUnfolding :: SimplMode -> Id -> Bool Source #

# The smart inlining decisions are made by callSiteInline

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

data CallCtxt Source #

Constructors

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

#### Instances

Instances details

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