ghc-7.8.20140130: The GHC API

Safe HaskellNone
LanguageHaskell98

RegAlloc.Linear.StackMap

Description

The assignment of virtual registers to stack slots

Synopsis

Documentation

type StackSlot = IntSource

Identifier for a stack slot.

data StackMapSource

Constructors

StackMap 

Fields

stackMapNextFreeSlot :: !Int

The slots that are still available to be allocated.

stackMapAssignment :: UniqFM StackSlot

Assignment of vregs to stack slots.

emptyStackMap :: DynFlags -> StackMapSource

An empty stack map, with all slots available.

getStackSlotFor :: StackMap -> Unique -> (StackMap, Int)Source

If this vreg unique already has a stack assignment then return the slot number, otherwise allocate a new slot, and update the map.

getStackUse :: StackMap -> IntSource

Return the number of stack slots that were allocated