GHC.Core.Opt.Simplify.Inline

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

smallEnoughToInline :: UnfoldingOpts -> Unfolding -> Bool #

# The smart inlining decisions are made by callSiteInline

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