diff options
author | Sylvain Henry <sylvain@haskus.fr> | 2020-01-07 02:44:39 +0100 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2020-01-25 05:22:20 -0500 |
commit | 6e2d9ee25bce06ae51d2f1cf8df4f7422106a383 (patch) | |
tree | 4bb0aa9527bc0bed4fb2e991eb02d0f031d514bf /compiler/GHC/StgToCmm | |
parent | c3fde723633d1788e4ded8c6f59eb7cef1ae95fd (diff) | |
download | haskell-6e2d9ee25bce06ae51d2f1cf8df4f7422106a383.tar.gz |
Module hierarchy: Cmm (cf #13009)
Diffstat (limited to 'compiler/GHC/StgToCmm')
-rw-r--r-- | compiler/GHC/StgToCmm/ArgRep.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Bind.hs | 18 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/CgUtils.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Closure.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/DataCon.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Env.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Expr.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/ExtCode.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Foreign.hs | 20 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Heap.hs | 16 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Hpc.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Layout.hs | 14 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Monad.hs | 18 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Prim.hs | 14 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Prof.hs | 10 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Ticky.hs | 16 | ||||
-rw-r--r-- | compiler/GHC/StgToCmm/Utils.hs | 20 |
17 files changed, 106 insertions, 106 deletions
diff --git a/compiler/GHC/StgToCmm/ArgRep.hs b/compiler/GHC/StgToCmm/ArgRep.hs index cc2fe8306a..347d908b44 100644 --- a/compiler/GHC/StgToCmm/ArgRep.hs +++ b/compiler/GHC/StgToCmm/ArgRep.hs @@ -19,7 +19,7 @@ import GhcPrelude import GHC.StgToCmm.Closure ( idPrimRep ) -import SMRep ( WordOff ) +import GHC.Runtime.Layout ( WordOff ) import Id ( Id ) import TyCon ( PrimRep(..), primElemRepSizeB ) import BasicTypes ( RepArity ) diff --git a/compiler/GHC/StgToCmm/Bind.hs b/compiler/GHC/StgToCmm/Bind.hs index b1cb34ace7..a78ab5cb41 100644 --- a/compiler/GHC/StgToCmm/Bind.hs +++ b/compiler/GHC/StgToCmm/Bind.hs @@ -28,14 +28,14 @@ import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure import GHC.StgToCmm.Foreign (emitPrimCall) -import MkGraph +import GHC.Cmm.Graph import CoreSyn ( AltCon(..), tickishIsCode ) -import BlockId -import SMRep -import Cmm -import CmmInfo -import CmmUtils -import CLabel +import GHC.Cmm.BlockId +import GHC.Runtime.Layout +import GHC.Cmm +import GHC.Cmm.Info +import GHC.Cmm.Utils +import GHC.Cmm.CLabel import GHC.Stg.Syntax import CostCentre import Id @@ -105,7 +105,7 @@ cgTopRhsClosure dflags rec id ccs upd_flag args body = -- We don't generate the static closure here, because we might -- want to add references to static closures to it later. The - -- static closure is generated by CmmBuildInfoTables.updInfoSRTs, + -- static closure is generated by GHC.Cmm.Info.Build.updInfoSRTs, -- See Note [SRTs], specifically the [FUN] optimisation. ; let fv_details :: [(NonVoid Id, ByteOff)] @@ -622,7 +622,7 @@ emitBlackHoleCode node = do -- unconditionally disabled. -- krc 1/2007 -- Note the eager-blackholing check is here rather than in blackHoleOnEntry, - -- because emitBlackHoleCode is called from CmmParse. + -- because emitBlackHoleCode is called from GHC.Cmm.Parser. let eager_blackholing = not (gopt Opt_SccProfilingOn dflags) && gopt Opt_EagerBlackHoling dflags diff --git a/compiler/GHC/StgToCmm/CgUtils.hs b/compiler/GHC/StgToCmm/CgUtils.hs index f3dccd9745..58c46f8fa2 100644 --- a/compiler/GHC/StgToCmm/CgUtils.hs +++ b/compiler/GHC/StgToCmm/CgUtils.hs @@ -19,11 +19,11 @@ module GHC.StgToCmm.CgUtils ( import GhcPrelude import GHC.Platform.Regs -import Cmm -import Hoopl.Block -import Hoopl.Graph -import CmmUtils -import CLabel +import GHC.Cmm +import GHC.Cmm.Dataflow.Block +import GHC.Cmm.Dataflow.Graph +import GHC.Cmm.Utils +import GHC.Cmm.CLabel import DynFlags import Outputable diff --git a/compiler/GHC/StgToCmm/Closure.hs b/compiler/GHC/StgToCmm/Closure.hs index df8cb046c4..724ca6000a 100644 --- a/compiler/GHC/StgToCmm/Closure.hs +++ b/compiler/GHC/StgToCmm/Closure.hs @@ -67,13 +67,13 @@ module GHC.StgToCmm.Closure ( import GhcPrelude import GHC.Stg.Syntax -import SMRep -import Cmm -import PprCmmExpr() -- For Outputable instances +import GHC.Runtime.Layout +import GHC.Cmm +import GHC.Cmm.Ppr.Expr() -- For Outputable instances import CostCentre -import BlockId -import CLabel +import GHC.Cmm.BlockId +import GHC.Cmm.CLabel import Id import IdInfo import DataCon diff --git a/compiler/GHC/StgToCmm/DataCon.hs b/compiler/GHC/StgToCmm/DataCon.hs index 1e929663df..2bbeabace6 100644 --- a/compiler/GHC/StgToCmm/DataCon.hs +++ b/compiler/GHC/StgToCmm/DataCon.hs @@ -29,11 +29,11 @@ import GHC.StgToCmm.Layout import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure -import CmmExpr -import CmmUtils -import CLabel -import MkGraph -import SMRep +import GHC.Cmm.Expr +import GHC.Cmm.Utils +import GHC.Cmm.CLabel +import GHC.Cmm.Graph +import GHC.Runtime.Layout import CostCentre import Module import DataCon diff --git a/compiler/GHC/StgToCmm/Env.hs b/compiler/GHC/StgToCmm/Env.hs index 45b09a3d26..b2c1371840 100644 --- a/compiler/GHC/StgToCmm/Env.hs +++ b/compiler/GHC/StgToCmm/Env.hs @@ -31,14 +31,14 @@ import GHC.StgToCmm.Monad import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure -import CLabel +import GHC.Cmm.CLabel -import BlockId -import CmmExpr -import CmmUtils +import GHC.Cmm.BlockId +import GHC.Cmm.Expr +import GHC.Cmm.Utils import DynFlags import Id -import MkGraph +import GHC.Cmm.Graph import Name import Outputable import GHC.Stg.Syntax diff --git a/compiler/GHC/StgToCmm/Expr.hs b/compiler/GHC/StgToCmm/Expr.hs index 3836aa3d2a..0c2d9b8ae5 100644 --- a/compiler/GHC/StgToCmm/Expr.hs +++ b/compiler/GHC/StgToCmm/Expr.hs @@ -30,10 +30,10 @@ import GHC.StgToCmm.Closure import GHC.Stg.Syntax -import MkGraph -import BlockId -import Cmm hiding ( succ ) -import CmmInfo +import GHC.Cmm.Graph +import GHC.Cmm.BlockId +import GHC.Cmm hiding ( succ ) +import GHC.Cmm.Info import CoreSyn import DataCon import DynFlags ( mAX_PTR_TAG ) diff --git a/compiler/GHC/StgToCmm/ExtCode.hs b/compiler/GHC/StgToCmm/ExtCode.hs index 4a5225eec6..2679ce4992 100644 --- a/compiler/GHC/StgToCmm/ExtCode.hs +++ b/compiler/GHC/StgToCmm/ExtCode.hs @@ -42,11 +42,11 @@ import GhcPrelude import qualified GHC.StgToCmm.Monad as F import GHC.StgToCmm.Monad (FCode, newUnique) -import Cmm -import CLabel -import MkGraph +import GHC.Cmm +import GHC.Cmm.CLabel +import GHC.Cmm.Graph -import BlockId +import GHC.Cmm.BlockId import DynFlags import FastString import Module diff --git a/compiler/GHC/StgToCmm/Foreign.hs b/compiler/GHC/StgToCmm/Foreign.hs index 3ef0872c2e..62a948d13c 100644 --- a/compiler/GHC/StgToCmm/Foreign.hs +++ b/compiler/GHC/StgToCmm/Foreign.hs @@ -9,7 +9,7 @@ module GHC.StgToCmm.Foreign ( cgForeignCall, emitPrimCall, emitCCall, - emitForeignCall, -- For CmmParse + emitForeignCall, emitSaveThreadState, saveThreadState, emitLoadThreadState, @@ -28,14 +28,14 @@ import GHC.StgToCmm.Utils import GHC.StgToCmm.Closure import GHC.StgToCmm.Layout -import BlockId (newBlockId) -import Cmm -import CmmUtils -import MkGraph +import GHC.Cmm.BlockId (newBlockId) +import GHC.Cmm +import GHC.Cmm.Utils +import GHC.Cmm.Graph import Type import GHC.Types.RepType -import CLabel -import SMRep +import GHC.Cmm.CLabel +import GHC.Runtime.Layout import ForeignCall import DynFlags import Maybes @@ -202,7 +202,7 @@ emitPrimCall :: [CmmFormal] -> CallishMachOp -> [CmmActual] -> FCode () emitPrimCall res op args = void $ emitForeignCall PlayRisky res (PrimTarget op) args --- alternative entry point, used by CmmParse +-- alternative entry point, used by GHC.Cmm.Parser emitForeignCall :: Safety -> [CmmFormal] -- where to put the results @@ -257,9 +257,9 @@ load_target_into_temp other_target@(PrimTarget _) = -- Note [Register Parameter Passing]). -- -- However, we can't pattern-match on the expression here, because --- this is used in a loop by CmmParse, and testing the expression +-- this is used in a loop by GHC.Cmm.Parser, and testing the expression -- results in a black hole. So we always create a temporary, and rely --- on CmmSink to clean it up later. (Yuck, ToDo). The generated code +-- on GHC.Cmm.Sink to clean it up later. (Yuck, ToDo). The generated code -- ends up being the same, at least for the RTS .cmm code. -- maybe_assign_temp :: CmmExpr -> FCode CmmExpr diff --git a/compiler/GHC/StgToCmm/Heap.hs b/compiler/GHC/StgToCmm/Heap.hs index d36cad5788..492a4460f8 100644 --- a/compiler/GHC/StgToCmm/Heap.hs +++ b/compiler/GHC/StgToCmm/Heap.hs @@ -23,7 +23,7 @@ module GHC.StgToCmm.Heap ( import GhcPrelude hiding ((<*>)) import GHC.Stg.Syntax -import CLabel +import GHC.Cmm.CLabel import GHC.StgToCmm.Layout import GHC.StgToCmm.Utils import GHC.StgToCmm.Monad @@ -32,13 +32,13 @@ import GHC.StgToCmm.Ticky import GHC.StgToCmm.Closure import GHC.StgToCmm.Env -import MkGraph +import GHC.Cmm.Graph -import Hoopl.Label -import SMRep -import BlockId -import Cmm -import CmmUtils +import GHC.Cmm.Dataflow.Label +import GHC.Runtime.Layout +import GHC.Cmm.BlockId +import GHC.Cmm +import GHC.Cmm.Utils import CostCentre import IdInfo( CafInfo(..), mayHaveCafRefs ) import Id ( Id ) @@ -337,7 +337,7 @@ entryHeapCheck cl_info nodeSet arity args code Just (_, ArgGen _) -> False _otherwise -> True --- | lower-level version for CmmParse +-- | lower-level version for GHC.Cmm.Parser entryHeapCheck' :: Bool -- is a known function pattern -> CmmExpr -- expression for the closure pointer -> Int -- Arity -- not same as len args b/c of voids diff --git a/compiler/GHC/StgToCmm/Hpc.hs b/compiler/GHC/StgToCmm/Hpc.hs index e33d39245c..a3f4112206 100644 --- a/compiler/GHC/StgToCmm/Hpc.hs +++ b/compiler/GHC/StgToCmm/Hpc.hs @@ -12,11 +12,11 @@ import GhcPrelude import GHC.StgToCmm.Monad -import MkGraph -import CmmExpr -import CLabel +import GHC.Cmm.Graph +import GHC.Cmm.Expr +import GHC.Cmm.CLabel import Module -import CmmUtils +import GHC.Cmm.Utils import GHC.StgToCmm.Utils import HscTypes import DynFlags diff --git a/compiler/GHC/StgToCmm/Layout.hs b/compiler/GHC/StgToCmm/Layout.hs index 6d7825eb93..e78221de3a 100644 --- a/compiler/GHC/StgToCmm/Layout.hs +++ b/compiler/GHC/StgToCmm/Layout.hs @@ -41,13 +41,13 @@ import GHC.StgToCmm.Ticky import GHC.StgToCmm.Monad import GHC.StgToCmm.Utils -import MkGraph -import SMRep -import BlockId -import Cmm -import CmmUtils -import CmmInfo -import CLabel +import GHC.Cmm.Graph +import GHC.Runtime.Layout +import GHC.Cmm.BlockId +import GHC.Cmm +import GHC.Cmm.Utils +import GHC.Cmm.Info +import GHC.Cmm.CLabel import GHC.Stg.Syntax import Id import TyCon ( PrimRep(..), primRepSizeB ) diff --git a/compiler/GHC/StgToCmm/Monad.hs b/compiler/GHC/StgToCmm/Monad.hs index 716cbdab78..4f7d2e1220 100644 --- a/compiler/GHC/StgToCmm/Monad.hs +++ b/compiler/GHC/StgToCmm/Monad.hs @@ -61,14 +61,14 @@ module GHC.StgToCmm.Monad ( import GhcPrelude hiding( sequence, succ ) -import Cmm +import GHC.Cmm import GHC.StgToCmm.Closure import DynFlags -import Hoopl.Collections -import MkGraph -import BlockId -import CLabel -import SMRep +import GHC.Cmm.Dataflow.Collections +import GHC.Cmm.Graph as CmmGraph +import GHC.Cmm.BlockId +import GHC.Cmm.CLabel +import GHC.Runtime.Layout import Module import Id import VarEnv @@ -369,7 +369,7 @@ addCodeBlocksFrom :: CgState -> CgState -> CgState -- Add code blocks from the latter to the former -- (The cgs_stmts will often be empty, but not always; see codeOnly) s1 `addCodeBlocksFrom` s2 - = s1 { cgs_stmts = cgs_stmts s1 MkGraph.<*> cgs_stmts s2, + = s1 { cgs_stmts = cgs_stmts s1 CmmGraph.<*> cgs_stmts s2, cgs_tops = cgs_tops s1 `appOL` cgs_tops s2 } @@ -715,7 +715,7 @@ emitStore l r = emitCgStmt (CgStmt (CmmStore l r)) emit :: CmmAGraph -> FCode () emit ag = do { state <- getState - ; setState $ state { cgs_stmts = cgs_stmts state MkGraph.<*> ag } } + ; setState $ state { cgs_stmts = cgs_stmts state CmmGraph.<*> ag } } emitDecl :: CmmDecl -> FCode () emitDecl decl @@ -743,7 +743,7 @@ emitProcWithStackFrame conv mb_info lbl stk_args args (graph, tscope) True -- do layout = do { dflags <- getDynFlags ; let (offset, live, entry) = mkCallEntry dflags conv args stk_args - graph' = entry MkGraph.<*> graph + graph' = entry CmmGraph.<*> graph ; emitProc mb_info lbl live (graph', tscope) offset True } emitProcWithStackFrame _ _ _ _ _ _ _ = panic "emitProcWithStackFrame" diff --git a/compiler/GHC/StgToCmm/Prim.hs b/compiler/GHC/StgToCmm/Prim.hs index e469e15a5d..06264099df 100644 --- a/compiler/GHC/StgToCmm/Prim.hs +++ b/compiler/GHC/StgToCmm/Prim.hs @@ -36,17 +36,17 @@ import GHC.StgToCmm.Prof ( costCentreFrom ) import DynFlags import GHC.Platform import BasicTypes -import BlockId -import MkGraph +import GHC.Cmm.BlockId +import GHC.Cmm.Graph import GHC.Stg.Syntax -import Cmm +import GHC.Cmm import Module ( rtsUnitId ) import Type ( Type, tyConAppTyCon ) import TyCon -import CLabel -import CmmUtils +import GHC.Cmm.CLabel +import GHC.Cmm.Utils import PrimOp -import SMRep +import GHC.Runtime.Layout import FastString import Outputable import Util @@ -1525,7 +1525,7 @@ emitPrimOp dflags = \case -- `quot` and `rem` with constant divisor can be implemented with fast bit-ops -- (shift, .&.). -- - -- Currently we only support optimization (performed in CmmOpt) when the + -- Currently we only support optimization (performed in GHC.Cmm.Opt) when the -- constant is a power of 2. #9041 tracks the implementation of the general -- optimization. -- diff --git a/compiler/GHC/StgToCmm/Prof.hs b/compiler/GHC/StgToCmm/Prof.hs index 4743b79622..cf5ce5acfb 100644 --- a/compiler/GHC/StgToCmm/Prof.hs +++ b/compiler/GHC/StgToCmm/Prof.hs @@ -28,12 +28,12 @@ import GhcPrelude import GHC.StgToCmm.Closure import GHC.StgToCmm.Utils import GHC.StgToCmm.Monad -import SMRep +import GHC.Runtime.Layout -import MkGraph -import Cmm -import CmmUtils -import CLabel +import GHC.Cmm.Graph +import GHC.Cmm +import GHC.Cmm.Utils +import GHC.Cmm.CLabel import CostCentre import DynFlags diff --git a/compiler/GHC/StgToCmm/Ticky.hs b/compiler/GHC/StgToCmm/Ticky.hs index 9eeb134cc9..6e2e2d3a6b 100644 --- a/compiler/GHC/StgToCmm/Ticky.hs +++ b/compiler/GHC/StgToCmm/Ticky.hs @@ -23,9 +23,9 @@ Some of the relevant source files: * some codeGen/ modules import this one - * this module imports cmm/CLabel.hs to manage labels + * this module imports GHC.Cmm.CLabel to manage labels - * cmm/CmmParse.y expands some macros using generators defined in + * GHC.Cmm.Parser expands some macros using generators defined in this module * includes/stg/Ticky.h declares all of the global counters @@ -112,11 +112,11 @@ import GHC.StgToCmm.Utils import GHC.StgToCmm.Monad import GHC.Stg.Syntax -import CmmExpr -import MkGraph -import CmmUtils -import CLabel -import SMRep +import GHC.Cmm.Expr +import GHC.Cmm.Graph +import GHC.Cmm.Utils +import GHC.Cmm.CLabel +import GHC.Runtime.Layout import Module import Name @@ -517,7 +517,7 @@ tickyAllocHeap genuine hp -------------------------------------------------------------------------------- --- these three are only called from CmmParse.y (ie ultimately from the RTS) +-- these three are only called from GHC.Cmm.Parser (ie ultimately from the RTS) -- the units are bytes diff --git a/compiler/GHC/StgToCmm/Utils.hs b/compiler/GHC/StgToCmm/Utils.hs index 34fb93468c..7a784ea85c 100644 --- a/compiler/GHC/StgToCmm/Utils.hs +++ b/compiler/GHC/StgToCmm/Utils.hs @@ -52,20 +52,20 @@ import GhcPrelude import GHC.StgToCmm.Monad import GHC.StgToCmm.Closure -import Cmm -import BlockId -import MkGraph +import GHC.Cmm +import GHC.Cmm.BlockId +import GHC.Cmm.Graph as CmmGraph import GHC.Platform.Regs -import CLabel -import CmmUtils -import CmmSwitch +import GHC.Cmm.CLabel +import GHC.Cmm.Utils +import GHC.Cmm.Switch import GHC.StgToCmm.CgUtils import ForeignCall import IdInfo import Type import TyCon -import SMRep +import GHC.Runtime.Layout import Module import Literal import Digraph @@ -458,8 +458,8 @@ mk_discrete_switch _ _tag_expr [(_tag,lbl)] Nothing _ -- In that situation we can be sure the (:) case -- can't happen, so no need to test --- SOMETHING MORE COMPLICATED: defer to CmmImplementSwitchPlans --- See Note [Cmm Switches, the general plan] in CmmSwitch +-- SOMETHING MORE COMPLICATED: defer to GHC.Cmm.Switch.Implement +-- See Note [Cmm Switches, the general plan] in GHC.Cmm.Switch mk_discrete_switch signed tag_expr branches mb_deflt range = mkSwitch tag_expr $ mkSwitchTargets signed range mb_deflt (M.fromList branches) @@ -568,7 +568,7 @@ label_code :: BlockId -> CmmAGraphScoped -> FCode BlockId -- and returns L label_code join_lbl (code,tsc) = do lbl <- newBlockId - emitOutOfLine lbl (code MkGraph.<*> mkBranch join_lbl, tsc) + emitOutOfLine lbl (code CmmGraph.<*> mkBranch join_lbl, tsc) return lbl -------------- |