[commit: ghc] master: Remove unused functions cmmConstrTag, cmmGetTag (1a72848)

Simon Peyton Jones simonpj at microsoft.com
Sat Mar 9 17:34:58 CET 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/1a7284814236af62e03dad1fe35cced81d33b145

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

commit 1a7284814236af62e03dad1fe35cced81d33b145
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date:   Sat Mar 9 12:33:40 2013 +0000

    Remove unused functions cmmConstrTag, cmmGetTag
    
    Patch offered by Boris Sukholitko <boriss at gmail.com>
    Trac #7757

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

 compiler/cmm/CmmUtils.hs        | 11 ++++-------
 compiler/codeGen/StgCmmUtils.hs |  4 ++--
 2 files changed, 6 insertions(+), 9 deletions(-)

diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs
index 5530b77..b9712fa 100644
--- a/compiler/cmm/CmmUtils.hs
+++ b/compiler/cmm/CmmUtils.hs
@@ -42,8 +42,8 @@ module CmmUtils(
         blankWord,
 
         -- Tagging
-        cmmTagMask, cmmPointerMask, cmmUntag, cmmGetTag, cmmIsTagged,
-        cmmConstrTag, cmmConstrTag1,
+        cmmTagMask, cmmPointerMask, cmmUntag, cmmIsTagged,
+        cmmConstrTag1,
 
         -- Liveness and bitmaps
         mkLiveness,
@@ -371,19 +371,16 @@ cmmPointerMask dflags = mkIntExpr dflags (complement (tAG_MASK dflags))
 
 -- Used to untag a possibly tagged pointer
 -- A static label need not be untagged
-cmmUntag, cmmGetTag :: DynFlags -> CmmExpr -> CmmExpr
+cmmUntag :: DynFlags -> CmmExpr -> CmmExpr
 cmmUntag _ e@(CmmLit (CmmLabel _)) = e
 -- Default case
 cmmUntag dflags e = cmmAndWord dflags e (cmmPointerMask dflags)
 
-cmmGetTag dflags e = cmmAndWord dflags e (cmmTagMask dflags)
-
 -- Test if a closure pointer is untagged
 cmmIsTagged :: DynFlags -> CmmExpr -> CmmExpr
 cmmIsTagged dflags e = cmmNeWord dflags (cmmAndWord dflags e (cmmTagMask dflags)) (zeroExpr dflags)
 
-cmmConstrTag, cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr
-cmmConstrTag dflags e = cmmSubWord dflags (cmmAndWord dflags e (cmmTagMask dflags)) (mkIntExpr dflags 1)
+cmmConstrTag1 :: DynFlags -> CmmExpr -> CmmExpr
 -- Get constructor tag, but one based.
 cmmConstrTag1 dflags e = cmmAndWord dflags e (cmmTagMask dflags)
 
diff --git a/compiler/codeGen/StgCmmUtils.hs b/compiler/codeGen/StgCmmUtils.hs
index cc55ae2..af5e957 100644
--- a/compiler/codeGen/StgCmmUtils.hs
+++ b/compiler/codeGen/StgCmmUtils.hs
@@ -29,9 +29,9 @@ module StgCmmUtils (
         cmmOffsetW, cmmOffsetB,
         cmmOffsetLitW, cmmOffsetLitB,
         cmmLoadIndexW,
-        cmmConstrTag, cmmConstrTag1,
+        cmmConstrTag1,
 
-        cmmUntag, cmmIsTagged, cmmGetTag,
+        cmmUntag, cmmIsTagged,
 
         addToMem, addToMemE, addToMemLbl,
         mkWordCLit,





More information about the ghc-commits mailing list