From 337d98de1eaf6689269c9788d1983569a98d46a0 Mon Sep 17 00:00:00 2001 From: "Ben.Lippmeier@anu.edu.au" Date: Tue, 3 Feb 2009 07:14:11 +0000 Subject: [PATCH] NCG: Move the graph allocator into its own dir --- compiler/ghc.cabal.in | 18 +++++++++--------- compiler/nativeGen/AsmCodeGen.lhs | 8 ++++---- .../{RegArchBase.hs => RegAlloc/Graph/ArchBase.hs} | 2 +- .../{RegArchX86.hs => RegAlloc/Graph/ArchX86.hs} | 4 ++-- .../{RegCoalesce.hs => RegAlloc/Graph/Coalesce.hs} | 2 +- .../{RegAllocColor.hs => RegAlloc/Graph/Main.hs} | 11 +++++------ .../{RegSpill.hs => RegAlloc/Graph/Spill.hs} | 2 +- .../Graph/SpillClean.hs} | 2 +- .../{RegSpillCost.hs => RegAlloc/Graph/SpillCost.hs} | 2 +- .../{RegAllocStats.hs => RegAlloc/Graph/Stats.hs} | 6 +++--- rts/Makefile | 3 ++- 11 files changed, 30 insertions(+), 30 deletions(-) rename compiler/nativeGen/{RegArchBase.hs => RegAlloc/Graph/ArchBase.hs} (99%) rename compiler/nativeGen/{RegArchX86.hs => RegAlloc/Graph/ArchX86.hs} (96%) rename compiler/nativeGen/{RegCoalesce.hs => RegAlloc/Graph/Coalesce.hs} (98%) rename compiler/nativeGen/{RegAllocColor.hs => RegAlloc/Graph/Main.hs} (98%) rename compiler/nativeGen/{RegSpill.hs => RegAlloc/Graph/Spill.hs} (99%) rename compiler/nativeGen/{RegSpillClean.hs => RegAlloc/Graph/SpillClean.hs} (99%) rename compiler/nativeGen/{RegSpillCost.hs => RegAlloc/Graph/SpillCost.hs} (99%) rename compiler/nativeGen/{RegAllocStats.hs => RegAlloc/Graph/Stats.hs} (99%) diff --git a/compiler/ghc.cabal.in b/compiler/ghc.cabal.in index 8571764..47b321a 100644 --- a/compiler/ghc.cabal.in +++ b/compiler/ghc.cabal.in @@ -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: diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index 33f7628..e9db2bc 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -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 ) diff --git a/compiler/nativeGen/RegArchBase.hs b/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs similarity index 99% rename from compiler/nativeGen/RegArchBase.hs rename to compiler/nativeGen/RegAlloc/Graph/ArchBase.hs index 4709b4c..c3c1148 100644 --- a/compiler/nativeGen/RegArchBase.hs +++ b/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs @@ -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(..), diff --git a/compiler/nativeGen/RegArchX86.hs b/compiler/nativeGen/RegAlloc/Graph/ArchX86.hs similarity index 96% rename from compiler/nativeGen/RegArchX86.hs rename to compiler/nativeGen/RegAlloc/Graph/ArchX86.hs index c6c3050..8018f24 100644 --- a/compiler/nativeGen/RegArchX86.hs +++ b/compiler/nativeGen/RegAlloc/Graph/ArchX86.hs @@ -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 diff --git a/compiler/nativeGen/RegCoalesce.hs b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs similarity index 98% rename from compiler/nativeGen/RegCoalesce.hs rename to compiler/nativeGen/RegAlloc/Graph/Coalesce.hs index e64dc09..34e014c 100644 --- a/compiler/nativeGen/RegCoalesce.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Coalesce.hs @@ -1,7 +1,7 @@ -- | Register coalescing. -- -module RegCoalesce ( +module RegAlloc.Graph.Coalesce ( regCoalesce, slurpJoinMovs ) diff --git a/compiler/nativeGen/RegAllocColor.hs b/compiler/nativeGen/RegAlloc/Graph/Main.hs similarity index 98% rename from compiler/nativeGen/RegAllocColor.hs rename to compiler/nativeGen/RegAlloc/Graph/Main.hs index 5c85691..b794549 100644 --- a/compiler/nativeGen/RegAllocColor.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Main.hs @@ -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 diff --git a/compiler/nativeGen/RegSpill.hs b/compiler/nativeGen/RegAlloc/Graph/Spill.hs similarity index 99% rename from compiler/nativeGen/RegSpill.hs rename to compiler/nativeGen/RegAlloc/Graph/Spill.hs index 0fdb8ce..3a377d2 100644 --- a/compiler/nativeGen/RegSpill.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Spill.hs @@ -1,7 +1,7 @@ {-# OPTIONS -fno-warn-missing-signatures #-} -module RegSpill ( +module RegAlloc.Graph.Spill ( regSpill, SpillStats(..), accSpillSL diff --git a/compiler/nativeGen/RegSpillClean.hs b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs similarity index 99% rename from compiler/nativeGen/RegSpillClean.hs rename to compiler/nativeGen/RegAlloc/Graph/SpillClean.hs index 2ecd450..ddb2461 100644 --- a/compiler/nativeGen/RegSpillClean.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillClean.hs @@ -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 diff --git a/compiler/nativeGen/RegSpillCost.hs b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs similarity index 99% rename from compiler/nativeGen/RegSpillCost.hs rename to compiler/nativeGen/RegAlloc/Graph/SpillCost.hs index 6a2066a..8ae87a0 100644 --- a/compiler/nativeGen/RegSpillCost.hs +++ b/compiler/nativeGen/RegAlloc/Graph/SpillCost.hs @@ -1,5 +1,5 @@ -module RegSpillCost ( +module RegAlloc.Graph.SpillCost ( SpillCostRecord, plusSpillCostRecord, pprSpillCostRecord, diff --git a/compiler/nativeGen/RegAllocStats.hs b/compiler/nativeGen/RegAlloc/Graph/Stats.hs similarity index 99% rename from compiler/nativeGen/RegAllocStats.hs rename to compiler/nativeGen/RegAlloc/Graph/Stats.hs index 12f4cee..bf9622d 100644 --- a/compiler/nativeGen/RegAllocStats.hs +++ b/compiler/nativeGen/RegAlloc/Graph/Stats.hs @@ -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 diff --git a/rts/Makefile b/rts/Makefile index 216d7de..719b11c 100644 --- a/rts/Makefile +++ b/rts/Makefile @@ -35,7 +35,8 @@ endif # ----------------------------------------------------------------------------- # RTS ways -WAYS=$(strip $(GhcLibWays) $(GhcRTSWays)) +WAYS= +# $(strip $(GhcLibWays) $(GhcRTSWays)) ifneq "$(findstring debug, $(way))" "" GhcRtsHcOpts= -- 1.7.10.4