[commit: ghc] master: Simplify, no functionality change (ed48d13)

git at git.haskell.org git at git.haskell.org
Tue Oct 17 12:09:44 UTC 2017


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

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

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

commit ed48d133f9b9e41ea6d5dc254f257eeb12ad00b7
Author: Gabor Greif <ggreif at gmail.com>
Date:   Tue Oct 17 12:37:25 2017 +0200

    Simplify, no functionality change


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

ed48d133f9b9e41ea6d5dc254f257eeb12ad00b7
 compiler/codeGen/StgCmmExpr.hs | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index 95dcc9f..3fcc935 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -616,13 +616,12 @@ cgAlts gc_plan bndr (AlgAlt tycon) alts
                    branches' = [(tag+1,branch) | (tag,branch) <- branches]
                 emitSwitch tag_expr branches' mb_deflt 1 fam_sz
 
-           else         -- No, get tag from info table
-                do dflags <- getDynFlags
-                   let -- Note that ptr _always_ has tag 1
-                       -- when the family size is big enough
-                       untagged_ptr = cmmRegOffB bndr_reg (-1)
-                       tag_expr = getConstrTag dflags (untagged_ptr)
-                   emitSwitch tag_expr branches mb_deflt 0 (fam_sz - 1)
+           else -- No, get tag from info table
+                let -- Note that ptr _always_ has tag 1
+                    -- when the family size is big enough
+                    untagged_ptr = cmmRegOffB bndr_reg (-1)
+                    tag_expr = getConstrTag dflags (untagged_ptr)
+                in emitSwitch tag_expr branches mb_deflt 0 (fam_sz - 1)
 
         ; return AssignedDirectly }
 



More information about the ghc-commits mailing list