- ------------- First try rules ----------------
- -- Do this before trying inlining. Some functions have
- -- rules *and* are strict; in this case, we don't want to
- -- inline the wrapper of the non-specialised thing; better
- -- to call the specialised thing instead.
- --
- -- We used to use the black-listing mechanism to ensure that inlining of
- -- the wrapper didn't occur for things that have specialisations till a
- -- later phase, so but now we just try RULES first
- --
- -- See also Note [Rules for recursive functions]
- ; rule_base <- getSimplRules
- ; let rules = getRules rule_base var
- ; mb_rule <- tryRules env var rules args call_cont
- ; case mb_rule of {
- Just (n_args, rule_rhs) -> simplExprF env rule_rhs (dropArgs n_args cont) ;
- -- The ruleArity says how many args the rule consumed
- ; Nothing -> do -- No rules
-
-
- ------------- Next try inlining ----------------
- { dflags <- getDOptsSmpl
- ; let arg_infos = [interestingArg arg | arg <- args, isValArg arg]
- n_val_args = length arg_infos
- interesting_cont = interestingCallContext call_cont
- active_inline = activeInline env var
- maybe_inline = callSiteInline dflags active_inline var
- (null args) arg_infos interesting_cont
+ arg_infos = [interestingArg arg | arg <- args, isValArg arg]
+ n_val_args = length arg_infos
+ interesting_cont = interestingCallContext call_cont
+ active_inline = activeInline env var
+ maybe_inline = callSiteInline dflags active_inline var
+ (null args) arg_infos interesting_cont