[Git][ghc/ghc][wip/T23109a] Always try rules and inlining before simplifying args

Simon Peyton Jones pushed to branch wip/T23109a at Glasgow Haskell Compiler / GHC Commits: 29117fad by Simon Peyton Jones at 2025-05-16T07:41:41-04:00 Always try rules and inlining before simplifying args - - - - - 1 changed file: - compiler/GHC/Core/Opt/Simplify/Iteration.hs Changes: ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -2349,12 +2349,15 @@ simplOutId env fun cont -- If we are not in the first iteration, we have already tried rules and inlining -- at the end of the previous iteration; no need to repeat that - ; if not (sm_first_iter (seMode env)) - then rebuildCall env arg_info cont - else +-- ; if not (sm_first_iter (seMode env)) +-- then rebuildCall env arg_info cont +-- else +-- Do this BEFORE so that we can take advantage of single-occ inlines +-- Example: T21839c which takes an extra Simplifier iteration after w/w +-- if you don't do this -- Try rewrite rules: Plan (BEFORE) in Note [When to apply rewrite rules] - do { mb_match <- if not (null rules_for_me) && + ; mb_match <- if not (null rules_for_me) && (isClassOpId fun || activeUnfolding (seMode env) fun) then tryRules env rules_for_me fun out_args else return Nothing @@ -2372,7 +2375,7 @@ simplOutId env fun cont -- Neither worked, so just rebuild rebuildCall env arg_info cont - } } } } } + } } } } --------------------------------------------------------- -- Dealing with a call site View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/29117fad96e827f1768ca0ac2ba81192... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/29117fad96e827f1768ca0ac2ba81192... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Simon Peyton Jones (@simonpj)