[Git][ghc/ghc][master] Remove dead code GHC.CoreToStg.Prep.canFloat
Marge Bot (@marge-bot)
gitlab at gitlab.haskell.org
Mon Sep 18 19:17:44 UTC 2023
Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC
Commits:
f3f58f13 by Simon Peyton Jones at 2023-09-18T15:17:24-04:00
Remove dead code GHC.CoreToStg.Prep.canFloat
This function never fires, so we can delete it: #23965.
- - - - -
1 changed file:
- compiler/GHC/CoreToStg/Prep.hs
Changes:
=====================================
compiler/GHC/CoreToStg/Prep.hs
=====================================
@@ -657,9 +657,6 @@ cpePair top_lvl is_rec dmd is_unlifted env bndr rhs
| allLazyTop floats
= return (floats, rhs)
- | Just floats <- canFloat floats rhs
- = return floats
-
| otherwise
= dontFloat floats rhs
@@ -1954,32 +1951,6 @@ deFloatTop (Floats _ floats)
---------------------------------------------------------------------------
-canFloat :: Floats -> CpeRhs -> Maybe (Floats, CpeRhs)
-canFloat (Floats ok_to_spec fs) rhs
- | OkToSpec <- ok_to_spec -- Worth trying
- , Just fs' <- go nilOL (fromOL fs)
- = Just (Floats OkToSpec fs', rhs)
- | otherwise
- = Nothing
- where
- go :: OrdList FloatingBind -> [FloatingBind]
- -> Maybe (OrdList FloatingBind)
-
- go (fbs_out) [] = Just fbs_out
-
- go fbs_out (fb@(FloatLet _) : fbs_in)
- = go (fbs_out `snocOL` fb) fbs_in
-
- go fbs_out (fb at FloatString{} : fbs_in)
- -- See Note [ANF-ising literal string arguments]
- = go (fbs_out `snocOL` fb) fbs_in
-
- go fbs_out (ft at FloatTick{} : fbs_in)
- = go (fbs_out `snocOL` ft) fbs_in
-
- go _ (FloatCase{} : _) = Nothing
-
-
wantFloatNested :: RecFlag -> Demand -> Bool -> Floats -> CpeRhs -> Bool
wantFloatNested is_rec dmd rhs_is_unlifted floats rhs
= isEmptyFloats floats
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f3f58f132e58935e9890b868a2a99f75ba411af2
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f3f58f132e58935e9890b868a2a99f75ba411af2
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/20230918/c28dd872/attachment-0001.html>
More information about the ghc-commits
mailing list