[Git][ghc/ghc][wip/andreask/ticked_joins] WIP: give up on casts
sheaf pushed to branch wip/andreask/ticked_joins at Glasgow Haskell Compiler / GHC Commits: f84e5d95 by sheaf at 2026-01-26T21:49:00+01:00 WIP: give up on casts - - - - - 3 changed files: - compiler/GHC/Core/Opt/OccurAnal.hs - compiler/GHC/Core/Opt/Simplify/Iteration.hs - compiler/GHC/Core/Opt/Simplify/Monad.hs Changes: ===================================== compiler/GHC/Core/Opt/OccurAnal.hs ===================================== @@ -2299,7 +2299,7 @@ occ_anal_lam_tail env (Cast expr co) _ -> usage1 -- usage3: see Note [Quasi join points] in GHC.Core.Opt.Simplify.Iteration. - usage3 = markAllQuasiTail usage2 -- SLD TODO + usage3 = markAllNonTail usage2 -- SLD TODO in WUD usage3 (Cast expr' co) @@ -2602,6 +2602,7 @@ occAnal env (Tick tickish body) | Breakpoint _ _ ids <- tickish = -- Never substitute for any of the Ids in a Breakpoint addManyOccs usage_lam (mkVarSet ids) + | otherwise = usage_lam @@ -2611,7 +2612,7 @@ occAnal env (Cast expr co) = let (WUD usage expr') = occAnal env expr usage1 = addManyOccs usage (coVarsOfCo co) -- usage1: see Note [Gather occurrences of coercion variables] - usage2 = markAllQuasiTail usage1 -- SLD TODO + usage2 = markAllNonTail usage1 -- SLD TODO -- usage2: see Note [Quasi join points] in WUD usage2 (Cast expr' co) @@ -2748,7 +2749,6 @@ occAnalApp env (Var fun, args, ticks) | fun `hasKey` runRWKey , [t1, t2, arg] <- args , WUD usage arg' <- adjustNonRecRhs (Just 1) $ occAnalLamTail env arg - -- SLD TODO TrueJoinPoint OK here?? = let app_out = mkTicks ticks $ mkApps (Var fun) [t1, t2, arg'] in WUD usage app_out ===================================== compiler/GHC/Core/Opt/Simplify/Iteration.hs ===================================== @@ -2135,7 +2135,7 @@ trimJoinCont _ NotJoinPoint cont = cont -- Not a jump trimJoinCont var (JoinPoint { joinPointType = join_ty, joinPointArity = arity }) cont | QuasiJoinPoint <- join_ty - -- SLD TODO: not sure why we can end up here. Needs further investigation. + -- As per Note [Quasi join points], don't do any trimming for quasi join points. = cont | otherwise = trim arity cont ===================================== compiler/GHC/Core/Opt/Simplify/Monad.hs ===================================== @@ -214,7 +214,7 @@ newJoinId bndrs body_ty -- arity: See Note [Invariants on join points] invariant 2b, in GHC.Core join_arity = length bndrs details = JoinId - { joinIdType = TrueJoinPoint + { joinIdType = TrueJoinPoint -- SLD TODO this is very suspicious , joinIdArity = join_arity , joinIdCbvMarks = Nothing } View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f84e5d955ab9a3233b5ad30a61310b0d... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/f84e5d955ab9a3233b5ad30a61310b0d... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
sheaf (@sheaf)