NCG: Move the graph allocator into its own dir
authorBen.Lippmeier@anu.edu.au <unknown>
Tue, 3 Feb 2009 07:14:11 +0000 (07:14 +0000)
committerBen.Lippmeier@anu.edu.au <unknown>
Tue, 3 Feb 2009 07:14:11 +0000 (07:14 +0000)
compiler/ghc.cabal.in
compiler/nativeGen/AsmCodeGen.lhs
compiler/nativeGen/RegAlloc/Graph/ArchBase.hs [moved from compiler/nativeGen/RegArchBase.hs with 99% similarity]
compiler/nativeGen/RegAlloc/Graph/ArchX86.hs [moved from compiler/nativeGen/RegArchX86.hs with 96% similarity]
compiler/nativeGen/RegAlloc/Graph/Coalesce.hs [moved from compiler/nativeGen/RegCoalesce.hs with 98% similarity]
compiler/nativeGen/RegAlloc/Graph/Main.hs [moved from compiler/nativeGen/RegAllocColor.hs with 98% similarity]
compiler/nativeGen/RegAlloc/Graph/Spill.hs [moved from compiler/nativeGen/RegSpill.hs with 99% similarity]
compiler/nativeGen/RegAlloc/Graph/SpillClean.hs [moved from compiler/nativeGen/RegSpillClean.hs with 99% similarity]
compiler/nativeGen/RegAlloc/Graph/SpillCost.hs [moved from compiler/nativeGen/RegSpillCost.hs with 99% similarity]
compiler/nativeGen/RegAlloc/Graph/Stats.hs [moved from compiler/nativeGen/RegAllocStats.hs with 99% similarity]
rts/Makefile

index 8571764..47b321a 100644 (file)
@@ -460,8 +460,16 @@ Library
             NCGMonad
             PositionIndependentCode
             PprMach
-            RegAllocColor
+            RegLiveness
             RegAllocInfo
+            RegAlloc.Graph.Main
+            RegAlloc.Graph.Stats
+            RegAlloc.Graph.ArchBase
+            RegAlloc.Graph.ArchX86
+            RegAlloc.Graph.Coalesce
+            RegAlloc.Graph.Spill
+            RegAlloc.Graph.SpillClean
+            RegAlloc.Graph.SpillCost
             RegAlloc.Linear.Main
             RegAlloc.Linear.JoinToTargets
             RegAlloc.Linear.State
@@ -472,14 +480,6 @@ Library
             RegAlloc.Linear.X86.FreeRegs
             RegAlloc.Linear.PPC.FreeRegs
             RegAlloc.Linear.SPARC.FreeRegs
-            RegAllocStats
-            RegArchBase
-            RegArchX86
-            RegCoalesce
-            RegLiveness
-            RegSpill
-            RegSpillClean
-            RegSpillCost
 
     if flag(ghci)
         Exposed-Modules:
index 33f7628..e9db2bc 100644 (file)
@@ -27,13 +27,13 @@ import RegAllocInfo
 import NCGMonad
 import PositionIndependentCode
 import RegLiveness
-import RegCoalesce
 
 import qualified RegAlloc.Linear.Main  as Linear
 
-import qualified RegAllocColor as Color
-import qualified RegAllocStats as Color
-import qualified GraphColor    as Color
+import qualified GraphColor                    as Color
+import qualified RegAlloc.Graph.Main           as Color
+import qualified RegAlloc.Graph.Stats          as Color
+import qualified RegAlloc.Graph.Coalesce       as Color
 
 import Cmm
 import CmmOpt          ( cmmMiniInline, cmmMachOpFold )
similarity index 99%
rename from compiler/nativeGen/RegArchBase.hs
rename to compiler/nativeGen/RegAlloc/Graph/ArchBase.hs
index 4709b4c..c3c1148 100644 (file)
@@ -12,7 +12,7 @@
 --     This code is here because we can test the architecture specific code against it.
 --
 
-module RegArchBase (
+module RegAlloc.Graph.ArchBase (
        RegClass(..),
        Reg(..),
        RegSub(..),
similarity index 96%
rename from compiler/nativeGen/RegArchX86.hs
rename to compiler/nativeGen/RegAlloc/Graph/ArchX86.hs
index c6c3050..8018f24 100644 (file)
@@ -6,7 +6,7 @@
 --     See MachRegs.hs for the actual trivColorable function used in GHC.
 --
 
-module RegArchX86 (
+module RegAlloc.Graph.ArchX86 (
        classOfReg,
        regsOfClass,
        regName,
@@ -15,7 +15,7 @@ module RegArchX86 (
        squeese,
 ) where
 
-import RegArchBase             (Reg(..), RegSub(..), RegClass(..))
+import RegAlloc.Graph.ArchBase (Reg(..), RegSub(..), RegClass(..))
 
 import UniqSet
 
similarity index 98%
rename from compiler/nativeGen/RegCoalesce.hs
rename to compiler/nativeGen/RegAlloc/Graph/Coalesce.hs
index e64dc09..34e014c 100644 (file)
@@ -1,7 +1,7 @@
 -- | Register coalescing.
 --
 
-module RegCoalesce (
+module RegAlloc.Graph.Coalesce (
        regCoalesce,
        slurpJoinMovs
 )
similarity index 98%
rename from compiler/nativeGen/RegAllocColor.hs
rename to compiler/nativeGen/RegAlloc/Graph/Main.hs
index 5c85691..b794549 100644 (file)
@@ -4,7 +4,7 @@
 -- TODO: The colors in graphviz graphs for x86_64 and ppc could be nicer.
 --
 
-module RegAllocColor ( 
+module RegAlloc.Graph.Main ( 
        regAlloc,
        regDotColor
 ) 
@@ -13,11 +13,10 @@ where
 
 import qualified GraphColor    as Color
 import RegLiveness
-import RegSpill
-import RegSpillClean
-import RegSpillCost
-import RegAllocStats
--- import RegCoalesce
+import RegAlloc.Graph.Spill
+import RegAlloc.Graph.SpillClean
+import RegAlloc.Graph.SpillCost
+import RegAlloc.Graph.Stats
 import MachRegs
 import MachInstrs
 import PprMach
similarity index 99%
rename from compiler/nativeGen/RegSpill.hs
rename to compiler/nativeGen/RegAlloc/Graph/Spill.hs
index 0fdb8ce..3a377d2 100644 (file)
@@ -1,7 +1,7 @@
 
 {-# OPTIONS -fno-warn-missing-signatures #-}
 
-module RegSpill (
+module RegAlloc.Graph.Spill (
        regSpill,
        SpillStats(..),
        accSpillSL
similarity index 99%
rename from compiler/nativeGen/RegSpillClean.hs
rename to compiler/nativeGen/RegAlloc/Graph/SpillClean.hs
index 2ecd450..ddb2461 100644 (file)
@@ -24,7 +24,7 @@
 --     spilling %r1 to a slot makes that slot have the same value as %r1.
 --
 
-module RegSpillClean (
+module RegAlloc.Graph.SpillClean (
        cleanSpills
 )
 where
similarity index 99%
rename from compiler/nativeGen/RegSpillCost.hs
rename to compiler/nativeGen/RegAlloc/Graph/SpillCost.hs
index 6a2066a..8ae87a0 100644 (file)
@@ -1,5 +1,5 @@
 
-module RegSpillCost (
+module RegAlloc.Graph.SpillCost (
        SpillCostRecord,
        plusSpillCostRecord,
        pprSpillCostRecord,
similarity index 99%
rename from compiler/nativeGen/RegAllocStats.hs
rename to compiler/nativeGen/RegAlloc/Graph/Stats.hs
index 12f4cee..bf9622d 100644 (file)
@@ -3,7 +3,7 @@
 --     graph coloring register allocator.
 --
 
-module RegAllocStats (
+module RegAlloc.Graph.Stats (
        RegAllocStats (..),
        regDotColor,
 
@@ -23,8 +23,8 @@ where
 import qualified GraphColor as Color
 import RegLiveness
 import RegAllocInfo
-import RegSpill
-import RegSpillCost
+import RegAlloc.Graph.Spill
+import RegAlloc.Graph.SpillCost
 import MachRegs
 import MachInstrs
 import Cmm
index 216d7de..719b11c 100644 (file)
@@ -35,7 +35,8 @@ endif
 # -----------------------------------------------------------------------------
 # RTS ways
 
-WAYS=$(strip $(GhcLibWays) $(GhcRTSWays))
+WAYS=
+# $(strip $(GhcLibWays) $(GhcRTSWays))
 
 ifneq "$(findstring debug, $(way))" ""
 GhcRtsHcOpts=