Commit 447864a9 authored by Sylvain Henry's avatar Sylvain Henry

Module hierarchy: StgToCmm (#13009)

Add StgToCmm module hierarchy. Platform modules that are used in several
other places (NCG, LLVM codegen, Cmm transformations) are put into
GHC.Platform.
parent 270fbe85
Pipeline #10061 failed with stages
in 378 minutes and 58 seconds
{-# LANGUAGE CPP #-}
module CodeGen.Platform.ARM where
module GHC.Platform.ARM where
import GhcPrelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_arm 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
{-# LANGUAGE CPP #-}
module CodeGen.Platform.ARM64 where
module GHC.Platform.ARM64 where
import GhcPrelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_aarch64 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
{-# LANGUAGE CPP #-}
module CodeGen.Platform.NoRegs where
module GHC.Platform.NoRegs where
import GhcPrelude
#define MACHREGS_NO_REGS 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
{-# LANGUAGE CPP #-}
module CodeGen.Platform.PPC where
module GHC.Platform.PPC where
import GhcPrelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_powerpc 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
module CodeGen.Platform
module GHC.Platform.Regs
(callerSaves, activeStgRegs, haveRegBase, globalRegMaybe, freeReg)
where
......@@ -9,13 +9,13 @@ import CmmExpr
import GHC.Platform
import Reg
import qualified CodeGen.Platform.ARM as ARM
import qualified CodeGen.Platform.ARM64 as ARM64
import qualified CodeGen.Platform.PPC as PPC
import qualified CodeGen.Platform.SPARC as SPARC
import qualified CodeGen.Platform.X86 as X86
import qualified CodeGen.Platform.X86_64 as X86_64
import qualified CodeGen.Platform.NoRegs as NoRegs
import qualified GHC.Platform.ARM as ARM
import qualified GHC.Platform.ARM64 as ARM64
import qualified GHC.Platform.PPC as PPC
import qualified GHC.Platform.SPARC as SPARC
import qualified GHC.Platform.X86 as X86
import qualified GHC.Platform.X86_64 as X86_64
import qualified GHC.Platform.NoRegs as NoRegs
-- | Returns 'True' if this global register is stored in a caller-saves
-- machine register.
......
{-# LANGUAGE CPP #-}
module CodeGen.Platform.SPARC where
module GHC.Platform.SPARC where
import GhcPrelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_sparc 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
{-# LANGUAGE CPP #-}
module CodeGen.Platform.X86 where
module GHC.Platform.X86 where
import GhcPrelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_i386 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
{-# LANGUAGE CPP #-}
module CodeGen.Platform.X86_64 where
module GHC.Platform.X86_64 where
import GhcPrelude
#define MACHREGS_NO_REGS 0
#define MACHREGS_x86_64 1
#include "../../../../includes/CodeGen.Platform.hs"
#include "../../../includes/CodeGen.Platform.hs"
......@@ -9,22 +9,22 @@
--
-----------------------------------------------------------------------------
module StgCmm ( codeGen ) where
module GHC.StgToCmm ( codeGen ) where
#include "HsVersions.h"
import GhcPrelude as Prelude
import StgCmmProf (initCostCentres, ldvEnter)
import StgCmmMonad
import StgCmmEnv
import StgCmmBind
import StgCmmCon
import StgCmmLayout
import StgCmmUtils
import StgCmmClosure
import StgCmmHpc
import StgCmmTicky
import GHC.StgToCmm.Prof (initCostCentres, ldvEnter)
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Env
import GHC.StgToCmm.Bind
import GHC.StgToCmm.Con
import GHC.StgToCmm.Layout
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import GHC.StgToCmm.Hpc
import GHC.StgToCmm.Ticky
import Cmm
import CmmUtils
......
-----------------------------------------------------------------------------
--
-- Argument representations used in StgCmmLayout.
-- Argument representations used in GHC.StgToCmm.Layout.
--
-- (c) The University of Glasgow 2013
--
-----------------------------------------------------------------------------
module StgCmmArgRep (
module GHC.StgToCmm.ArgRep (
ArgRep(..), toArgRep, argRepSizeW,
argRepString, isNonV, idArgRep,
......@@ -17,7 +17,7 @@ module StgCmmArgRep (
import GhcPrelude
import StgCmmClosure ( idPrimRep )
import GHC.StgToCmm.Closure ( idPrimRep )
import SMRep ( WordOff )
import Id ( Id )
......@@ -30,7 +30,7 @@ import Outputable
import FastString
-- I extricated this code as this new module in order to avoid a
-- cyclic dependency between StgCmmLayout and StgCmmTicky.
-- cyclic dependency between GHC.StgToCmm.Layout and GHC.StgToCmm.Ticky.
--
-- NSF 18 Feb 2013
......@@ -38,7 +38,7 @@ import FastString
-- Classifying arguments: ArgRep
-------------------------------------------------------------------------
-- ArgRep is re-exported by StgCmmLayout, but only for use in the
-- ArgRep is re-exported by GHC.StgToCmm.Layout, but only for use in the
-- byte-code generator which also needs to know about the
-- classification of arguments.
......@@ -108,7 +108,7 @@ idArgRep = toArgRep . idPrimRep
-- This list of argument patterns should be kept in sync with at least
-- the following:
--
-- * StgCmmLayout.stdPattern maybe to some degree?
-- * GHC.StgToCmm.Layout.stdPattern maybe to some degree?
--
-- * the RTS_RET(stg_ap_*) and RTS_FUN_DECL(stg_ap_*_fast)
-- declarations in includes/stg/MiscClosures.h
......
......@@ -6,7 +6,7 @@
--
-----------------------------------------------------------------------------
module StgCmmBind (
module GHC.StgToCmm.Bind (
cgTopRhsClosure,
cgBind,
emitBlackHoleCode,
......@@ -15,18 +15,18 @@ module StgCmmBind (
import GhcPrelude hiding ((<*>))
import StgCmmExpr
import StgCmmMonad
import StgCmmEnv
import StgCmmCon
import StgCmmHeap
import StgCmmProf (ldvEnterClosure, enterCostCentreFun, enterCostCentreThunk,
import GHC.StgToCmm.Expr
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Env
import GHC.StgToCmm.Con
import GHC.StgToCmm.Heap
import GHC.StgToCmm.Prof (ldvEnterClosure, enterCostCentreFun, enterCostCentreThunk,
initUpdFrameProf)
import StgCmmTicky
import StgCmmLayout
import StgCmmUtils
import StgCmmClosure
import StgCmmForeign (emitPrimCall)
import GHC.StgToCmm.Ticky
import GHC.StgToCmm.Layout
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import GHC.StgToCmm.Foreign (emitPrimCall)
import MkGraph
import CoreSyn ( AltCon(..), tickishIsCode )
......@@ -208,7 +208,7 @@ cgRhs id (StgRhsCon cc con args)
-- con args are always non-void,
-- see Note [Post-unarisation invariants] in UnariseStg
{- See Note [GC recovery] in compiler/codeGen/StgCmmClosure.hs -}
{- See Note [GC recovery] in compiler/GHC.StgToCmm/Closure.hs -}
cgRhs id (StgRhsClosure fvs cc upd_flag args body)
= do dflags <- getDynFlags
mkRhsClosure dflags id cc (nonVoidIds (dVarSetElems fvs)) upd_flag args body
......@@ -299,7 +299,7 @@ mkRhsClosure dflags bndr _cc
[] -- No args; a thunk
(StgApp fun_id args)
-- We are looking for an "ApThunk"; see data con ApThunk in StgCmmClosure
-- We are looking for an "ApThunk"; see data con ApThunk in GHC.StgToCmm.Closure
-- of form (x1 x2 .... xn), where all the xi are locals (not top-level)
-- So the xi will all be free variables
| args `lengthIs` (n_fvs-1) -- This happens only if the fun_id and
......@@ -488,7 +488,7 @@ closureCodeBody top_lvl bndr cl_info cc args arity body fv_details
; loop_header_id <- newBlockId
-- Extend reader monad with information that
-- self-recursive tail calls can be optimized into local
-- jumps. See Note [Self-recursive tail calls] in StgCmmExpr.
-- jumps. See Note [Self-recursive tail calls] in GHC.StgToCmm.Expr.
; withSelfLoop (bndr, loop_header_id, arg_regs) $ do
{
-- Main payload
......
module StgCmmBind where
module GHC.StgToCmm.Bind where
import StgCmmMonad( FCode )
import GHC.StgToCmm.Monad( FCode )
import StgSyn( CgStgBinding )
cgBind :: CgStgBinding -> FCode ()
......@@ -8,7 +8,7 @@
--
-----------------------------------------------------------------------------
module CgUtils (
module GHC.StgToCmm.CgUtils (
fixStgRegisters,
baseRegOffset,
get_Regtable_addr_from_offset,
......@@ -18,7 +18,7 @@ module CgUtils (
import GhcPrelude
import CodeGen.Platform
import GHC.Platform.Regs
import Cmm
import Hoopl.Block
import Hoopl.Graph
......
......@@ -11,7 +11,7 @@
--
-----------------------------------------------------------------------------
module StgCmmClosure (
module GHC.StgToCmm.Closure (
DynTag, tagForCon, isSmallFamily,
idPrimRep, isVoidRep, isGcPtrRep, addIdReps, addArgReps,
......@@ -97,9 +97,9 @@ import qualified Data.ByteString.Char8 as BS8
-- Data types and synonyms
-----------------------------------------------------------------------------
-- These data types are mostly used by other modules, especially StgCmmMonad,
-- but we define them here because some functions in this module need to
-- have access to them as well
-- These data types are mostly used by other modules, especially
-- GHC.StgToCmm.Monad, but we define them here because some functions in this
-- module need to have access to them as well
data CgLoc
= CmmLoc CmmExpr -- A stable CmmExpr; that is, one not mentioning
......@@ -566,7 +566,7 @@ getCallMethod dflags _ id _ n_args v_args _cg_loc
-- * function is performing a self-recursive call in a tail position
-- * number of non-void parameters of the function matches functions arity.
-- See Note [Self-recursive tail calls] and Note [Void arguments in
-- self-recursive tail calls] in StgCmmExpr for more details
-- self-recursive tail calls] in GHC.StgToCmm.Expr for more details
= JumpToIt block_id args
getCallMethod dflags name id (LFReEntrant _ _ arity _ _) n_args _v_args _cg_loc
......
......@@ -4,14 +4,14 @@
--
-- Stg to C--: code generation for constructors
--
-- This module provides the support code for StgCmm to deal with with
-- This module provides the support code for StgToCmm to deal with with
-- constructors on the RHSs of let(rec)s.
--
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmCon (
module GHC.StgToCmm.Con (
cgTopRhsCon, buildDynCon, bindConArgs
) where
......@@ -22,12 +22,12 @@ import GhcPrelude
import StgSyn
import CoreSyn ( AltCon(..) )
import StgCmmMonad
import StgCmmEnv
import StgCmmHeap
import StgCmmLayout
import StgCmmUtils
import StgCmmClosure
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Env
import GHC.StgToCmm.Heap
import GHC.StgToCmm.Layout
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import CmmExpr
import CmmUtils
......@@ -89,7 +89,7 @@ cgTopRhsCon dflags id con args =
amode <- getArgAmode arg
case amode of
CmmLit lit -> return lit
_ -> panic "StgCmmCon.cgTopRhsCon"
_ -> panic "GHC.StgToCmm.Con.cgTopRhsCon"
nonptr_wds = tot_wds - ptr_wds
......@@ -272,7 +272,7 @@ bindConArgs (DataAlt con) base args
-- when accessing the constructor field.
bind_arg :: (NonVoid Id, ByteOff) -> FCode (Maybe LocalReg)
bind_arg (arg@(NonVoid b), offset)
| isDeadBinder b -- See Note [Dead-binder optimisation] in StgCmmExpr
| isDeadBinder b -- See Note [Dead-binder optimisation] in GHC.StgToCmm.Expr
= return Nothing
| otherwise
= do { emit $ mkTaggedObjectLoad dflags (idToReg dflags arg)
......
......@@ -7,7 +7,7 @@
-- (c) The University of Glasgow 2004-2006
--
-----------------------------------------------------------------------------
module StgCmmEnv (
module GHC.StgToCmm.Env (
CgIdInfo,
litIdInfo, lneIdInfo, rhsIdInfo, mkRhsInit,
......@@ -27,9 +27,9 @@ module StgCmmEnv (
import GhcPrelude
import TyCon
import StgCmmMonad
import StgCmmUtils
import StgCmmClosure
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import CLabel
......@@ -146,7 +146,7 @@ getCgIdInfo id
cgLookupPanic :: Id -> FCode a
cgLookupPanic id
= do local_binds <- getBinds
pprPanic "StgCmmEnv: variable not found"
pprPanic "GHC.StgToCmm.Env: variable not found"
(vcat [ppr id,
text "local binds for:",
pprUFM local_binds $ \infos ->
......
......@@ -8,25 +8,25 @@
--
-----------------------------------------------------------------------------
module StgCmmExpr ( cgExpr ) where
module GHC.StgToCmm.Expr ( cgExpr ) where
#include "HsVersions.h"
import GhcPrelude hiding ((<*>))
import {-# SOURCE #-} StgCmmBind ( cgBind )
import {-# SOURCE #-} GHC.StgToCmm.Bind ( cgBind )
import StgCmmMonad
import StgCmmHeap
import StgCmmEnv
import StgCmmCon
import StgCmmProf (saveCurrentCostCentre, restoreCurrentCostCentre, emitSetCCC)
import StgCmmLayout
import StgCmmPrim
import StgCmmHpc
import StgCmmTicky
import StgCmmUtils
import StgCmmClosure
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Heap
import GHC.StgToCmm.Env
import GHC.StgToCmm.Con
import GHC.StgToCmm.Prof (saveCurrentCostCentre, restoreCurrentCostCentre, emitSetCCC)
import GHC.StgToCmm.Layout
import GHC.StgToCmm.Prim
import GHC.StgToCmm.Hpc
import GHC.StgToCmm.Ticky
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import StgSyn
......@@ -552,9 +552,9 @@ check will reset the heap usage. Slop in the heap breaks LDV profiling
Note [Inlining out-of-line primops and heap checks]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If shouldInlinePrimOp returns True when called from StgCmmExpr for the
If shouldInlinePrimOp returns True when called from GHC.StgToCmm.Expr for the
purpose of heap check placement, we *must* inline the primop later in
StgCmmPrim. If we don't things will go wrong.
GHC.StgToCmm.Prim. If we don't things will go wrong.
-}
-----------------
......@@ -851,18 +851,18 @@ cgIdApp fun_id args = do
--
-- * Whenever we are compiling a function, we set that information to reflect
-- the fact that function currently being compiled can be jumped to, instead
-- of called. This is done in closureCodyBody in StgCmmBind.
-- of called. This is done in closureCodyBody in GHC.StgToCmm.Bind.
--
-- * We also have to emit a label to which we will be jumping. We make sure
-- that the label is placed after a stack check but before the heap
-- check. The reason is that making a recursive tail-call does not increase
-- the stack so we only need to check once. But it may grow the heap, so we
-- have to repeat the heap check in every self-call. This is done in
-- do_checks in StgCmmHeap.
-- do_checks in GHC.StgToCmm.Heap.
--
-- * When we begin compilation of another closure we remove the additional
-- information from the environment. This is done by forkClosureBody
-- in StgCmmMonad. Other functions that duplicate the environment -
-- in GHC.StgToCmm.Monad. Other functions that duplicate the environment -
-- forkLneBody, forkAlts, codeOnly - duplicate that information. In other
-- words, we only need to clean the environment of the self-loop information
-- when compiling right hand side of a closure (binding).
......
......@@ -10,7 +10,7 @@
-- to collect declarations as we parse the proc, and feed the environment
-- back in circularly (to avoid a two-pass algorithm).
module StgCmmExtCode (
module GHC.StgToCmm.ExtCode (
CmmParse, unEC,
Named(..), Env,
......@@ -39,8 +39,8 @@ where
import GhcPrelude
import qualified StgCmmMonad as F
import StgCmmMonad (FCode, newUnique)
import qualified GHC.StgToCmm.Monad as F
import GHC.StgToCmm.Monad (FCode, newUnique)
import Cmm
import CLabel
......
......@@ -6,7 +6,7 @@
--
-----------------------------------------------------------------------------
module StgCmmForeign (
module GHC.StgToCmm.Foreign (
cgForeignCall,
emitPrimCall, emitCCall,
emitForeignCall, -- For CmmParse
......@@ -21,12 +21,12 @@ module StgCmmForeign (
import GhcPrelude hiding( succ, (<*>) )
import StgSyn
import StgCmmProf (storeCurCCS, ccsType)
import StgCmmEnv
import StgCmmMonad
import StgCmmUtils
import StgCmmClosure
import StgCmmLayout
import GHC.StgToCmm.Prof (storeCurCCS, ccsType)
import GHC.StgToCmm.Env
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Closure
import GHC.StgToCmm.Layout
import BlockId (newBlockId)
import Cmm
......
......@@ -6,7 +6,7 @@
--
-----------------------------------------------------------------------------
module StgCmmHeap (
module GHC.StgToCmm.Heap (
getVirtHp, setVirtHp, setRealHp,
getHpRelOffset,
......@@ -24,13 +24,13 @@ import GhcPrelude hiding ((<*>))
import StgSyn
import CLabel
import StgCmmLayout
import StgCmmUtils
import StgCmmMonad
import StgCmmProf (profDynAlloc, dynProfHdr, staticProfHdr)
import StgCmmTicky
import StgCmmClosure
import StgCmmEnv
import GHC.StgToCmm.Layout
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Prof (profDynAlloc, dynProfHdr, staticProfHdr)
import GHC.StgToCmm.Ticky
import GHC.StgToCmm.Closure
import GHC.StgToCmm.Env
import MkGraph
......@@ -659,7 +659,7 @@ do_checks mb_stk_hwm checkYield mb_alloc_lit do_gc = do
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--
-- Self-recursive loop header is required by loopification optimization (See
-- Note [Self-recursive tail calls] in StgCmmExpr). We emit it if:
-- Note [Self-recursive tail calls] in GHC.StgToCmm.Expr). We emit it if:
--
-- 1. There is information about self-loop in the FCode environment. We don't
-- check the binder (first component of the self_loop_info) because we are
......
......@@ -6,18 +6,18 @@
--
-----------------------------------------------------------------------------
module StgCmmHpc ( initHpc, mkTickBox ) where
module GHC.StgToCmm.Hpc ( initHpc, mkTickBox ) where
import GhcPrelude
import StgCmmMonad
import GHC.StgToCmm.Monad
import MkGraph
import CmmExpr
import CLabel
import Module
import CmmUtils
import StgCmmUtils
import GHC.StgToCmm.Utils
import HscTypes
import DynFlags
......
......@@ -9,7 +9,7 @@
--
-----------------------------------------------------------------------------
module StgCmmLayout (
module GHC.StgToCmm.Layout (
mkArgDescr,
emitCall, emitReturn, adjustHpBackwards,
......@@ -26,7 +26,7 @@ module StgCmmLayout (
mkVirtConstrSizes,
getHpRelOffset,
ArgRep(..), toArgRep, argRepSizeW -- re-exported from StgCmmArgRep
ArgRep(..), toArgRep, argRepSizeW -- re-exported from GHC.StgToCmm.ArgRep
) where
......@@ -34,12 +34,12 @@ module StgCmmLayout (
import GhcPrelude hiding ((<*>))
import StgCmmClosure
import StgCmmEnv
import StgCmmArgRep -- notably: ( slowCallPattern )
import StgCmmTicky
import StgCmmMonad
import StgCmmUtils
import GHC.StgToCmm.Closure
import GHC.StgToCmm.Env
import GHC.StgToCmm.ArgRep -- notably: ( slowCallPattern )
import GHC.StgToCmm.Ticky
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Utils
import MkGraph
import SMRep
......@@ -387,7 +387,7 @@ hpRel :: VirtualHpOffset -- virtual offset of Hp
hpRel hp off = off - hp
getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr
-- See Note [Virtual and real heap pointers] in StgCmmMonad
-- See Note [Virtual and real heap pointers] in GHC.StgToCmm.Monad
getHpRelOffset virtual_offset
= do dflags <- getDynFlags
hp_usg <- getHpUsage
......
......@@ -9,7 +9,7 @@
--
-----------------------------------------------------------------------------
module StgCmmMonad (
module GHC.StgToCmm.Monad (
FCode, -- type
initC, runC, fixC,
......@@ -62,7 +62,7 @@ module StgCmmMonad (
import GhcPrelude hiding( sequence, succ )
import Cmm
import StgCmmClosure
import GHC.StgToCmm.Closure
import DynFlags
import Hoopl.Collections
import MkGraph
......@@ -164,7 +164,7 @@ data CgInfoDownwards -- information only passed *downwards* by the monad
cgd_self_loop :: Maybe SelfLoopInfo,-- Which tail calls can be compiled
-- as local jumps? See Note
-- [Self-recursive tail calls] in
-- StgCmmExpr
-- GHC.StgToCmm.Expr
cgd_tick_scope:: CmmTickScope -- Tick scope for new blocks & ticks
}
......
......@@ -10,7 +10,7 @@
--
-----------------------------------------------------------------------------
module StgCmmPrim (
module GHC.StgToCmm.Prim (
cgOpApp,
cgPrimOp, -- internal(ish), used by cgCase to get code for a
-- comparison without also turning it into a Bool.
......@@ -21,14 +21,14 @@ module StgCmmPrim (
import GhcPrelude hiding ((<*>))
import StgCmmLayout
import StgCmmForeign
import StgCmmEnv
import StgCmmMonad
import StgCmmUtils
import StgCmmTicky
import StgCmmHeap
import StgCmmProf ( costCentreFrom )
import GHC.StgToCmm.Layout
import GHC.StgToCmm.Foreign
import GHC.StgToCmm.Env
import GHC.StgToCmm.Monad
import GHC.StgToCmm.Utils
import GHC.StgToCmm.Ticky
import GHC.StgToCmm.Heap
import GHC.StgToCmm.Prof ( costCentreFrom )
import DynFlags
import GHC.Platform
......@@ -1578,7 +1578,7 @@ doIndexOffAddrOp :: Maybe MachOp
doIndexOffAddrOp maybe_post_read_cast rep [res] [addr,idx]
= mkBasicIndexedRead 0 maybe_post_read_cast rep res addr rep idx
doIndexOffAddrOp _ _ _ _
= panic "StgCmmPrim: doIndexOffAddrOp"
= panic "GHC.StgToCmm.Prim: doIndexOffAddrOp"
doIndexOffAddrOpAs :: Maybe MachOp
-> CmmType
......@@ -1589,7 +1589,7 @@ doIndexOffAddrOpAs :: Maybe MachOp
doIndexOffAddrOpAs maybe_post_read_cast rep idx_rep [res] [addr,idx]
= mkBasicIndexedRead 0 maybe_post_read_cast rep res addr idx_rep idx
doIndexOffAddrOpAs _ _ _ _ _
= panic "StgCmmPrim: doIndexOffAddrOpAs"
= panic "GHC.StgToCmm.Prim: doIndexOffAddrOpAs"
doIndexByteArrayOp :: Maybe MachOp
-> CmmType
......@@ -1600,7 +1600,7 @@ doIndexByteArrayOp maybe_post_read_cast rep [res] [addr,idx]
= do dflags <- getDynFlags
mkBasicIndexedRead (arrWordsHdrSize dflags) maybe_post_read_cast rep res addr rep idx
doIndexByteArrayOp _ _ _ _