X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FnativeGen%2FRegAlloc%2FGraph%2FArchBase.hs;h=6172cde5debf1adc09ac18451f8d3a975d074d1f;hb=f537dd87c4a07526e2b1fc1bd1c125d652833641;hp=c3c1148f2639f61c03a426860f337ac8cfecc19b;hpb=337d98de1eaf6689269c9788d1983569a98d46a0;p=ghc-hetmet.git diff --git a/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs b/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs index c3c1148..6172cde 100644 --- a/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs +++ b/compiler/nativeGen/RegAlloc/Graph/ArchBase.hs @@ -23,8 +23,6 @@ module RegAlloc.Graph.ArchBase ( ) where - ------ import UniqSet import Unique @@ -32,7 +30,6 @@ import Unique -- Some basic register classes. -- These aren't nessesarally in 1-to-1 correspondance with the allocatable -- RegClasses in MachRegs.hs --- data RegClass -- general purpose regs = ClassG32 -- 32 bit GPRs @@ -57,11 +54,11 @@ data Reg -- | so we can put regs in UniqSets instance Uniquable Reg where getUnique (Reg c i) - = mkUnique 'R' + = mkRegSingleUnique $ fromEnum c * 1000 + i getUnique (RegSub s (Reg c i)) - = mkUnique 'S' + = mkRegSubUnique $ fromEnum s * 10000 + fromEnum c * 1000 + i getUnique (RegSub _ (RegSub _ _)) @@ -85,7 +82,6 @@ data RegSub -- This should be hand coded/cached for each particular architecture, -- because the compute time is very long.. - worst :: (RegClass -> UniqSet Reg) -> (Reg -> UniqSet Reg) @@ -114,8 +110,6 @@ worst regsOfClass regAlias neighbors classN classC -- | For a node N of classN and neighbors of classesC -- (bound classN classesC) is the maximum number of potential -- colors for N that can be lost by coloring its neighbors. --- - bound :: (RegClass -> UniqSet Reg) -> (Reg -> UniqSet Reg) @@ -139,8 +133,7 @@ bound regsOfClass regAlias classN classesC -- -- A version of this should be constructed for each particular architecture, -- possibly including uses of bound, so that alised registers don't get counted --- twice, as per the paper. --- +-- twice, as per the paper. squeese :: (RegClass -> UniqSet Reg) -> (Reg -> UniqSet Reg)