linearscan-hoopl-0.1.0.0: Make it easy to use the linearscan register allocator with Hoopl

Safe HaskellNone
LanguageHaskell2010

LinearScan.Hoopl

Documentation

class HooplNode n1 => NodeAlloc s n1 n2 | n1 -> n2, n2 -> n1, n1 -> s, n2 -> s where Source

Methods

isCall :: n1 O O -> Bool Source

isBranch :: n1 O C -> Bool Source

getReferences :: n1 e x -> [VarInfo] Source

setRegisters :: [(Int, PhysReg)] -> n1 e x -> n2 e x Source

mkMoveOps :: PhysReg -> PhysReg -> State s [n2 O O] Source

mkSwapOps :: PhysReg -> PhysReg -> State s [n2 O O] Source

mkSaveOps :: PhysReg -> Maybe VarId -> State s [n2 O O] Source

mkRestoreOps :: Maybe VarId -> PhysReg -> State s [n2 O O] Source

data NodeV n Source

Constructors

NodeCO 

Fields

getNodeCO :: n C O
 
NodeOO 

Fields

getNodeOO :: n O O
 
NodeOC 

Fields

getNodeOC :: n O C
 

blockInfo :: NonLocal n1 => (Label -> Int) -> BlockInfo (Block n1 C C) (Block n2 C C) (NodeV n1) (NodeV n2) Source

opInfo :: forall s n1 n2. NodeAlloc s n1 n2 => OpInfo s (NodeV n1) (NodeV n2) Source