GHC.Core.Opt.Simplify.Inline

ghc-9.10.0.20240426: The GHC API

Safe Haskell | None
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
- callSiteInline :: Logger -> UnfoldingOpts -> Int -> Id -> Bool -> 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 #

# The smart inlining decisions are made by callSiteInline

callSiteInline :: Logger -> UnfoldingOpts -> Int -> Id -> Bool -> 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 #