ANFise string literal arguments (#23270)
This instates the invariant that a trivial CoreExpr translates to an atomic StgExpr. Nice. Annoyingly, in -O0 we sometimes generate ``` foo = case "blah"# of sat { __DEFAULT -> unpackCString# sat } ``` which makes it a bit harder to spot that we can emit a standard `stg_unpack_cstring` thunk. Fixes #23270.
Showing
- compiler/GHC/Core/Opt/SetLevels.hs 1 addition, 6 deletionscompiler/GHC/Core/Opt/SetLevels.hs
- compiler/GHC/CoreToStg/Prep.hs 137 additions, 71 deletionscompiler/GHC/CoreToStg/Prep.hs
- compiler/GHC/StgToCmm/Bind.hs 39 additions, 20 deletionscompiler/GHC/StgToCmm/Bind.hs
- compiler/GHC/StgToCmm/Env.hs 1 addition, 1 deletioncompiler/GHC/StgToCmm/Env.hs
- testsuite/tests/core-to-stg/T23270.hs 4 additions, 0 deletionstestsuite/tests/core-to-stg/T23270.hs
- testsuite/tests/core-to-stg/T23270.stderr 46 additions, 0 deletionstestsuite/tests/core-to-stg/T23270.stderr
- testsuite/tests/core-to-stg/all.T 1 addition, 0 deletionstestsuite/tests/core-to-stg/all.T
Loading
Please register or sign in to comment