Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 6e204a966e8c42d976f99a1700ce5f20 > files > 3008

ghc-7.4.2-4.mga5.i586.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>RegAlloc.Linear.Base</title><link href="ocean.css" rel="stylesheet" type="text/css" title="Ocean" /><script src="haddock-util.js" type="text/javascript"></script><script type="text/javascript">//<![CDATA[
window.onload = function () {pageLoad();setSynopsis("mini_RegAlloc-Linear-Base.html");};
//]]>
</script></head><body><div id="package-header"><ul class="links" id="page-menu"><li><a href="index.html">Contents</a></li><li><a href="doc-index.html">Index</a></li></ul><p class="caption">ghc-7.4.2: The GHC API</p></div><div id="content"><div id="module-header"><table class="info"><tr><th>Safe Haskell</th><td>None</td></tr></table><p class="caption">RegAlloc.Linear.Base</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Put common type definitions here to break recursive module dependencies.
</p></div></div><div id="synopsis"><p id="control.syn" class="caption expander" onclick="toggleSection('syn')">Synopsis</p><ul id="section.syn" class="hide" onclick="toggleSection('syn')"><li class="src short"><span class="keyword">type</span> <a href="#t:BlockAssignment">BlockAssignment</a> freeRegs = <a href="RegAlloc-Liveness.html#t:BlockMap">BlockMap</a> (freeRegs, <a href="RegAlloc-Liveness.html#t:RegMap">RegMap</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a>)</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Loc">Loc</a> <ul class="subs"><li>= <a href="#v:InReg">InReg</a> !<a href="Reg.html#t:RealReg">RealReg</a>  </li><li>| <a href="#v:InMem">InMem</a> !<a href="RegAlloc-Linear-StackMap.html#t:StackSlot">StackSlot</a>  </li><li>| <a href="#v:InBoth">InBoth</a> !<a href="Reg.html#t:RealReg">RealReg</a> !<a href="RegAlloc-Linear-StackMap.html#t:StackSlot">StackSlot</a>  </li></ul></li><li class="src short"><a href="#v:regsOfLoc">regsOfLoc</a> :: <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a> -&gt; [<a href="Reg.html#t:RealReg">RealReg</a>]</li><li class="src short"><span class="keyword">data</span>  <a href="#t:SpillReason">SpillReason</a> <ul class="subs"><li>= <a href="#v:SpillAlloc">SpillAlloc</a> !<a href="Unique.html#t:Unique">Unique</a>  </li><li>| <a href="#v:SpillClobber">SpillClobber</a> !<a href="Unique.html#t:Unique">Unique</a>  </li><li>| <a href="#v:SpillLoad">SpillLoad</a> !<a href="Unique.html#t:Unique">Unique</a>  </li><li>| <a href="#v:SpillJoinRR">SpillJoinRR</a> !<a href="Unique.html#t:Unique">Unique</a>  </li><li>| <a href="#v:SpillJoinRM">SpillJoinRM</a> !<a href="Unique.html#t:Unique">Unique</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:RegAllocStats">RegAllocStats</a>  = <a href="#v:RegAllocStats">RegAllocStats</a> {<ul class="subs"><li><a href="#v:ra_spillInstrs">ra_spillInstrs</a> :: <a href="UniqFM.html#t:UniqFM">UniqFM</a> [<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>]</li></ul>}</li><li class="src short"><span class="keyword">data</span>  <a href="#t:RA_State">RA_State</a> freeRegs = <a href="#v:RA_State">RA_State</a> {<ul class="subs"><li><a href="#v:ra_blockassig">ra_blockassig</a> :: <a href="RegAlloc-Linear-Base.html#t:BlockAssignment">BlockAssignment</a> freeRegs</li><li><a href="#v:ra_freeregs">ra_freeregs</a> :: !freeRegs</li><li><a href="#v:ra_assig">ra_assig</a> :: <a href="RegAlloc-Liveness.html#t:RegMap">RegMap</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a></li><li><a href="#v:ra_delta">ra_delta</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></li><li><a href="#v:ra_stack">ra_stack</a> :: <a href="RegAlloc-Linear-StackMap.html#t:StackMap">StackMap</a></li><li><a href="#v:ra_us">ra_us</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></li><li><a href="#v:ra_spills">ra_spills</a> :: [<a href="RegAlloc-Linear-Base.html#t:SpillReason">SpillReason</a>]</li></ul>}</li><li class="src short"><span class="keyword">newtype</span>  <a href="#t:RegM">RegM</a> freeRegs a = <a href="#v:RegM">RegM</a> {<ul class="subs"><li><a href="#v:unReg">unReg</a> :: <a href="RegAlloc-Linear-Base.html#t:RA_State">RA_State</a> freeRegs -&gt; (#<a href="RegAlloc-Linear-Base.html#t:RA_State">RA_State</a> freeRegs, a#)</li></ul>}</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:BlockAssignment" class="def">BlockAssignment</a> freeRegs = <a href="RegAlloc-Liveness.html#t:BlockMap">BlockMap</a> (freeRegs, <a href="RegAlloc-Liveness.html#t:RegMap">RegMap</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a>)</p><div class="doc"><p>Used to store the register assignment on entry to a basic block.
      We use this to handle join points, where multiple branch instructions
      target a particular label. We have to insert fixup code to make
      the register assignments from the different sources match up.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Loc" class="def">Loc</a>  </p><div class="doc"><p>Where a vreg is currently stored
      A temporary can be marked as living in both a register and memory
      (InBoth), for example if it was recently loaded from a spill location.
      This makes it cheap to spill (no save instruction required), but we
      have to be careful to turn this into InReg if the value in the
      register is changed.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:InReg" class="def">InReg</a> !<a href="Reg.html#t:RealReg">RealReg</a></td><td class="doc"><p>vreg is in a register
</p></td></tr><tr><td class="src"><a name="v:InMem" class="def">InMem</a> !<a href="RegAlloc-Linear-StackMap.html#t:StackSlot">StackSlot</a></td><td class="doc"><p>vreg is held in a stack slot
</p></td></tr><tr><td class="src"><a name="v:InBoth" class="def">InBoth</a> !<a href="Reg.html#t:RealReg">RealReg</a> !<a href="RegAlloc-Linear-StackMap.html#t:StackSlot">StackSlot</a></td><td class="doc"><p>vreg is held in both a register and a stack slot
</p></td></tr></table></div><div class="subs instances"><p id="control.i:Loc" class="caption collapser" onclick="toggleSection('i:Loc')">Instances</p><div id="section.i:Loc" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Data-Eq.html#t:Eq">Eq</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Data-Ord.html#t:Ord">Ord</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="../base-4.5.1.0/Text-Show.html#t:Show">Show</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a></td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Outputable.html#t:Outputable">Outputable</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><a name="v:regsOfLoc" class="def">regsOfLoc</a> :: <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a> -&gt; [<a href="Reg.html#t:RealReg">RealReg</a>]</p><div class="doc"><p>Get the reg numbers stored in this Loc.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:SpillReason" class="def">SpillReason</a>  </p><div class="doc"><p>Reasons why instructions might be inserted by the spiller.
      Used when generating stats for -ddrop-asm-stats.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:SpillAlloc" class="def">SpillAlloc</a> !<a href="Unique.html#t:Unique">Unique</a></td><td class="doc"><p>vreg was spilled to a slot so we could use its
      current hreg for another vreg
</p></td></tr><tr><td class="src"><a name="v:SpillClobber" class="def">SpillClobber</a> !<a href="Unique.html#t:Unique">Unique</a></td><td class="doc"><p>vreg was moved because its hreg was clobbered
</p></td></tr><tr><td class="src"><a name="v:SpillLoad" class="def">SpillLoad</a> !<a href="Unique.html#t:Unique">Unique</a></td><td class="doc"><p>vreg was loaded from a spill slot
</p></td></tr><tr><td class="src"><a name="v:SpillJoinRR" class="def">SpillJoinRR</a> !<a href="Unique.html#t:Unique">Unique</a></td><td class="doc"><p>reg-reg move inserted during join to targets
</p></td></tr><tr><td class="src"><a name="v:SpillJoinRM" class="def">SpillJoinRM</a> !<a href="Unique.html#t:Unique">Unique</a></td><td class="doc"><p>reg-mem move inserted during join to targets
</p></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:RegAllocStats" class="def">RegAllocStats</a>  </p><div class="doc"><p>Used to carry interesting stats out of the register allocator.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RegAllocStats" class="def">RegAllocStats</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:ra_spillInstrs" class="def">ra_spillInstrs</a> :: <a href="UniqFM.html#t:UniqFM">UniqFM</a> [<a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>]</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:RA_State" class="def">RA_State</a> freeRegs </p><div class="doc"><p>The register alloctor state
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RA_State" class="def">RA_State</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:ra_blockassig" class="def">ra_blockassig</a> :: <a href="RegAlloc-Linear-Base.html#t:BlockAssignment">BlockAssignment</a> freeRegs</dt><dd class="doc"><p>the current mapping from basic blocks to
      the register assignments at the beginning of that block.
</p></dd><dt class="src"><a name="v:ra_freeregs" class="def">ra_freeregs</a> :: !freeRegs</dt><dd class="doc"><p>free machine registers
</p></dd><dt class="src"><a name="v:ra_assig" class="def">ra_assig</a> :: <a href="RegAlloc-Liveness.html#t:RegMap">RegMap</a> <a href="RegAlloc-Linear-Base.html#t:Loc">Loc</a></dt><dd class="doc"><p>assignment of temps to locations
</p></dd><dt class="src"><a name="v:ra_delta" class="def">ra_delta</a> :: <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></dt><dd class="doc"><p>current stack delta
</p></dd><dt class="src"><a name="v:ra_stack" class="def">ra_stack</a> :: <a href="RegAlloc-Linear-StackMap.html#t:StackMap">StackMap</a></dt><dd class="doc"><p>free stack slots for spilling
</p></dd><dt class="src"><a name="v:ra_us" class="def">ra_us</a> :: <a href="UniqSupply.html#t:UniqSupply">UniqSupply</a></dt><dd class="doc"><p>unique supply for generating names for join point fixup blocks.
</p></dd><dt class="src"><a name="v:ra_spills" class="def">ra_spills</a> :: [<a href="RegAlloc-Linear-Base.html#t:SpillReason">SpillReason</a>]</dt><dd class="doc"><p>Record why things were spilled, for -ddrop-asm-stats.
      Just keep a list here instead of a map of regs -&gt; reasons.
      We don't want to slow down the allocator if we're not going to emit the stats.
</p></dd></dl><div class="clear"></div></div></td></tr></table></div></div><div class="top"><p class="src"><span class="keyword">newtype</span>  <a name="t:RegM" class="def">RegM</a> freeRegs a </p><div class="doc"><p>The register allocator monad type.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:RegM" class="def">RegM</a></td><td class="doc empty">&nbsp;</td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:unReg" class="def">unReg</a> :: <a href="RegAlloc-Linear-Base.html#t:RA_State">RA_State</a> freeRegs -&gt; (#<a href="RegAlloc-Linear-Base.html#t:RA_State">RA_State</a> freeRegs, a#)</dt><dd class="doc empty">&nbsp;</dd></dl><div class="clear"></div></div></td></tr></table></div><div class="subs instances"><p id="control.i:RegM" class="caption collapser" onclick="toggleSection('i:RegM')">Instances</p><div id="section.i:RegM" class="show"><table><tr><td class="src"><a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> (<a href="RegAlloc-Linear-Base.html#t:RegM">RegM</a> freeRegs)</td><td class="doc"><p>The RegM Monad
</p></td></tr></table></div></div></div></div></div><div id="footer"><p>Produced by <a href="http://www.haskell.org/haddock/">Haddock</a> version 2.11.0</p></div></body></html>