Ticket #7758: 0003-Remove-cg_tag-from-CgIdInfo.patch

File 0003-Remove-cg_tag-from-CgIdInfo.patch, 2.1 KB (added by bosu, 14 months ago)
  • compiler/codeGen/StgCmmEnv.hs

    From 110447acdfebf662290f00fe02a8df943433b1df Mon Sep 17 00:00:00 2001
    From: Boris Sukholitko <boriss@gmail.com>
    Date: Sat, 9 Mar 2013 11:46:52 +0200
    Subject: [PATCH 3/3] Remove cg_tag from CgIdInfo
    
    ---
     compiler/codeGen/StgCmmEnv.hs   |    9 +++------
     compiler/codeGen/StgCmmMonad.hs |    1 -
     2 files changed, 3 insertions(+), 7 deletions(-)
    
    diff --git a/compiler/codeGen/StgCmmEnv.hs b/compiler/codeGen/StgCmmEnv.hs
    index 1d6f386..4b7272a 100644
    a b nonVoidIds ids = [NonVoid id | id <- ids, not (isVoidRep (idPrimRep id))] 
    7171mkCgIdInfo :: DynFlags -> Id -> LambdaFormInfo -> CmmExpr -> CgIdInfo 
    7272mkCgIdInfo dflags id lf expr 
    7373  = CgIdInfo { cg_id = id, cg_lf = lf 
    74              , cg_loc = CmmLoc expr,  
    75                cg_tag = lfDynTag dflags lf } 
     74             , cg_loc = CmmLoc expr } 
    7675 
    7776litIdInfo :: DynFlags -> Id -> LambdaFormInfo -> CmmLit -> CgIdInfo 
    7877litIdInfo dflags id lf lit 
    7978  = CgIdInfo { cg_id = id, cg_lf = lf 
    80              , cg_loc = CmmLoc (addDynTag dflags (CmmLit lit) tag)  
    81              , cg_tag = tag } 
     79             , cg_loc = CmmLoc (addDynTag dflags (CmmLit lit) tag) } 
    8280  where 
    8381    tag = lfDynTag dflags lf 
    8482 
    8583lneIdInfo :: DynFlags -> Id -> [NonVoid Id] -> CgIdInfo 
    8684lneIdInfo dflags id regs 
    8785  = CgIdInfo { cg_id = id, cg_lf = lf 
    88              , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) 
    89              , cg_tag = lfDynTag dflags lf } 
     86             , cg_loc = LneLoc blk_id (map (idToReg dflags) regs) } 
    9087  where 
    9188    lf     = mkLFLetNoEscape 
    9289    blk_id = mkBlockId (idUnique id) 
  • compiler/codeGen/StgCmmMonad.hs

    diff --git a/compiler/codeGen/StgCmmMonad.hs b/compiler/codeGen/StgCmmMonad.hs
    index def0ffe..dd7e950 100644
    a b data CgIdInfo 
    187187                        -- virtue of being externalised, for splittable C 
    188188        , cg_lf  :: LambdaFormInfo  
    189189        , cg_loc :: CgLoc                     -- CmmExpr for the *tagged* value 
    190         , cg_tag :: {-# UNPACK #-} !DynTag   -- Cache for (lfDynTag cg_lf) 
    191190        } 
    192191 
    193192data CgLoc