[Git][ghc/ghc][wip/andreask/inlineable-threshold] Try never updating unfolding guidance

Andreas Klebinger (@AndreasK) gitlab at gitlab.haskell.org
Fri Dec 30 00:24:35 UTC 2022



Andreas Klebinger pushed to branch wip/andreask/inlineable-threshold at Glasgow Haskell Compiler / GHC


Commits:
982094e2 by Andreas Klebinger at 2022-12-30T01:23:18+01:00
Try never updating unfolding guidance

- - - - -


1 changed file:

- compiler/GHC/Core/Opt/Simplify/Iteration.hs


Changes:

=====================================
compiler/GHC/Core/Opt/Simplify/Iteration.hs
=====================================
@@ -4280,8 +4280,8 @@ simplStableUnfolding env bind_cxt id rhs_ty id_arity unf opt_rhs
                   -- based on the size of the optimized core. After all this is what the unfolding
                   -- will optimize to eventually!
                   _other -> do
-                    let rhs_guide = calcUnfoldingGuidance uf_opts (is_top_lvl && is_bottoming) opt_rhs
-                    return (mkCoreUnfolding src is_top_lvl unf_expr' rhs_guide)
+                    -- Otherwise keep as is.
+                    return (mkCoreUnfolding src is_top_lvl unf_expr' guide)
 
                     -- return $ CoreUnfolding { uf_tmpl = unf_expr', uf_src = src, uf_guidance = rhs_guide }
               }



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/982094e2177e6434978fb5f6a9d45051eb000cb8

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/982094e2177e6434978fb5f6a9d45051eb000cb8
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20221229/cfa4021c/attachment.html>


More information about the ghc-commits mailing list