Refactor UnfoldingSource and IfaceUnfolding
I finally got tired of the way that IfaceUnfolding reflected a previous structure of unfoldings, not the current one. This MR refactors UnfoldingSource and IfaceUnfolding to be simpler and more consistent. It's largely just a refactor, but in UnfoldingSource (which moves to GHC.Types.Basic, since it is now used in IfaceSyn too), I distinguish between /user-specified/ and /system-generated/ stable unfoldings. data UnfoldingSource = VanillaSrc | StableUserSrc -- From a user-specified pragma | StableSystemSrc -- From a system-generated unfolding | CompulsorySrc This has a minor effect in CSE (see the use of isisStableUserUnfolding in GHC.Core.Opt.CSE), which I tripped over when working on specialisation, but it seems like a Good Thing to know anyway.
Showing
- compiler/GHC/Core.hs 20 additions, 47 deletionscompiler/GHC/Core.hs
- compiler/GHC/Core/Opt/CSE.hs 38 additions, 31 deletionscompiler/GHC/Core/Opt/CSE.hs
- compiler/GHC/Core/Opt/Simplify/Iteration.hs 4 additions, 4 deletionscompiler/GHC/Core/Opt/Simplify/Iteration.hs
- compiler/GHC/Core/Opt/Simplify/Utils.hs 1 addition, 1 deletioncompiler/GHC/Core/Opt/Simplify/Utils.hs
- compiler/GHC/Core/Opt/WorkWrap.hs 7 additions, 3 deletionscompiler/GHC/Core/Opt/WorkWrap.hs
- compiler/GHC/Core/Ppr.hs 0 additions, 5 deletionscompiler/GHC/Core/Ppr.hs
- compiler/GHC/Core/SimpleOpt.hs 1 addition, 1 deletioncompiler/GHC/Core/SimpleOpt.hs
- compiler/GHC/Core/Tidy.hs 1 addition, 1 deletioncompiler/GHC/Core/Tidy.hs
- compiler/GHC/Core/Unfold.hs 5 additions, 19 deletionscompiler/GHC/Core/Unfold.hs
- compiler/GHC/Core/Unfold/Make.hs 62 additions, 56 deletionscompiler/GHC/Core/Unfold/Make.hs
- compiler/GHC/CoreToIface.hs 7 additions, 10 deletionscompiler/GHC/CoreToIface.hs
- compiler/GHC/HsToCore.hs 1 addition, 1 deletioncompiler/GHC/HsToCore.hs
- compiler/GHC/HsToCore/Binds.hs 8 additions, 7 deletionscompiler/GHC/HsToCore/Binds.hs
- compiler/GHC/HsToCore/Foreign/C.hs 2 additions, 3 deletionscompiler/GHC/HsToCore/Foreign/C.hs
- compiler/GHC/Iface/Rename.hs 2 additions, 6 deletionscompiler/GHC/Iface/Rename.hs
- compiler/GHC/Iface/Syntax.hs 41 additions, 53 deletionscompiler/GHC/Iface/Syntax.hs
- compiler/GHC/Iface/Tidy.hs 5 additions, 7 deletionscompiler/GHC/Iface/Tidy.hs
- compiler/GHC/IfaceToCore.hs 12 additions, 19 deletionscompiler/GHC/IfaceToCore.hs
- compiler/GHC/Tc/TyCl/Instance.hs 2 additions, 2 deletionscompiler/GHC/Tc/TyCl/Instance.hs
- compiler/GHC/Types/Basic.hs 60 additions, 1 deletioncompiler/GHC/Types/Basic.hs
Loading
Please register or sign in to comment