[commit: ghc] master: Simplify OccurAnal.tagRecBinders (b311096)

git at git.haskell.org git at git.haskell.org
Tue Aug 1 13:09:58 UTC 2017


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/b311096c5cf4b669dcfceb99561ac6e1c4cca0cd/ghc

>---------------------------------------------------------------

commit b311096c5cf4b669dcfceb99561ac6e1c4cca0cd
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Mon Jul 31 22:56:51 2017 -0400

    Simplify OccurAnal.tagRecBinders
    
    No need to mark the binders with markNonTailCalled, as they already have been
    marked as such in rhs_udss' via adjust.
    
    Differential Revision: https://phabricator.haskell.org/D3810


>---------------------------------------------------------------

b311096c5cf4b669dcfceb99561ac6e1c4cca0cd
 compiler/simplCore/OccurAnal.hs | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/compiler/simplCore/OccurAnal.hs b/compiler/simplCore/OccurAnal.hs
index 5dd30aa..dbe1c48 100644
--- a/compiler/simplCore/OccurAnal.hs
+++ b/compiler/simplCore/OccurAnal.hs
@@ -2657,12 +2657,9 @@ tagRecBinders lvl body_uds triples
      -- 3. Compute final usage details from adjusted RHS details
      adj_uds   = body_uds +++ combineUsageDetailsList rhs_udss'
 
-     -- 4. Tag each binder with its adjusted details modulo the
-     --    join-point-hood decision
-     occs      = map (lookupDetails adj_uds) bndrs
-     occs'     | will_be_joins = occs
-               | otherwise     = map markNonTailCalled occs
-     bndrs'    = zipWith setBinderOcc occs' bndrs
+     -- 4. Tag each binder with its adjusted details
+     bndrs'    = [ setBinderOcc (lookupDetails adj_uds bndr) bndr
+                 | bndr <- bndrs ]
 
      -- 5. Drop the binders from the adjusted details and return
      usage'    = adj_uds `delDetailsList` bndrs



More information about the ghc-commits mailing list