summaryrefslogtreecommitdiff
path: root/compiler/nativeGen
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/nativeGen')
-rw-r--r--compiler/nativeGen/AsmCodeGen.hs22
-rw-r--r--compiler/nativeGen/BlockLayout.hs10
-rw-r--r--compiler/nativeGen/CFG.hs25
-rw-r--r--compiler/nativeGen/CPrim.hs4
-rw-r--r--compiler/nativeGen/Dwarf.hs10
-rw-r--r--compiler/nativeGen/Dwarf/Types.hs6
-rw-r--r--compiler/nativeGen/Format.hs2
-rw-r--r--compiler/nativeGen/Instruction.hs8
-rw-r--r--compiler/nativeGen/NCGMonad.hs12
-rw-r--r--compiler/nativeGen/PIC.hs8
-rw-r--r--compiler/nativeGen/PPC/CodeGen.hs16
-rw-r--r--compiler/nativeGen/PPC/Instr.hs12
-rw-r--r--compiler/nativeGen/PPC/Ppr.hs12
-rw-r--r--compiler/nativeGen/PPC/RegInfo.hs6
-rw-r--r--compiler/nativeGen/PPC/Regs.hs4
-rw-r--r--compiler/nativeGen/PprBase.hs4
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Coalesce.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/Spill.hs6
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/SpillClean.hs6
-rw-r--r--compiler/nativeGen/RegAlloc/Graph/SpillCost.hs6
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/Base.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs4
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/Main.hs8
-rw-r--r--compiler/nativeGen/RegAlloc/Linear/State.hs2
-rw-r--r--compiler/nativeGen/RegAlloc/Liveness.hs8
-rw-r--r--compiler/nativeGen/SPARC/CodeGen.hs14
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Amode.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Base.hs4
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/CondCode.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Expand.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Gen32.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Gen64.hs2
-rw-r--r--compiler/nativeGen/SPARC/CodeGen/Sanity.hs2
-rw-r--r--compiler/nativeGen/SPARC/Imm.hs4
-rw-r--r--compiler/nativeGen/SPARC/Instr.hs6
-rw-r--r--compiler/nativeGen/SPARC/Ppr.hs12
-rw-r--r--compiler/nativeGen/SPARC/ShortcutJump.hs6
-rw-r--r--compiler/nativeGen/X86/CodeGen.hs22
-rw-r--r--compiler/nativeGen/X86/Instr.hs12
-rw-r--r--compiler/nativeGen/X86/Ppr.hs10
-rw-r--r--compiler/nativeGen/X86/Regs.hs4
42 files changed, 156 insertions, 157 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.hs b/compiler/nativeGen/AsmCodeGen.hs
index 556c943dc2..021fbae195 100644
--- a/compiler/nativeGen/AsmCodeGen.hs
+++ b/compiler/nativeGen/AsmCodeGen.hs
@@ -67,18 +67,18 @@ import Reg
import NCGMonad
import CFG
import Dwarf
-import Debug
+import GHC.Cmm.DebugBlock
-import BlockId
+import GHC.Cmm.BlockId
import GHC.StgToCmm.CgUtils ( fixStgRegisters )
-import Cmm
-import CmmUtils
-import Hoopl.Collections
-import Hoopl.Label
-import Hoopl.Block
-import CmmOpt ( cmmMachOpFold )
-import PprCmm
-import CLabel
+import GHC.Cmm
+import GHC.Cmm.Utils
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm.Dataflow.Block
+import GHC.Cmm.Opt ( cmmMachOpFold )
+import GHC.Cmm.Ppr
+import GHC.Cmm.CLabel
import UniqFM
import UniqSupply
@@ -826,7 +826,7 @@ computeUnwinding _ ncgImpl (CmmProc _ _ _ (ListGraph blks)) =
-- relevant register writes within a procedure.
--
-- However, the only unwinding information that we care about in GHC is for
- -- Sp. The fact that CmmLayoutStack already ensures that we have unwind
+ -- Sp. The fact that GHC.Cmm.LayoutStack already ensures that we have unwind
-- information at the beginning of every block means that there is no need
-- to perform this sort of push-down.
mapFromList [ (blk_lbl, extractUnwindPoints ncgImpl instrs)
diff --git a/compiler/nativeGen/BlockLayout.hs b/compiler/nativeGen/BlockLayout.hs
index 5e81316ab3..3f74065e4e 100644
--- a/compiler/nativeGen/BlockLayout.hs
+++ b/compiler/nativeGen/BlockLayout.hs
@@ -20,10 +20,10 @@ import Instruction
import NCGMonad
import CFG
-import BlockId
-import Cmm
-import Hoopl.Collections
-import Hoopl.Label
+import GHC.Cmm.BlockId
+import GHC.Cmm
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
import DynFlags (gopt, GeneralFlag(..), DynFlags, backendMaintainsCfg)
import UniqFM
@@ -35,7 +35,7 @@ import Outputable
import Maybes
-- DEBUGGING ONLY
---import Debug
+--import GHC.Cmm.DebugBlock
--import Debug.Trace
import ListSetOps (removeDups)
diff --git a/compiler/nativeGen/CFG.hs b/compiler/nativeGen/CFG.hs
index 4dc5f9ccb3..90573221f8 100644
--- a/compiler/nativeGen/CFG.hs
+++ b/compiler/nativeGen/CFG.hs
@@ -46,15 +46,15 @@ where
import GhcPrelude
-import BlockId
-import Cmm
+import GHC.Cmm.BlockId
+import GHC.Cmm as Cmm
-import CmmUtils
-import CmmSwitch
-import Hoopl.Collections
-import Hoopl.Label
-import Hoopl.Block
-import qualified Hoopl.Graph as G
+import GHC.Cmm.Utils
+import GHC.Cmm.Switch
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm.Dataflow.Block
+import qualified GHC.Cmm.Dataflow.Graph as G
import Util
import Digraph
@@ -74,11 +74,10 @@ import Data.Bifunctor
import Outputable
-- DEBUGGING ONLY
---import Debug
--- import Debug.Trace
+--import GHC.Cmm.DebugBlock
--import OrdList
---import Debug.Trace
-import PprCmm () -- For Outputable instances
+--import GHC.Cmm.DebugBlock.Trace
+import GHC.Cmm.Ppr () -- For Outputable instances
import qualified DynFlags as D
import Data.List
@@ -250,7 +249,7 @@ filterEdges f cfg =
{- Note [Updating the CFG during shortcutting]
See Note [What is shortcutting] in the control flow optimization
-code (CmmContFlowOpt.hs) for a slightly more in depth explanation on shortcutting.
+code (GHC.Cmm.ContFlowOpt) for a slightly more in depth explanation on shortcutting.
In the native backend we shortcut jumps at the assembly level. (AsmCodeGen.hs)
This means we remove blocks containing only one jump from the code
diff --git a/compiler/nativeGen/CPrim.hs b/compiler/nativeGen/CPrim.hs
index 17e5cda845..344e62d53c 100644
--- a/compiler/nativeGen/CPrim.hs
+++ b/compiler/nativeGen/CPrim.hs
@@ -16,8 +16,8 @@ module CPrim
import GhcPrelude
-import CmmType
-import CmmMachOp
+import GHC.Cmm.Type
+import GHC.Cmm.MachOp
import Outputable
popCntLabel :: Width -> String
diff --git a/compiler/nativeGen/Dwarf.hs b/compiler/nativeGen/Dwarf.hs
index 33f1c5b2f7..a64df287f5 100644
--- a/compiler/nativeGen/Dwarf.hs
+++ b/compiler/nativeGen/Dwarf.hs
@@ -4,11 +4,11 @@ module Dwarf (
import GhcPrelude
-import CLabel
-import CmmExpr ( GlobalReg(..) )
+import GHC.Cmm.CLabel
+import GHC.Cmm.Expr ( GlobalReg(..) )
import Config ( cProjectName, cProjectVersion )
import CoreSyn ( Tickish(..) )
-import Debug
+import GHC.Cmm.DebugBlock
import DynFlags
import Module
import Outputable
@@ -28,8 +28,8 @@ import qualified Data.Map as Map
import System.FilePath
import System.Directory ( getCurrentDirectory )
-import qualified Hoopl.Label as H
-import qualified Hoopl.Collections as H
+import qualified GHC.Cmm.Dataflow.Label as H
+import qualified GHC.Cmm.Dataflow.Collections as H
-- | Generate DWARF/debug information
dwarfGen :: DynFlags -> ModLocation -> UniqSupply -> [DebugBlock]
diff --git a/compiler/nativeGen/Dwarf/Types.hs b/compiler/nativeGen/Dwarf/Types.hs
index a6ba596f35..df578e2671 100644
--- a/compiler/nativeGen/Dwarf/Types.hs
+++ b/compiler/nativeGen/Dwarf/Types.hs
@@ -24,9 +24,9 @@ module Dwarf.Types
import GhcPrelude
-import Debug
-import CLabel
-import CmmExpr ( GlobalReg(..) )
+import GHC.Cmm.DebugBlock
+import GHC.Cmm.CLabel
+import GHC.Cmm.Expr ( GlobalReg(..) )
import Encoding
import FastString
import Outputable
diff --git a/compiler/nativeGen/Format.hs b/compiler/nativeGen/Format.hs
index 745d1e7b65..d7b6f6b868 100644
--- a/compiler/nativeGen/Format.hs
+++ b/compiler/nativeGen/Format.hs
@@ -22,7 +22,7 @@ where
import GhcPrelude
-import Cmm
+import GHC.Cmm
import Outputable
-- It looks very like the old MachRep, but it's now of purely local
diff --git a/compiler/nativeGen/Instruction.hs b/compiler/nativeGen/Instruction.hs
index 4f18a45c16..150bd8adba 100644
--- a/compiler/nativeGen/Instruction.hs
+++ b/compiler/nativeGen/Instruction.hs
@@ -18,11 +18,11 @@ import GhcPrelude
import Reg
-import BlockId
-import Hoopl.Collections
-import Hoopl.Label
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
import DynFlags
-import Cmm hiding (topInfoTable)
+import GHC.Cmm hiding (topInfoTable)
import GHC.Platform
-- | Holds a list of source and destination registers used by a
diff --git a/compiler/nativeGen/NCGMonad.hs b/compiler/nativeGen/NCGMonad.hs
index e1bb927d0b..b963623535 100644
--- a/compiler/nativeGen/NCGMonad.hs
+++ b/compiler/nativeGen/NCGMonad.hs
@@ -49,11 +49,11 @@ import Reg
import Format
import TargetReg
-import BlockId
-import Hoopl.Collections
-import Hoopl.Label
-import CLabel ( CLabel )
-import Debug
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm.CLabel ( CLabel )
+import GHC.Cmm.DebugBlock
import FastString ( FastString )
import UniqFM
import UniqSupply
@@ -65,7 +65,7 @@ import Control.Monad ( ap )
import Instruction
import Outputable (SDoc, pprPanic, ppr)
-import Cmm (RawCmmDecl, CmmStatics)
+import GHC.Cmm (RawCmmDecl, CmmStatics)
import CFG
data NcgImpl statics instr jumpDest = NcgImpl {
diff --git a/compiler/nativeGen/PIC.hs b/compiler/nativeGen/PIC.hs
index 760ba7925d..e4aba00596 100644
--- a/compiler/nativeGen/PIC.hs
+++ b/compiler/nativeGen/PIC.hs
@@ -60,14 +60,14 @@ import Reg
import NCGMonad
-import Hoopl.Collections
-import Cmm
-import CLabel ( CLabel, ForeignLabelSource(..), pprCLabel,
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm
+import GHC.Cmm.CLabel ( CLabel, ForeignLabelSource(..), pprCLabel,
mkDynamicLinkerLabel, DynamicLinkerLabelInfo(..),
dynamicLinkerLabelInfo, mkPicBaseLabel,
labelDynamic, externallyVisibleCLabel )
-import CLabel ( mkForeignLabel )
+import GHC.Cmm.CLabel ( mkForeignLabel )
import BasicTypes
diff --git a/compiler/nativeGen/PPC/CodeGen.hs b/compiler/nativeGen/PPC/CodeGen.hs
index e669630956..4d9a38b9de 100644
--- a/compiler/nativeGen/PPC/CodeGen.hs
+++ b/compiler/nativeGen/PPC/CodeGen.hs
@@ -42,14 +42,14 @@ import TargetReg
import GHC.Platform
-- Our intermediate code:
-import BlockId
-import PprCmm ( pprExpr )
-import Cmm
-import CmmUtils
-import CmmSwitch
-import CLabel
-import Hoopl.Block
-import Hoopl.Graph
+import GHC.Cmm.BlockId
+import GHC.Cmm.Ppr ( pprExpr )
+import GHC.Cmm
+import GHC.Cmm.Utils
+import GHC.Cmm.Switch
+import GHC.Cmm.CLabel
+import GHC.Cmm.Dataflow.Block
+import GHC.Cmm.Dataflow.Graph
-- The rest:
import OrdList
diff --git a/compiler/nativeGen/PPC/Instr.hs b/compiler/nativeGen/PPC/Instr.hs
index 69aa954485..d19282fee6 100644
--- a/compiler/nativeGen/PPC/Instr.hs
+++ b/compiler/nativeGen/PPC/Instr.hs
@@ -33,14 +33,14 @@ import RegClass
import Reg
import GHC.Platform.Regs
-import BlockId
-import Hoopl.Collections
-import Hoopl.Label
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
import DynFlags
-import Cmm
-import CmmInfo
+import GHC.Cmm
+import GHC.Cmm.Info
import FastString
-import CLabel
+import GHC.Cmm.CLabel
import Outputable
import GHC.Platform
import UniqFM (listToUFM, lookupUFM)
diff --git a/compiler/nativeGen/PPC/Ppr.hs b/compiler/nativeGen/PPC/Ppr.hs
index ea0b36fb64..9669076bef 100644
--- a/compiler/nativeGen/PPC/Ppr.hs
+++ b/compiler/nativeGen/PPC/Ppr.hs
@@ -21,13 +21,13 @@ import Reg
import RegClass
import TargetReg
-import Cmm hiding (topInfoTable)
-import Hoopl.Collections
-import Hoopl.Label
+import GHC.Cmm hiding (topInfoTable)
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
-import BlockId
-import CLabel
-import PprCmmExpr () -- For Outputable instances
+import GHC.Cmm.BlockId
+import GHC.Cmm.CLabel
+import GHC.Cmm.Ppr.Expr () -- For Outputable instances
import Unique ( pprUniqueAlways, getUnique )
import GHC.Platform
diff --git a/compiler/nativeGen/PPC/RegInfo.hs b/compiler/nativeGen/PPC/RegInfo.hs
index 5ed0ccded3..e99a69313e 100644
--- a/compiler/nativeGen/PPC/RegInfo.hs
+++ b/compiler/nativeGen/PPC/RegInfo.hs
@@ -23,9 +23,9 @@ import GhcPrelude
import PPC.Instr
-import BlockId
-import Cmm
-import CLabel
+import GHC.Cmm.BlockId
+import GHC.Cmm
+import GHC.Cmm.CLabel
import Unique
import Outputable (ppr, text, Outputable, (<>))
diff --git a/compiler/nativeGen/PPC/Regs.hs b/compiler/nativeGen/PPC/Regs.hs
index b0087901a8..66aa006311 100644
--- a/compiler/nativeGen/PPC/Regs.hs
+++ b/compiler/nativeGen/PPC/Regs.hs
@@ -55,8 +55,8 @@ import Reg
import RegClass
import Format
-import Cmm
-import CLabel ( CLabel )
+import GHC.Cmm
+import GHC.Cmm.CLabel ( CLabel )
import Unique
import GHC.Platform.Regs
diff --git a/compiler/nativeGen/PprBase.hs b/compiler/nativeGen/PprBase.hs
index 48e9e26ae4..c5574b35f0 100644
--- a/compiler/nativeGen/PprBase.hs
+++ b/compiler/nativeGen/PprBase.hs
@@ -23,8 +23,8 @@ where
import GhcPrelude
import AsmUtils
-import CLabel
-import Cmm
+import GHC.Cmm.CLabel
+import GHC.Cmm
import DynFlags
import FastString
import Outputable
diff --git a/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
index 5ca2412c73..f42ff9450a 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
@@ -9,7 +9,7 @@ import RegAlloc.Liveness
import Instruction
import Reg
-import Cmm
+import GHC.Cmm
import Bag
import Digraph
import UniqFM
diff --git a/compiler/nativeGen/RegAlloc/Graph/Spill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs
index 22a88c02c0..9ffb51ee29 100644
--- a/compiler/nativeGen/RegAlloc/Graph/Spill.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs
@@ -12,9 +12,9 @@ import GhcPrelude
import RegAlloc.Liveness
import Instruction
import Reg
-import Cmm hiding (RegSet)
-import BlockId
-import Hoopl.Collections
+import GHC.Cmm hiding (RegSet)
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
import MonadUtils
import State
diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
index 79dbf63a66..bd8b449cbb 100644
--- a/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
@@ -35,15 +35,15 @@ import RegAlloc.Liveness
import Instruction
import Reg
-import BlockId
-import Cmm
+import GHC.Cmm.BlockId
+import GHC.Cmm
import UniqSet
import UniqFM
import Unique
import State
import Outputable
import GHC.Platform
-import Hoopl.Collections
+import GHC.Cmm.Dataflow.Collections
import Data.List
import Data.Maybe
diff --git a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
index 42de5503ba..4870bf5269 100644
--- a/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
+++ b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
@@ -22,9 +22,9 @@ import Reg
import GraphBase
-import Hoopl.Collections (mapLookup)
-import Hoopl.Label
-import Cmm
+import GHC.Cmm.Dataflow.Collections (mapLookup)
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm
import UniqFM
import UniqSet
import Digraph (flattenSCCs)
diff --git a/compiler/nativeGen/RegAlloc/Linear/Base.hs b/compiler/nativeGen/RegAlloc/Linear/Base.hs
index ad0fafb3ed..3c6965c1dd 100644
--- a/compiler/nativeGen/RegAlloc/Linear/Base.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/Base.hs
@@ -28,7 +28,7 @@ import Outputable
import Unique
import UniqFM
import UniqSupply
-import BlockId
+import GHC.Cmm.BlockId
-- | Used to store the register assignment on entry to a basic block.
diff --git a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
index 546d48af21..c21ab1bea1 100644
--- a/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
@@ -18,8 +18,8 @@ import RegAlloc.Liveness
import Instruction
import Reg
-import BlockId
-import Hoopl.Collections
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
import Digraph
import DynFlags
import Outputable
diff --git a/compiler/nativeGen/RegAlloc/Linear/Main.hs b/compiler/nativeGen/RegAlloc/Linear/Main.hs
index eac9194c6a..bccffb208c 100644
--- a/compiler/nativeGen/RegAlloc/Linear/Main.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/Main.hs
@@ -119,9 +119,9 @@ import RegAlloc.Liveness
import Instruction
import Reg
-import BlockId
-import Hoopl.Collections
-import Cmm hiding (RegSet)
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm hiding (RegSet)
import Digraph
import DynFlags
@@ -777,7 +777,7 @@ allocateRegsAndSpill reading keep spills alloc (r:rs)
-- NOTE: if the input to the NCG contains some
-- unreachable blocks with junk code, this panic
-- might be triggered. Make sure you only feed
- -- sensible code into the NCG. In CmmPipeline we
+ -- sensible code into the NCG. In GHC.Cmm.Pipeline we
-- call removeUnreachableBlocks at the end for this
-- reason.
diff --git a/compiler/nativeGen/RegAlloc/Linear/State.hs b/compiler/nativeGen/RegAlloc/Linear/State.hs
index 43b8f6c129..d24690f04c 100644
--- a/compiler/nativeGen/RegAlloc/Linear/State.hs
+++ b/compiler/nativeGen/RegAlloc/Linear/State.hs
@@ -44,7 +44,7 @@ import RegAlloc.Linear.Base
import RegAlloc.Liveness
import Instruction
import Reg
-import BlockId
+import GHC.Cmm.BlockId
import DynFlags
import Unique
diff --git a/compiler/nativeGen/RegAlloc/Liveness.hs b/compiler/nativeGen/RegAlloc/Liveness.hs
index a5a9b503cd..c39ee4895a 100644
--- a/compiler/nativeGen/RegAlloc/Liveness.hs
+++ b/compiler/nativeGen/RegAlloc/Liveness.hs
@@ -40,11 +40,11 @@ import GhcPrelude
import Reg
import Instruction
-import BlockId
+import GHC.Cmm.BlockId
import CFG
-import Hoopl.Collections
-import Hoopl.Label
-import Cmm hiding (RegSet, emptyRegSet)
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm hiding (RegSet, emptyRegSet)
import Digraph
import DynFlags
diff --git a/compiler/nativeGen/SPARC/CodeGen.hs b/compiler/nativeGen/SPARC/CodeGen.hs
index 46b29d0a03..d8cda40d1a 100644
--- a/compiler/nativeGen/SPARC/CodeGen.hs
+++ b/compiler/nativeGen/SPARC/CodeGen.hs
@@ -39,15 +39,15 @@ import Format
import NCGMonad ( NatM, getNewRegNat, getNewLabelNat )
-- Our intermediate code:
-import BlockId
-import Cmm
-import CmmUtils
-import CmmSwitch
-import Hoopl.Block
-import Hoopl.Graph
+import GHC.Cmm.BlockId
+import GHC.Cmm
+import GHC.Cmm.Utils
+import GHC.Cmm.Switch
+import GHC.Cmm.Dataflow.Block
+import GHC.Cmm.Dataflow.Graph
import PIC
import Reg
-import CLabel
+import GHC.Cmm.CLabel
import CPrim
-- The rest:
diff --git a/compiler/nativeGen/SPARC/CodeGen/Amode.hs b/compiler/nativeGen/SPARC/CodeGen/Amode.hs
index 33e3f535da..5351fc054b 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Amode.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Amode.hs
@@ -16,7 +16,7 @@ import SPARC.Base
import NCGMonad
import Format
-import Cmm
+import GHC.Cmm
import OrdList
diff --git a/compiler/nativeGen/SPARC/CodeGen/Base.hs b/compiler/nativeGen/SPARC/CodeGen/Base.hs
index 8a2f2f5a08..4497e1bd5d 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Base.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Base.hs
@@ -24,8 +24,8 @@ import Reg
import GHC.Platform.Regs
import DynFlags
-import Cmm
-import PprCmmExpr () -- For Outputable instances
+import GHC.Cmm
+import GHC.Cmm.Ppr.Expr () -- For Outputable instances
import GHC.Platform
import Outputable
diff --git a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
index e6b2e174b6..892cbb1a8f 100644
--- a/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/CondCode.hs
@@ -18,7 +18,7 @@ import SPARC.Base
import NCGMonad
import Format
-import Cmm
+import GHC.Cmm
import OrdList
import Outputable
diff --git a/compiler/nativeGen/SPARC/CodeGen/Expand.hs b/compiler/nativeGen/SPARC/CodeGen/Expand.hs
index 237311956e..ba7577602f 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Expand.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Expand.hs
@@ -14,7 +14,7 @@ import SPARC.Regs
import Instruction
import Reg
import Format
-import Cmm
+import GHC.Cmm
import Outputable
diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs
index a7a1f60416..a4f6214edc 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs
@@ -23,7 +23,7 @@ import NCGMonad
import Format
import Reg
-import Cmm
+import GHC.Cmm
import Control.Monad (liftM)
import DynFlags
diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot
index 43632c676d..1dbd2d3612 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot
+++ b/compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot
@@ -10,7 +10,7 @@ import SPARC.CodeGen.Base
import NCGMonad
import Reg
-import Cmm
+import GHC.Cmm
getSomeReg :: CmmExpr -> NatM (Reg, InstrBlock)
getRegister :: CmmExpr -> NatM Register
diff --git a/compiler/nativeGen/SPARC/CodeGen/Gen64.hs b/compiler/nativeGen/SPARC/CodeGen/Gen64.hs
index 18df9e19a3..a267cd22ab 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Gen64.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Gen64.hs
@@ -22,7 +22,7 @@ import Instruction
import Format
import Reg
-import Cmm
+import GHC.Cmm
import DynFlags
import OrdList
diff --git a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
index 7f9bfed229..b60c958a73 100644
--- a/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
+++ b/compiler/nativeGen/SPARC/CodeGen/Sanity.hs
@@ -12,7 +12,7 @@ import SPARC.Instr
import SPARC.Ppr () -- For Outputable instances
import Instruction
-import Cmm
+import GHC.Cmm
import Outputable
diff --git a/compiler/nativeGen/SPARC/Imm.hs b/compiler/nativeGen/SPARC/Imm.hs
index bd2d4ab131..78b6612bbf 100644
--- a/compiler/nativeGen/SPARC/Imm.hs
+++ b/compiler/nativeGen/SPARC/Imm.hs
@@ -9,8 +9,8 @@ where
import GhcPrelude
-import Cmm
-import CLabel
+import GHC.Cmm
+import GHC.Cmm.CLabel
import Outputable
diff --git a/compiler/nativeGen/SPARC/Instr.hs b/compiler/nativeGen/SPARC/Instr.hs
index c26cfcc4a0..43edfc61f4 100644
--- a/compiler/nativeGen/SPARC/Instr.hs
+++ b/compiler/nativeGen/SPARC/Instr.hs
@@ -38,11 +38,11 @@ import RegClass
import Reg
import Format
-import CLabel
+import GHC.Cmm.CLabel
import GHC.Platform.Regs
-import BlockId
+import GHC.Cmm.BlockId
import DynFlags
-import Cmm
+import GHC.Cmm
import FastString
import Outputable
import GHC.Platform
diff --git a/compiler/nativeGen/SPARC/Ppr.hs b/compiler/nativeGen/SPARC/Ppr.hs
index 5c7d9fabbd..7e40f0d60b 100644
--- a/compiler/nativeGen/SPARC/Ppr.hs
+++ b/compiler/nativeGen/SPARC/Ppr.hs
@@ -37,12 +37,12 @@ import Reg
import Format
import PprBase
-import Cmm hiding (topInfoTable)
-import PprCmm() -- For Outputable instances
-import BlockId
-import CLabel
-import Hoopl.Label
-import Hoopl.Collections
+import GHC.Cmm hiding (topInfoTable)
+import GHC.Cmm.Ppr() -- For Outputable instances
+import GHC.Cmm.BlockId
+import GHC.Cmm.CLabel
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm.Dataflow.Collections
import Unique ( pprUniqueAlways )
import Outputable
diff --git a/compiler/nativeGen/SPARC/ShortcutJump.hs b/compiler/nativeGen/SPARC/ShortcutJump.hs
index e2a8a71572..02d51de30f 100644
--- a/compiler/nativeGen/SPARC/ShortcutJump.hs
+++ b/compiler/nativeGen/SPARC/ShortcutJump.hs
@@ -13,9 +13,9 @@ import GhcPrelude
import SPARC.Instr
import SPARC.Imm
-import CLabel
-import BlockId
-import Cmm
+import GHC.Cmm.CLabel
+import GHC.Cmm.BlockId
+import GHC.Cmm
import Panic
import Outputable
diff --git a/compiler/nativeGen/X86/CodeGen.hs b/compiler/nativeGen/X86/CodeGen.hs
index 8cea28d920..14e7cb56ce 100644
--- a/compiler/nativeGen/X86/CodeGen.hs
+++ b/compiler/nativeGen/X86/CodeGen.hs
@@ -44,7 +44,7 @@ import X86.RegInfo
import GHC.Platform.Regs
import CPrim
-import Debug ( DebugBlock(..), UnwindPoint(..), UnwindTable
+import GHC.Cmm.DebugBlock ( DebugBlock(..), UnwindPoint(..), UnwindTable
, UnwindExpr(UwReg), toUnwindExpr )
import Instruction
import PIC
@@ -59,16 +59,16 @@ import GHC.Platform
-- Our intermediate code:
import BasicTypes
-import BlockId
+import GHC.Cmm.BlockId
import Module ( primUnitId )
-import CmmUtils
-import CmmSwitch
-import Cmm
-import Hoopl.Block
-import Hoopl.Collections
-import Hoopl.Graph
-import Hoopl.Label
-import CLabel
+import GHC.Cmm.Utils
+import GHC.Cmm.Switch
+import GHC.Cmm
+import GHC.Cmm.Dataflow.Block
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Graph
+import GHC.Cmm.Dataflow.Label
+import GHC.Cmm.CLabel
import CoreSyn ( Tickish(..) )
import SrcLoc ( srcSpanFile, srcSpanStartLine, srcSpanStartCol )
@@ -360,7 +360,7 @@ stmtToInstrs bid stmt = do
CmmBranch id -> return $ genBranch id
--We try to arrange blocks such that the likely branch is the fallthrough
- --in CmmContFlowOpt. So we can assume the condition is likely false here.
+ --in GHC.Cmm.ContFlowOpt. So we can assume the condition is likely false here.
CmmCondBranch arg true false _ -> genCondBranch bid true false arg
CmmSwitch arg ids -> do dflags <- getDynFlags
genSwitch dflags arg ids
diff --git a/compiler/nativeGen/X86/Instr.hs b/compiler/nativeGen/X86/Instr.hs
index 80a2c8b28e..4591464671 100644
--- a/compiler/nativeGen/X86/Instr.hs
+++ b/compiler/nativeGen/X86/Instr.hs
@@ -26,22 +26,22 @@ import RegClass
import Reg
import TargetReg
-import BlockId
-import Hoopl.Collections
-import Hoopl.Label
+import GHC.Cmm.BlockId
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
import GHC.Platform.Regs
-import Cmm
+import GHC.Cmm
import FastString
import Outputable
import GHC.Platform
import BasicTypes (Alignment)
-import CLabel
+import GHC.Cmm.CLabel
import DynFlags
import UniqSet
import Unique
import UniqSupply
-import Debug (UnwindTable)
+import GHC.Cmm.DebugBlock (UnwindTable)
import Control.Monad
import Data.Maybe (fromMaybe)
diff --git a/compiler/nativeGen/X86/Ppr.hs b/compiler/nativeGen/X86/Ppr.hs
index 76a806982e..d857a952ce 100644
--- a/compiler/nativeGen/X86/Ppr.hs
+++ b/compiler/nativeGen/X86/Ppr.hs
@@ -33,13 +33,13 @@ import Reg
import PprBase
-import Hoopl.Collections
-import Hoopl.Label
+import GHC.Cmm.Dataflow.Collections
+import GHC.Cmm.Dataflow.Label
import BasicTypes (Alignment, mkAlignment, alignmentBytes)
import DynFlags
-import Cmm hiding (topInfoTable)
-import BlockId
-import CLabel
+import GHC.Cmm hiding (topInfoTable)
+import GHC.Cmm.BlockId
+import GHC.Cmm.CLabel
import Unique ( pprUniqueAlways )
import GHC.Platform
import FastString
diff --git a/compiler/nativeGen/X86/Regs.hs b/compiler/nativeGen/X86/Regs.hs
index 24cdff89af..44f92017a1 100644
--- a/compiler/nativeGen/X86/Regs.hs
+++ b/compiler/nativeGen/X86/Regs.hs
@@ -55,8 +55,8 @@ import GHC.Platform.Regs
import Reg
import RegClass
-import Cmm
-import CLabel ( CLabel )
+import GHC.Cmm
+import GHC.Cmm.CLabel ( CLabel )
import DynFlags
import Outputable
import GHC.Platform