WIP: Add likelyhood to alternatives from stg onwards
Summary: Adds a Freq value to Stg/Cmm cases/switches/conditionals. Currently only generates these values by checking alternatives for bottom expressions. They are passed along to the backend where they affect conditional generation slightly. As it stands runtime improvements seem to be less than expected. This might only be worth merging once we have more branch weights available. Reviewers: hvr, goldfire, bgamari, simonmar, simonpj, erikd Reviewed By: simonpj Subscribers: simonpj, rwbarton, thomie, carter GHC Trac Issues: #14672 Differential Revision: https://phabricator.haskell.org/D4327
Showing
- compiler/basicTypes/BasicTypes.hs 106 additions, 1 deletioncompiler/basicTypes/BasicTypes.hs
- compiler/basicTypes/MkId.hs 11 additions, 7 deletionscompiler/basicTypes/MkId.hs
- compiler/cmm/CmmImplementSwitchPlans.hs 10 additions, 9 deletionscompiler/cmm/CmmImplementSwitchPlans.hs
- compiler/cmm/CmmParse.y 24 additions, 23 deletionscompiler/cmm/CmmParse.y
- compiler/cmm/CmmSwitch.hs 147 additions, 54 deletionscompiler/cmm/CmmSwitch.hs
- compiler/cmm/PprC.hs 7 additions, 3 deletionscompiler/cmm/PprC.hs
- compiler/cmm/PprCmm.hs 18 additions, 11 deletionscompiler/cmm/PprCmm.hs
- compiler/codeGen/StgCmmBind.hs 1 addition, 1 deletioncompiler/codeGen/StgCmmBind.hs
- compiler/codeGen/StgCmmExpr.hs 25 additions, 24 deletionscompiler/codeGen/StgCmmExpr.hs
- compiler/codeGen/StgCmmMonad.hs 4 additions, 2 deletionscompiler/codeGen/StgCmmMonad.hs
- compiler/codeGen/StgCmmPrim.hs 19 additions, 9 deletionscompiler/codeGen/StgCmmPrim.hs
- compiler/codeGen/StgCmmProf.hs 1 addition, 0 deletionscompiler/codeGen/StgCmmProf.hs
- compiler/codeGen/StgCmmUtils.hs 74 additions, 44 deletionscompiler/codeGen/StgCmmUtils.hs
- compiler/llvmGen/LlvmCodeGen/CodeGen.hs 21 additions, 6 deletionscompiler/llvmGen/LlvmCodeGen/CodeGen.hs
- compiler/main/DynFlags.hs 13 additions, 3 deletionscompiler/main/DynFlags.hs
- compiler/main/ErrUtils.hs 6 additions, 3 deletionscompiler/main/ErrUtils.hs
- compiler/nativeGen/PPC/CodeGen.hs 5 additions, 1 deletioncompiler/nativeGen/PPC/CodeGen.hs
- compiler/nativeGen/SPARC/CodeGen.hs 5 additions, 1 deletioncompiler/nativeGen/SPARC/CodeGen.hs
- compiler/nativeGen/X86/CodeGen.hs 5 additions, 1 deletioncompiler/nativeGen/X86/CodeGen.hs
- compiler/simplStg/StgCse.hs 6 additions, 6 deletionscompiler/simplStg/StgCse.hs
Please register or sign in to comment