[project @ 1996-02-06 14:32:22 by dnt]
[ghc-hetmet.git] / ghc / compiler / nativeGen / AsmRegAlloc.hi
1 {-# GHC_PRAGMA INTERFACE VERSION 5 #-}
2 interface AsmRegAlloc where
3 import CLabelInfo(CLabel)
4 import FiniteMap(FiniteMap)
5 import OrdList(OrdList)
6 import Outputable(NamedThing, Outputable)
7 import PrimKind(PrimKind)
8 import UniqFM(UniqFM)
9 import UniqSet(UniqSet(..))
10 import Unique(Unique)
11 class MachineCode a where
12         regUsage :: a -> RegUsage
13         regLiveness :: a -> RegLiveness -> RegLiveness
14         patchRegs :: a -> (Reg -> Reg) -> a
15         spillReg :: Reg -> Reg -> OrdList a
16         loadReg :: Reg -> Reg -> OrdList a
17 class MachineRegisters a where
18         mkMRegs :: [Int] -> a
19         possibleMRegs :: PrimKind -> a -> [Int]
20         useMReg :: a -> Int# -> a
21         useMRegs :: a -> [Int] -> a
22         freeMReg :: a -> Int# -> a
23         freeMRegs :: a -> [Int] -> a
24 data CLabel 
25 data FiniteMap a b 
26 data FutureLive   = FL (UniqFM Reg) (FiniteMap CLabel (UniqFM Reg))
27 data OrdList a 
28 data PrimKind 
29 data Reg   = FixedReg Int# | MappedReg Int# | MemoryReg Int PrimKind | UnmappedReg Unique PrimKind
30 data RegLiveness   = RL (UniqFM Reg) FutureLive
31 data RegUsage   = RU (UniqFM Reg) (UniqFM Reg)
32 data UniqFM a 
33 type UniqSet a = UniqFM a
34 data Unique 
35 extractMappedRegNos :: [Reg] -> [Int]
36 mkReg :: Unique -> PrimKind -> Reg
37 runHairyRegAllocate :: (MachineRegisters a, MachineCode b) => a -> [Int] -> OrdList b -> [b]
38 runRegAllocate :: (MachineRegisters a, MachineCode b) => a -> [Int] -> OrdList b -> [b]
39 instance Eq Reg
40 instance Ord Reg
41 instance NamedThing Reg
42 instance Outputable Reg
43 instance Text Reg
44