Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
0
Merge Requests
0
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Package Registry
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Dylan Yudaken
GHC
Commits
6e2d9ee2
Commit
6e2d9ee2
authored
Jan 07, 2020
by
Sylvain Henry
Committed by
Marge Bot
Jan 25, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Module hierarchy: Cmm (cf #13009)
parent
c3fde723
Changes
139
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
139 changed files
with
678 additions
and
669 deletions
+678
-669
aclocal.m4
aclocal.m4
+1
-1
compiler/GHC/Cmm.hs
compiler/GHC/Cmm.hs
+15
-15
compiler/GHC/Cmm/BlockId.hs
compiler/GHC/Cmm/BlockId.hs
+3
-3
compiler/GHC/Cmm/BlockId.hs-boot
compiler/GHC/Cmm/BlockId.hs-boot
+8
-0
compiler/GHC/Cmm/CLabel.hs
compiler/GHC/Cmm/CLabel.hs
+3
-3
compiler/GHC/Cmm/CallConv.hs
compiler/GHC/Cmm/CallConv.hs
+5
-5
compiler/GHC/Cmm/CommonBlockElim.hs
compiler/GHC/Cmm/CommonBlockElim.hs
+10
-10
compiler/GHC/Cmm/ContFlowOpt.hs
compiler/GHC/Cmm/ContFlowOpt.hs
+9
-9
compiler/GHC/Cmm/Dataflow.hs
compiler/GHC/Cmm/Dataflow.hs
+6
-6
compiler/GHC/Cmm/Dataflow/Block.hs
compiler/GHC/Cmm/Dataflow/Block.hs
+1
-1
compiler/GHC/Cmm/Dataflow/Collections.hs
compiler/GHC/Cmm/Dataflow/Collections.hs
+1
-1
compiler/GHC/Cmm/Dataflow/Graph.hs
compiler/GHC/Cmm/Dataflow/Graph.hs
+4
-4
compiler/GHC/Cmm/Dataflow/Label.hs
compiler/GHC/Cmm/Dataflow/Label.hs
+2
-2
compiler/GHC/Cmm/DebugBlock.hs
compiler/GHC/Cmm/DebugBlock.hs
+12
-12
compiler/GHC/Cmm/Expr.hs
compiler/GHC/Cmm/Expr.hs
+10
-10
compiler/GHC/Cmm/Graph.hs
compiler/GHC/Cmm/Graph.hs
+9
-9
compiler/GHC/Cmm/Info.hs
compiler/GHC/Cmm/Info.hs
+8
-8
compiler/GHC/Cmm/Info/Build.hs
compiler/GHC/Cmm/Info/Build.hs
+11
-11
compiler/GHC/Cmm/LayoutStack.hs
compiler/GHC/Cmm/LayoutStack.hs
+15
-15
compiler/GHC/Cmm/Lexer.x
compiler/GHC/Cmm/Lexer.x
+3
-3
compiler/GHC/Cmm/Lint.hs
compiler/GHC/Cmm/Lint.hs
+11
-11
compiler/GHC/Cmm/Liveness.hs
compiler/GHC/Cmm/Liveness.hs
+8
-8
compiler/GHC/Cmm/MachOp.hs
compiler/GHC/Cmm/MachOp.hs
+2
-2
compiler/GHC/Cmm/Monad.hs
compiler/GHC/Cmm/Monad.hs
+1
-1
compiler/GHC/Cmm/Node.hs
compiler/GHC/Cmm/Node.hs
+13
-13
compiler/GHC/Cmm/Opt.hs
compiler/GHC/Cmm/Opt.hs
+3
-3
compiler/GHC/Cmm/Parser.y
compiler/GHC/Cmm/Parser.y
+15
-15
compiler/GHC/Cmm/Pipeline.hs
compiler/GHC/Cmm/Pipeline.hs
+11
-11
compiler/GHC/Cmm/Ppr.hs
compiler/GHC/Cmm/Ppr.hs
+11
-11
compiler/GHC/Cmm/Ppr/Decl.hs
compiler/GHC/Cmm/Ppr/Decl.hs
+3
-3
compiler/GHC/Cmm/Ppr/Expr.hs
compiler/GHC/Cmm/Ppr/Expr.hs
+4
-4
compiler/GHC/Cmm/ProcPoint.hs
compiler/GHC/Cmm/ProcPoint.hs
+15
-15
compiler/GHC/Cmm/Sink.hs
compiler/GHC/Cmm/Sink.hs
+10
-10
compiler/GHC/Cmm/Switch.hs
compiler/GHC/Cmm/Switch.hs
+24
-22
compiler/GHC/Cmm/Switch/Implement.hs
compiler/GHC/Cmm/Switch/Implement.hs
+9
-9
compiler/GHC/Cmm/Type.hs
compiler/GHC/Cmm/Type.hs
+1
-1
compiler/GHC/Cmm/Utils.hs
compiler/GHC/Cmm/Utils.hs
+9
-9
compiler/GHC/Cmm/cmm-notes
compiler/GHC/Cmm/cmm-notes
+2
-2
compiler/GHC/CmmToC.hs
compiler/GHC/CmmToC.hs
+10
-10
compiler/GHC/Data/Bitmap.hs
compiler/GHC/Data/Bitmap.hs
+3
-3
compiler/GHC/Platform/Regs.hs
compiler/GHC/Platform/Regs.hs
+1
-1
compiler/GHC/Runtime/Layout.hs
compiler/GHC/Runtime/Layout.hs
+1
-1
compiler/GHC/Stg/Lift/Analysis.hs
compiler/GHC/Stg/Lift/Analysis.hs
+1
-1
compiler/GHC/StgToCmm.hs
compiler/GHC/StgToCmm.hs
+4
-4
compiler/GHC/StgToCmm/ArgRep.hs
compiler/GHC/StgToCmm/ArgRep.hs
+1
-1
compiler/GHC/StgToCmm/Bind.hs
compiler/GHC/StgToCmm/Bind.hs
+9
-9
compiler/GHC/StgToCmm/CgUtils.hs
compiler/GHC/StgToCmm/CgUtils.hs
+5
-5
compiler/GHC/StgToCmm/Closure.hs
compiler/GHC/StgToCmm/Closure.hs
+5
-5
compiler/GHC/StgToCmm/DataCon.hs
compiler/GHC/StgToCmm/DataCon.hs
+5
-5
compiler/GHC/StgToCmm/Env.hs
compiler/GHC/StgToCmm/Env.hs
+5
-5
compiler/GHC/StgToCmm/Expr.hs
compiler/GHC/StgToCmm/Expr.hs
+4
-4
compiler/GHC/StgToCmm/ExtCode.hs
compiler/GHC/StgToCmm/ExtCode.hs
+4
-4
compiler/GHC/StgToCmm/Foreign.hs
compiler/GHC/StgToCmm/Foreign.hs
+10
-10
compiler/GHC/StgToCmm/Heap.hs
compiler/GHC/StgToCmm/Heap.hs
+8
-8
compiler/GHC/StgToCmm/Hpc.hs
compiler/GHC/StgToCmm/Hpc.hs
+4
-4
compiler/GHC/StgToCmm/Layout.hs
compiler/GHC/StgToCmm/Layout.hs
+7
-7
compiler/GHC/StgToCmm/Monad.hs
compiler/GHC/StgToCmm/Monad.hs
+9
-9
compiler/GHC/StgToCmm/Prim.hs
compiler/GHC/StgToCmm/Prim.hs
+7
-7
compiler/GHC/StgToCmm/Prof.hs
compiler/GHC/StgToCmm/Prof.hs
+5
-5
compiler/GHC/StgToCmm/Ticky.hs
compiler/GHC/StgToCmm/Ticky.hs
+8
-8
compiler/GHC/StgToCmm/Utils.hs
compiler/GHC/StgToCmm/Utils.hs
+10
-10
compiler/basicTypes/Unique.hs
compiler/basicTypes/Unique.hs
+1
-1
compiler/deSugar/Coverage.hs
compiler/deSugar/Coverage.hs
+1
-1
compiler/deSugar/DsForeign.hs
compiler/deSugar/DsForeign.hs
+2
-2
compiler/ghc.cabal.in
compiler/ghc.cabal.in
+38
-38
compiler/ghci/ByteCodeAsm.hs
compiler/ghci/ByteCodeAsm.hs
+1
-1
compiler/ghci/ByteCodeGen.hs
compiler/ghci/ByteCodeGen.hs
+2
-2
compiler/ghci/ByteCodeInstr.hs
compiler/ghci/ByteCodeInstr.hs
+1
-1
compiler/ghci/RtClosureInspect.hs
compiler/ghci/RtClosureInspect.hs
+1
-1
compiler/llvmGen/LlvmCodeGen.hs
compiler/llvmGen/LlvmCodeGen.hs
+3
-3
compiler/llvmGen/LlvmCodeGen/Base.hs
compiler/llvmGen/LlvmCodeGen/Base.hs
+3
-3
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
compiler/llvmGen/LlvmCodeGen/CodeGen.hs
+9
-9
compiler/llvmGen/LlvmCodeGen/Data.hs
compiler/llvmGen/LlvmCodeGen/Data.hs
+3
-3
compiler/llvmGen/LlvmCodeGen/Ppr.hs
compiler/llvmGen/LlvmCodeGen/Ppr.hs
+2
-2
compiler/llvmGen/LlvmCodeGen/Regs.hs
compiler/llvmGen/LlvmCodeGen/Regs.hs
+1
-1
compiler/main/CodeOutput.hs
compiler/main/CodeOutput.hs
+3
-3
compiler/main/Hooks.hs
compiler/main/Hooks.hs
+1
-1
compiler/main/HscMain.hs
compiler/main/HscMain.hs
+5
-5
compiler/main/StaticPtrTable.hs
compiler/main/StaticPtrTable.hs
+1
-1
compiler/nativeGen/AsmCodeGen.hs
compiler/nativeGen/AsmCodeGen.hs
+11
-11
compiler/nativeGen/BlockLayout.hs
compiler/nativeGen/BlockLayout.hs
+5
-5
compiler/nativeGen/CFG.hs
compiler/nativeGen/CFG.hs
+12
-13
compiler/nativeGen/CPrim.hs
compiler/nativeGen/CPrim.hs
+2
-2
compiler/nativeGen/Dwarf.hs
compiler/nativeGen/Dwarf.hs
+5
-5
compiler/nativeGen/Dwarf/Types.hs
compiler/nativeGen/Dwarf/Types.hs
+3
-3
compiler/nativeGen/Format.hs
compiler/nativeGen/Format.hs
+1
-1
compiler/nativeGen/Instruction.hs
compiler/nativeGen/Instruction.hs
+4
-4
compiler/nativeGen/NCGMonad.hs
compiler/nativeGen/NCGMonad.hs
+6
-6
compiler/nativeGen/PIC.hs
compiler/nativeGen/PIC.hs
+4
-4
compiler/nativeGen/PPC/CodeGen.hs
compiler/nativeGen/PPC/CodeGen.hs
+8
-8
compiler/nativeGen/PPC/Instr.hs
compiler/nativeGen/PPC/Instr.hs
+6
-6
compiler/nativeGen/PPC/Ppr.hs
compiler/nativeGen/PPC/Ppr.hs
+6
-6
compiler/nativeGen/PPC/RegInfo.hs
compiler/nativeGen/PPC/RegInfo.hs
+3
-3
compiler/nativeGen/PPC/Regs.hs
compiler/nativeGen/PPC/Regs.hs
+2
-2
compiler/nativeGen/PprBase.hs
compiler/nativeGen/PprBase.hs
+2
-2
compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
+1
-1
compiler/nativeGen/RegAlloc/Graph/Spill.hs
compiler/nativeGen/RegAlloc/Graph/Spill.hs
+3
-3
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
+3
-3
compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
+3
-3
compiler/nativeGen/RegAlloc/Linear/Base.hs
compiler/nativeGen/RegAlloc/Linear/Base.hs
+1
-1
compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
compiler/nativeGen/RegAlloc/Linear/JoinToTargets.hs
+2
-2
compiler/nativeGen/RegAlloc/Linear/Main.hs
compiler/nativeGen/RegAlloc/Linear/Main.hs
+4
-4
compiler/nativeGen/RegAlloc/Linear/State.hs
compiler/nativeGen/RegAlloc/Linear/State.hs
+1
-1
compiler/nativeGen/RegAlloc/Liveness.hs
compiler/nativeGen/RegAlloc/Liveness.hs
+4
-4
compiler/nativeGen/SPARC/CodeGen.hs
compiler/nativeGen/SPARC/CodeGen.hs
+7
-7
compiler/nativeGen/SPARC/CodeGen/Amode.hs
compiler/nativeGen/SPARC/CodeGen/Amode.hs
+1
-1
compiler/nativeGen/SPARC/CodeGen/Base.hs
compiler/nativeGen/SPARC/CodeGen/Base.hs
+2
-2
compiler/nativeGen/SPARC/CodeGen/CondCode.hs
compiler/nativeGen/SPARC/CodeGen/CondCode.hs
+1
-1
compiler/nativeGen/SPARC/CodeGen/Expand.hs
compiler/nativeGen/SPARC/CodeGen/Expand.hs
+1
-1
compiler/nativeGen/SPARC/CodeGen/Gen32.hs
compiler/nativeGen/SPARC/CodeGen/Gen32.hs
+1
-1
compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot
compiler/nativeGen/SPARC/CodeGen/Gen32.hs-boot
+1
-1
compiler/nativeGen/SPARC/CodeGen/Gen64.hs
compiler/nativeGen/SPARC/CodeGen/Gen64.hs
+1
-1
compiler/nativeGen/SPARC/CodeGen/Sanity.hs
compiler/nativeGen/SPARC/CodeGen/Sanity.hs
+1
-1
compiler/nativeGen/SPARC/Imm.hs
compiler/nativeGen/SPARC/Imm.hs
+2
-2
compiler/nativeGen/SPARC/Instr.hs
compiler/nativeGen/SPARC/Instr.hs
+3
-3
compiler/nativeGen/SPARC/Ppr.hs
compiler/nativeGen/SPARC/Ppr.hs
+6
-6
compiler/nativeGen/SPARC/ShortcutJump.hs
compiler/nativeGen/SPARC/ShortcutJump.hs
+3
-3
compiler/nativeGen/X86/CodeGen.hs
compiler/nativeGen/X86/CodeGen.hs
+11
-11
compiler/nativeGen/X86/Instr.hs
compiler/nativeGen/X86/Instr.hs
+6
-6
compiler/nativeGen/X86/Ppr.hs
compiler/nativeGen/X86/Ppr.hs
+5
-5
compiler/nativeGen/X86/Regs.hs
compiler/nativeGen/X86/Regs.hs
+2
-2
compiler/prelude/PrimOp.hs
compiler/prelude/PrimOp.hs
+1
-1
compiler/profiling/ProfInit.hs
compiler/profiling/ProfInit.hs
+1
-1
ghc.mk
ghc.mk
+2
-2
hadrian/src/Rules.hs
hadrian/src/Rules.hs
+2
-2
hadrian/src/Rules/SourceDist.hs
hadrian/src/Rules/SourceDist.hs
+2
-2
includes/Cmm.h
includes/Cmm.h
+2
-2
includes/CodeGen.Platform.hs
includes/CodeGen.Platform.hs
+1
-1
rts/Apply.cmm
rts/Apply.cmm
+1
-1
rts/Exception.cmm
rts/Exception.cmm
+1
-1
rts/HeapStackCheck.cmm
rts/HeapStackCheck.cmm
+1
-1
rts/PrimOps.cmm
rts/PrimOps.cmm
+1
-1
rts/StgMiscClosures.cmm
rts/StgMiscClosures.cmm
+1
-1
rts/StgStartup.cmm
rts/StgStartup.cmm
+1
-1
rts/StgStdThunks.cmm
rts/StgStdThunks.cmm
+1
-1
rts/Updates.cmm
rts/Updates.cmm
+1
-1
testsuite/tests/cmm/should_run/HooplPostorder.hs
testsuite/tests/cmm/should_run/HooplPostorder.hs
+4
-4
testsuite/tests/codeGen/should_run/T13825-unit.hs
testsuite/tests/codeGen/should_run/T13825-unit.hs
+1
-1
testsuite/tests/regalloc/regalloc_unit_tests.hs
testsuite/tests/regalloc/regalloc_unit_tests.hs
+6
-6
No files found.
aclocal.m4
View file @
6e2d9ee2
...
...
@@ -999,7 +999,7 @@ else
fi;
changequote([, ])dnl
])
if test ! -f compiler/parser/Parser.hs || test ! -f compiler/
cmm/CmmParse
.hs
if test ! -f compiler/parser/Parser.hs || test ! -f compiler/
GHC/Cmm/Parser
.hs
then
FP_COMPARE_VERSIONS([$fptools_cv_happy_version],[-lt],[1.19.10],
[AC_MSG_ERROR([Happy version 1.19.10 or later is required to compile GHC.])])[]
...
...
compiler/
cmm
/Cmm.hs
→
compiler/
GHC
/Cmm.hs
View file @
6e2d9ee2
-- Cmm representations using Hoopl's Graph CmmNode e x.
{-# LANGUAGE GADTs #-}
module
Cmm
(
module
GHC.
Cmm
(
-- * Cmm top-level datatypes
CmmProgram
,
CmmGroup
,
GenCmmGroup
,
CmmDecl
,
GenCmmDecl
(
..
),
...
...
@@ -21,23 +21,23 @@ module Cmm (
ProfilingInfo
(
..
),
ConstrDescription
,
-- * Statements, expressions and types
module
Cmm
Node
,
module
Cmm
Expr
,
module
GHC
.
Cmm
.
Node
,
module
GHC
.
Cmm
.
Expr
,
)
where
import
GhcPrelude
import
Id
import
CostCentre
import
CLabel
import
BlockId
import
Cmm
Node
import
SMRep
import
Cmm
Expr
import
Hoopl
.Block
import
Hoopl
.Collections
import
Hoopl
.Graph
import
Hoopl
.Label
import
GHC.Cmm.
CLabel
import
GHC.Cmm.
BlockId
import
GHC.Cmm.
Node
import
GHC.Runtime.Layout
import
GHC.Cmm.
Expr
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
Outputable
import
Data.ByteString
(
ByteString
)
...
...
@@ -126,7 +126,7 @@ data CmmStackInfo
-- used by the stack allocator later.
updfr_space
::
Maybe
ByteOff
,
-- XXX: this never contains anything useful, but it should.
-- See comment in
Cmm
LayoutStack.
-- See comment in
GHC.Cmm.
LayoutStack.
do_layout
::
Bool
-- Do automatic stack layout for this proc. This is
-- True for all code generated by the code generator,
...
...
@@ -149,13 +149,13 @@ data CmmInfoTable
-- the code generator, because we might want to add SRT
-- entries to them later (for FUNs at least; THUNKs are
-- treated the same for consistency). See Note [SRTs] in
--
CmmBuildInfoTables
, in particular the [FUN] optimisation.
--
GHC.Cmm.Info.Build
, in particular the [FUN] optimisation.
--
-- This is strictly speaking not a part of the info table that
-- will be finally generated, but it's the only convenient
-- place to convey this information from the code generator to
-- where we build the static closures in
--
CmmBuildInfoTables
.doSRTs.
--
GHC.Cmm.Info.Build
.doSRTs.
}
data
ProfilingInfo
...
...
compiler/
c
mm/BlockId.hs
→
compiler/
GHC/C
mm/BlockId.hs
View file @
6e2d9ee2
...
...
@@ -2,7 +2,7 @@
{-# OPTIONS_GHC -fno-warn-orphans #-}
{- BlockId module should probably go away completely, being superseded by Label -}
module
BlockId
module
GHC.Cmm.
BlockId
(
BlockId
,
mkBlockId
-- ToDo: BlockId should be abstract, but it isn't yet
,
newBlockId
,
blockLbl
,
infoTblLbl
...
...
@@ -10,13 +10,13 @@ module BlockId
import
GhcPrelude
import
CLabel
import
GHC.Cmm.
CLabel
import
IdInfo
import
Name
import
Unique
import
UniqSupply
import
Hoopl
.Label
(
Label
,
mkHooplLabel
)
import
GHC.Cmm.Dataflow
.Label
(
Label
,
mkHooplLabel
)
----------------------------------------------------------------
--- Block Ids, their environments, and their sets
...
...
compiler/
c
mm/BlockId.hs-boot
→
compiler/
GHC/C
mm/BlockId.hs-boot
View file @
6e2d9ee2
module
BlockId
(
BlockId
,
mkBlockId
)
where
module
GHC.Cmm.
BlockId
(
BlockId
,
mkBlockId
)
where
import
Hoopl
.Label
(
Label
)
import
GHC.Cmm.Dataflow
.Label
(
Label
)
import
Unique
(
Unique
)
type
BlockId
=
Label
...
...
compiler/
c
mm/CLabel.hs
→
compiler/
GHC/C
mm/CLabel.hs
View file @
6e2d9ee2
...
...
@@ -8,7 +8,7 @@
{-# LANGUAGE CPP #-}
module
CLabel
(
module
GHC.Cmm.
CLabel
(
CLabel
,
-- abstract type
ForeignLabelSource
(
..
),
pprDebugCLabel
,
...
...
@@ -115,7 +115,7 @@ import GhcPrelude
import
IdInfo
import
BasicTypes
import
{-#
SOURCE
#-
}
BlockId
(
BlockId
,
mkBlockId
)
import
{-#
SOURCE
#-
}
GHC
.
Cmm
.
BlockId
(
BlockId
,
mkBlockId
)
import
Packages
import
Module
import
Name
...
...
@@ -746,7 +746,7 @@ hasCAF _ = False
-- Until 14 Feb 2013, every ticky counter was associated with a
-- closure. Thus, ticky labels used IdLabel. It is odd that
--
CmmBuildInfoTables
.cafTransfers would consider such a ticky label
--
GHC.Cmm.Info.Build
.cafTransfers would consider such a ticky label
-- reason to add the name to the CAFEnv (and thus eventually the SRT),
-- but it was harmless because the ticky was only used if the closure
-- was also.
...
...
compiler/
cmm/Cmm
CallConv.hs
→
compiler/
GHC/Cmm/
CallConv.hs
View file @
6e2d9ee2
module
Cmm
CallConv
(
module
GHC.Cmm.
CallConv
(
ParamLocation
(
..
),
assignArgumentsPos
,
assignStack
,
...
...
@@ -7,10 +7,10 @@ module CmmCallConv (
import
GhcPrelude
import
Cmm
Expr
import
SMRep
import
Cmm
(
Convention
(
..
))
import
PprCmm
()
-- For Outputable instances
import
GHC.Cmm.
Expr
import
GHC.Runtime.Layout
import
GHC.
Cmm
(
Convention
(
..
))
import
GHC.Cmm.Ppr
()
-- For Outputable instances
import
DynFlags
import
GHC.Platform
...
...
compiler/
cmm/Cmm
CommonBlockElim.hs
→
compiler/
GHC/Cmm/
CommonBlockElim.hs
View file @
6e2d9ee2
{-# LANGUAGE GADTs, BangPatterns, ScopedTypeVariables #-}
module
Cmm
CommonBlockElim
module
GHC.Cmm.
CommonBlockElim
(
elimCommonBlocks
)
where
...
...
@@ -8,16 +8,16 @@ where
import
GhcPrelude
hiding
(
iterate
,
succ
,
unzip
,
zip
)
import
BlockId
import
Cmm
import
Cmm
Utils
import
Cmm
Switch
(
eqSwitchTargetWith
)
import
Cmm
ContFlowOpt
import
GHC.Cmm.
BlockId
import
GHC.
Cmm
import
GHC.Cmm.
Utils
import
GHC.Cmm.
Switch
(
eqSwitchTargetWith
)
import
GHC.Cmm.
ContFlowOpt
import
Hoopl
.Block
import
Hoopl
.Graph
import
Hoopl
.Label
import
Hoopl
.Collections
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
GHC.Cmm.Dataflow
.Collections
import
Data.Bits
import
Data.Maybe
(
mapMaybe
)
import
qualified
Data.List
as
List
...
...
compiler/
cmm/Cmm
ContFlowOpt.hs
→
compiler/
GHC/Cmm/
ContFlowOpt.hs
View file @
6e2d9ee2
{-# LANGUAGE GADTs #-}
{-# LANGUAGE BangPatterns #-}
{-# OPTIONS_GHC -fno-warn-incomplete-patterns #-}
module
Cmm
ContFlowOpt
module
GHC.Cmm.
ContFlowOpt
(
cmmCfgOpts
,
cmmCfgOptsProc
,
removeUnreachableBlocksProc
...
...
@@ -11,14 +11,14 @@ where
import
GhcPrelude
hiding
(
succ
,
unzip
,
zip
)
import
Hoopl
.Block
import
Hoopl
.Collections
import
Hoopl
.Graph
import
Hoopl
.Label
import
BlockId
import
Cmm
import
Cmm
Utils
import
Cmm
Switch
(
mapSwitchTargets
,
switchTargetsToList
)
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
GHC.Cmm.
BlockId
import
GHC.
Cmm
import
GHC.Cmm.
Utils
import
GHC.Cmm.
Switch
(
mapSwitchTargets
,
switchTargetsToList
)
import
Maybes
import
Panic
import
Util
...
...
compiler/
cmm/Hoopl
/Dataflow.hs
→
compiler/
GHC/Cmm
/Dataflow.hs
View file @
6e2d9ee2
...
...
@@ -17,7 +17,7 @@
-- specialised to the UniqSM monad.
--
module
Hoopl
.Dataflow
module
GHC.Cmm
.Dataflow
(
C
,
O
,
Block
,
lastNode
,
entryLabel
,
foldNodesBwdOO
...
...
@@ -36,7 +36,7 @@ where
import
GhcPrelude
import
Cmm
import
GHC.
Cmm
import
UniqSupply
import
Data.Array
...
...
@@ -44,10 +44,10 @@ import Data.Maybe
import
Data.IntSet
(
IntSet
)
import
qualified
Data.IntSet
as
IntSet
import
Hoopl
.Block
import
Hoopl
.Graph
import
Hoopl
.Collections
import
Hoopl
.Label
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Cmm.Dataflow
.Label
type
family
Fact
(
x
::
Extensibility
)
f
::
*
type
instance
Fact
C
f
=
FactBase
f
...
...
compiler/
cmm/Hoopl
/Block.hs
→
compiler/
GHC/Cmm/Dataflow
/Block.hs
View file @
6e2d9ee2
...
...
@@ -6,7 +6,7 @@
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE StandaloneDeriving #-}
{-# LANGUAGE TypeFamilies #-}
module
Hoopl
.Block
module
GHC.Cmm.Dataflow
.Block
(
Extensibility
(
..
)
,
O
,
C
...
...
compiler/
cmm/Hoopl
/Collections.hs
→
compiler/
GHC/Cmm/Dataflow
/Collections.hs
View file @
6e2d9ee2
...
...
@@ -4,7 +4,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module
Hoopl
.Collections
module
GHC.Cmm.Dataflow
.Collections
(
IsSet
(
..
)
,
setInsertList
,
setDeleteList
,
setUnions
,
IsMap
(
..
)
...
...
compiler/
cmm/Hoopl
/Graph.hs
→
compiler/
GHC/Cmm/Dataflow
/Graph.hs
View file @
6e2d9ee2
...
...
@@ -5,7 +5,7 @@
{-# LANGUAGE RankNTypes #-}
{-# LANGUAGE ScopedTypeVariables #-}
{-# LANGUAGE TypeFamilies #-}
module
Hoopl
.Graph
module
GHC.Cmm.Dataflow
.Graph
(
Body
,
Graph
,
Graph
'
(
..
)
...
...
@@ -23,9 +23,9 @@ module Hoopl.Graph
import
GhcPrelude
import
Util
import
Hoopl
.Label
import
Hoopl
.Block
import
Hoopl
.Collections
import
GHC.Cmm.Dataflow
.Label
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Collections
-- | A (possibly empty) collection of closed/closed blocks
type
Body
n
=
LabelMap
(
Block
n
C
C
)
...
...
compiler/
cmm/Hoopl
/Label.hs
→
compiler/
GHC/Cmm/Dataflow
/Label.hs
View file @
6e2d9ee2
...
...
@@ -4,7 +4,7 @@
{-# LANGUAGE TypeFamilies #-}
{-# LANGUAGE GeneralizedNewtypeDeriving #-}
module
Hoopl
.Label
module
GHC.Cmm.Dataflow
.Label
(
Label
,
LabelMap
,
LabelSet
...
...
@@ -18,7 +18,7 @@ import GhcPrelude
import
Outputable
-- TODO: This should really just use GHC's Unique and Uniq{Set,FM}
import
Hoopl
.Collections
import
GHC.Cmm.Dataflow
.Collections
import
Unique
(
Uniquable
(
..
))
import
TrieMap
...
...
compiler/
cmm/Debug
.hs
→
compiler/
GHC/Cmm/DebugBlock
.hs
View file @
6e2d9ee2
...
...
@@ -10,7 +10,7 @@
--
-----------------------------------------------------------------------------
module
Debug
(
module
GHC.Cmm.DebugBlock
(
DebugBlock
(
..
),
cmmDebugGen
,
...
...
@@ -25,22 +25,22 @@ module Debug (
import
GhcPrelude
import
BlockId
import
CLabel
import
Cmm
import
Cmm
Utils
import
GHC.Cmm.
BlockId
import
GHC.Cmm.
CLabel
import
GHC.
Cmm
import
GHC.Cmm.
Utils
import
CoreSyn
import
FastString
(
nilFS
,
mkFastString
)
import
Module
import
Outputable
import
PprCmmExpr
(
pprExpr
)
import
GHC.Cmm.Ppr.Expr
(
pprExpr
)
import
SrcLoc
import
Util
(
seqList
)
import
Hoopl
.Block
import
Hoopl
.Collections
import
Hoopl
.Graph
import
Hoopl
.Label
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
Data.Maybe
import
Data.List
(
minimumBy
,
nubBy
)
...
...
@@ -316,7 +316,7 @@ with a typical C-- procedure as would come from the STG-to-Cmm code generator,
},
Let's consider how this procedure will be decorated with unwind information
(largely by
Cmm
LayoutStack). Naturally, when we enter the procedure `entry` the
(largely by
GHC.Cmm.
LayoutStack). Naturally, when we enter the procedure `entry` the
value of Sp is no different from what it was at its call site. Therefore we will
add an `unwind` statement saying this at the beginning of its unwind-annotated
code,
...
...
@@ -369,7 +369,7 @@ The flow of unwinding information through the compiler is a bit convoluted:
haven't actually done any register assignment or stack layout yet, so there
is no need for unwind information.
*
Cmm
LayoutStack figures out how to layout each procedure's stack, and produces
*
GHC.Cmm.
LayoutStack figures out how to layout each procedure's stack, and produces
appropriate unwinding nodes for each adjustment of the STG Sp register.
* The unwind nodes are carried through the sinking pass. Currently this is
...
...
compiler/
cmm/Cmm
Expr.hs
→
compiler/
GHC/Cmm/
Expr.hs
View file @
6e2d9ee2
...
...
@@ -4,7 +4,7 @@
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE UndecidableInstances #-}
module
Cmm
Expr
module
GHC.Cmm.
Expr
(
CmmExpr
(
..
),
cmmExprType
,
cmmExprWidth
,
cmmExprAlignment
,
maybeInvertCmmExpr
,
CmmReg
(
..
),
cmmRegType
,
cmmRegWidth
,
CmmLit
(
..
),
cmmLitType
...
...
@@ -25,17 +25,17 @@ module CmmExpr
,
regSetToList
,
Area
(
..
)
,
module
Cmm
MachOp
,
module
Cmm
Type
,
module
GHC
.
Cmm
.
MachOp
,
module
GHC
.
Cmm
.
Type
)
where
import
GhcPrelude
import
BlockId
import
CLabel
import
Cmm
MachOp
import
Cmm
Type
import
GHC.Cmm.
BlockId
import
GHC.Cmm.
CLabel
import
GHC.Cmm.
MachOp
import
GHC.Cmm.
Type
import
DynFlags
import
Outputable
(
panic
)
import
Unique
...
...
@@ -83,7 +83,7 @@ data CmmReg
data
Area
=
Old
-- See Note [Old Area]
|
Young
{-# UNPACK #-}
!
BlockId
-- Invariant: must be a continuation BlockId
-- See Note [Continuation BlockId] in
Cmm
Node.
-- See Note [Continuation BlockId] in
GHC.Cmm.
Node.
deriving
(
Eq
,
Ord
)
{- Note [Old Area]
...
...
@@ -200,7 +200,7 @@ data CmmLit
|
CmmBlock
{-# UNPACK #-}
!
BlockId
-- Code label
-- Invariant: must be a continuation BlockId
-- See Note [Continuation BlockId] in
Cmm
Node.
-- See Note [Continuation BlockId] in
GHC.Cmm.
Node.
|
CmmHighStackMark
-- A late-bound constant that stands for the max
-- #bytes of stack space used during a procedure.
...
...
@@ -408,7 +408,7 @@ There are no specific rules about which registers might overlap with
which other registers, but presumably it's safe to assume that nothing
will overlap with special registers like Sp or BaseReg.
Use
Cmm
Utils.regsOverlap to determine whether two GlobalRegs overlap
Use
GHC.Cmm.
Utils.regsOverlap to determine whether two GlobalRegs overlap
on a particular platform. The instance Eq GlobalReg is syntactic
equality of STG registers and does not take overlap into
account. However it is still used in UserOfRegs/DefinerOfRegs and
...
...
compiler/
cmm/Mk
Graph.hs
→
compiler/
GHC/Cmm/
Graph.hs
View file @
6e2d9ee2
{-# LANGUAGE BangPatterns, GADTs #-}
module
Mk
Graph
module
GHC.Cmm.
Graph
(
CmmAGraph
,
CmmAGraphScoped
,
CgStmt
(
..
)
,
(
<*>
),
catAGraphs
,
mkLabel
,
mkMiddle
,
mkLast
,
outOfLine
...
...
@@ -23,19 +23,19 @@ where
import
GhcPrelude
hiding
(
(
<*>
)
)
-- avoid importing (<*>)
import
BlockId
import
Cmm
import
Cmm
CallConv
import
Cmm
Switch
(
SwitchTargets
)
import
GHC.Cmm.
BlockId
import
GHC.
Cmm
import
GHC.Cmm.
CallConv
import
GHC.Cmm.
Switch
(
SwitchTargets
)
import
Hoopl
.Block
import
Hoopl
.Graph
import
Hoopl
.Label
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
DynFlags
import
FastString
import
ForeignCall
import
OrdList
import
SMRep
(
ByteOff
)
import
GHC.Runtime.Layout
(
ByteOff
)
import
UniqSupply
import
Util
import
Panic
...
...
compiler/
cmm/Cmm
Info.hs
→
compiler/
GHC/Cmm/
Info.hs
View file @
6e2d9ee2
{-# LANGUAGE CPP #-}
module
Cmm
Info
(
module
GHC.Cmm.
Info
(
mkEmptyContInfoTable
,
cmmToRawCmm
,
mkInfoTable
,
...
...
@@ -36,14 +36,14 @@ module CmmInfo (
import
GhcPrelude
import
Cmm
import
Cmm
Utils
import
CLabel
import
SMRep
import
Bitmap
import
GHC.
Cmm
import
GHC.Cmm.
Utils
import
GHC.Cmm.
CLabel
import
GHC.Runtime.Layout
import
GHC.Data.
Bitmap
import
Stream
(
Stream
)
import
qualified
Stream
import
Hoopl
.Collections
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Platform
import
Maybes
...
...
@@ -281,7 +281,7 @@ mkSRTLit dflags _ (Just lbl) = ([CmmLabel lbl], CmmInt 1 (halfWordWidth dflags))
-- | Is the SRT offset field inline in the info table on this platform?
--
-- See the section "Referring to an SRT from the info table" in
-- Note [SRTs] in
CmmBuildInfoTables.hs
-- Note [SRTs] in
GHC.Cmm.Info.Build
inlineSRT
::
DynFlags
->
Bool
inlineSRT
dflags
=
platformArch
(
targetPlatform
dflags
)
==
ArchX86_64
&&
tablesNextToCode
dflags
...
...
compiler/
cmm/CmmBuildInfoTables
.hs
→
compiler/
GHC/Cmm/Info/Build
.hs
View file @
6e2d9ee2
{-# LANGUAGE GADTs, BangPatterns, RecordWildCards,
GeneralizedNewtypeDeriving, NondecreasingIndentation, TupleSections #-}
module
CmmBuildInfoTables
module
GHC.Cmm.Info.Build
(
CAFSet
,
CAFEnv
,
cafAnal
,
doSRTs
,
ModuleSRTInfo
,
emptySRT
)
where
...
...
@@ -9,22 +9,22 @@ module CmmBuildInfoTables
import
GhcPrelude
hiding
(
succ
)
import
Id
import
BlockId
import
Hoopl
.Block
import
Hoopl
.Graph
import
Hoopl
.Label
import
Hoopl
.Collections
import
Hoopl
.Dataflow
import
GHC.Cmm.
BlockId
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Cmm
.Dataflow
import
Module
import
GHC.Platform
import
Digraph
import
CLabel
import
Cmm
import
Cmm
Utils
import
GHC.Cmm.
CLabel
import
GHC.
Cmm
import
GHC.Cmm.
Utils
import
DynFlags
import
Maybes
import
Outputable
import
SMRep
import
GHC.Runtime.Layout
import
UniqSupply
import
CostCentre
import
GHC.StgToCmm.Heap
...
...
compiler/
cmm/Cmm
LayoutStack.hs
→
compiler/
GHC/Cmm/
LayoutStack.hs
View file @
6e2d9ee2
{-# LANGUAGE BangPatterns, RecordWildCards, GADTs #-}
module
Cmm
LayoutStack
(
module
GHC.Cmm.
LayoutStack
(
cmmLayoutStack
,
setInfoTableStackMap
)
where
...
...
@@ -9,21 +9,21 @@ import GHC.StgToCmm.Utils ( callerSaveVolatileRegs, newTemp ) -- XXX layer
import
GHC.StgToCmm.Foreign
(
saveThreadState
,
loadThreadState
)
-- XXX layering violation
import
BasicTypes
import
Cmm
import
Cmm
Info
import
BlockId
import
CLabel
import
Cmm
Utils
import
Mk
Graph
import
GHC.
Cmm
import
GHC.Cmm.
Info
import
GHC.Cmm.
BlockId
import
GHC.Cmm.
CLabel
import
GHC.Cmm.
Utils
import
GHC.Cmm.
Graph
import
ForeignCall
import
CmmLive
import
Cmm
ProcPoint
import
SMRep
import
Hoopl
.Block
import
Hoopl
.Collections
import
Hoopl
.Dataflow
import
Hoopl
.Graph
import
Hoopl
.Label
import
GHC.Cmm.Liveness
import
GHC.Cmm.
ProcPoint
import
GHC.Runtime.Layout
import
GHC.Cmm.Dataflow
.Block
import
GHC.Cmm.Dataflow
.Collections
import
GHC.Cmm
.Dataflow
import
GHC.Cmm.Dataflow
.Graph
import
GHC.Cmm.Dataflow
.Label
import
UniqSupply
import
Maybes
import
UniqFM
...
...
compiler/
cmm/CmmLex
.x
→
compiler/
GHC/Cmm/Lexer
.x
View file @
6e2d9ee2
...
...
@@ -11,16 +11,16 @@
-----------------------------------------------------------------------------
{
module
CmmLex
(
module
GHC.Cmm.Lexer
(
CmmToken(..), cmmlex,
) where
import GhcPrelude
import
Cmm
Expr
import
GHC.Cmm.
Expr