Sophie

Sophie

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

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.Liveness</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-Liveness.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.Liveness</p></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:RegSet">RegSet</a> = <a href="UniqSet.html#t:UniqSet">UniqSet</a> <a href="Reg.html#t:Reg">Reg</a></li><li class="src short"><span class="keyword">type</span> <a href="#t:RegMap">RegMap</a> a = <a href="UniqFM.html#t:UniqFM">UniqFM</a> a</li><li class="src short"><a href="#v:emptyRegMap">emptyRegMap</a> ::  <a href="UniqFM.html#t:UniqFM">UniqFM</a> a</li><li class="src short"><span class="keyword">type</span> <a href="#t:BlockMap">BlockMap</a> a = <a href="BlockId.html#t:BlockEnv">BlockEnv</a> a</li><li class="src short"><a href="#v:emptyBlockMap">emptyBlockMap</a> ::  <a href="BlockId.html#t:BlockEnv">BlockEnv</a> a</li><li class="src short"><span class="keyword">type</span> <a href="#t:LiveCmmDecl">LiveCmmDecl</a> statics instr = <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> statics <a href="RegAlloc-Liveness.html#t:LiveInfo">LiveInfo</a> [<a href="Digraph.html#t:SCC">SCC</a> (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr)]</li><li class="src short"><span class="keyword">data</span>  <a href="#t:InstrSR">InstrSR</a> instr<ul class="subs"><li>= <a href="#v:Instr">Instr</a> instr  </li><li>| <a href="#v:SPILL">SPILL</a> <a href="Reg.html#t:Reg">Reg</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>  </li><li>| <a href="#v:RELOAD">RELOAD</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> <a href="Reg.html#t:Reg">Reg</a>  </li></ul></li><li class="src short"><span class="keyword">data</span>  <a href="#t:LiveInstr">LiveInstr</a> instr = <a href="#v:LiveInstr">LiveInstr</a> (<a href="RegAlloc-Liveness.html#t:InstrSR">InstrSR</a> instr) (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="RegAlloc-Liveness.html#t:Liveness">Liveness</a>)</li><li class="src short"><span class="keyword">data</span>  <a href="#t:Liveness">Liveness</a>  = <a href="#v:Liveness">Liveness</a> {<ul class="subs"><li><a href="#v:liveBorn">liveBorn</a> :: <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a></li><li><a href="#v:liveDieRead">liveDieRead</a> :: <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a></li><li><a href="#v:liveDieWrite">liveDieWrite</a> :: <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a></li></ul>}</li><li class="src short"><span class="keyword">data</span>  <a href="#t:LiveInfo">LiveInfo</a>  = <a href="#v:LiveInfo">LiveInfo</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Cmm.html#t:CmmStatics">CmmStatics</a>) (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="BlockId.html#t:BlockId">BlockId</a>) (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="RegAlloc-Liveness.html#t:BlockMap">BlockMap</a> <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a>)) (<a href="../containers-0.4.2.1/Data-Map.html#t:Map">Map</a> <a href="BlockId.html#t:BlockId">BlockId</a> (<a href="../containers-0.4.2.1/Data-Set.html#t:Set">Set</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>))</li><li class="src short"><span class="keyword">type</span> <a href="#t:LiveBasicBlock">LiveBasicBlock</a> instr = <a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> (<a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr)</li><li class="src short"><a href="#v:mapBlockTop">mapBlockTop</a> ::  (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr) -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</li><li class="src short"><a href="#v:mapBlockTopM">mapBlockTopM</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr -&gt; m (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr)) -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; m (<a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr)</li><li class="src short"><a href="#v:mapSCCM">mapSCCM</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; <a href="Digraph.html#t:SCC">SCC</a> a -&gt; m (<a href="Digraph.html#t:SCC">SCC</a> b)</li><li class="src short"><a href="#v:mapGenBlockTop">mapGenBlockTop</a> ::  (<a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i -&gt; <a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i) -&gt; <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i) -&gt; <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i)</li><li class="src short"><a href="#v:mapGenBlockTopM">mapGenBlockTopM</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (<a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i -&gt; m (<a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i)) -&gt; <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i) -&gt; m (<a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i))</li><li class="src short"><a href="#v:stripLive">stripLive</a> :: (<a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> statics, <a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> instr, <a href="Instruction.html#t:Instruction">Instruction</a> instr) =&gt; <a href="Platform.html#t:Platform">Platform</a> -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="Instruction.html#t:NatCmmDecl">NatCmmDecl</a> statics instr</li><li class="src short"><a href="#v:stripLiveBlock">stripLiveBlock</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="Platform.html#t:Platform">Platform</a> -&gt; <a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr -&gt; <a href="Instruction.html#t:NatBasicBlock">NatBasicBlock</a> instr</li><li class="src short"><a href="#v:slurpConflicts">slurpConflicts</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; (<a href="Bag.html#t:Bag">Bag</a> (<a href="UniqSet.html#t:UniqSet">UniqSet</a> <a href="Reg.html#t:Reg">Reg</a>), <a href="Bag.html#t:Bag">Bag</a> (<a href="Reg.html#t:Reg">Reg</a>, <a href="Reg.html#t:Reg">Reg</a>))</li><li class="src short"><a href="#v:slurpReloadCoalesce">slurpReloadCoalesce</a> :: <span class="keyword">forall</span> statics instr. <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="Bag.html#t:Bag">Bag</a> (<a href="Reg.html#t:Reg">Reg</a>, <a href="Reg.html#t:Reg">Reg</a>)</li><li class="src short"><a href="#v:eraseDeltasLive">eraseDeltasLive</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</li><li class="src short"><a href="#v:patchEraseLive">patchEraseLive</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; (<a href="Reg.html#t:Reg">Reg</a> -&gt; <a href="Reg.html#t:Reg">Reg</a>) -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</li><li class="src short"><a href="#v:patchRegsLiveInstr">patchRegsLiveInstr</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; (<a href="Reg.html#t:Reg">Reg</a> -&gt; <a href="Reg.html#t:Reg">Reg</a>) -&gt; <a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr</li><li class="src short"><a href="#v:reverseBlocksInTops">reverseBlocksInTops</a> ::  <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</li><li class="src short"><a href="#v:regLiveness">regLiveness</a> :: (<a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> instr, <a href="Instruction.html#t:Instruction">Instruction</a> instr) =&gt; <a href="Platform.html#t:Platform">Platform</a> -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> (<a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr)</li><li class="src short"><a href="#v:natCmmTopToLive">natCmmTopToLive</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="Instruction.html#t:NatCmmDecl">NatCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</li></ul></div><div id="interface"><h1>Documentation</h1><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:RegSet" class="def">RegSet</a> = <a href="UniqSet.html#t:UniqSet">UniqSet</a> <a href="Reg.html#t:Reg">Reg</a></p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:RegMap" class="def">RegMap</a> a = <a href="UniqFM.html#t:UniqFM">UniqFM</a> a</p></div><div class="top"><p class="src"><a name="v:emptyRegMap" class="def">emptyRegMap</a> ::  <a href="UniqFM.html#t:UniqFM">UniqFM</a> a</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:BlockMap" class="def">BlockMap</a> a = <a href="BlockId.html#t:BlockEnv">BlockEnv</a> a</p></div><div class="top"><p class="src"><a name="v:emptyBlockMap" class="def">emptyBlockMap</a> ::  <a href="BlockId.html#t:BlockEnv">BlockEnv</a> a</p></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LiveCmmDecl" class="def">LiveCmmDecl</a> statics instr = <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> statics <a href="RegAlloc-Liveness.html#t:LiveInfo">LiveInfo</a> [<a href="Digraph.html#t:SCC">SCC</a> (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr)]</p><div class="doc"><p>A top level thing which carries liveness information.
</p></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:InstrSR" class="def">InstrSR</a> instr </p><div class="doc"><p>The register allocator also wants to use SPILL/RELOAD meta instructions,
   so we'll keep those here.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Instr" class="def">Instr</a> instr</td><td class="doc"><p>A real machine instruction
</p></td></tr><tr><td class="src"><a name="v:SPILL" class="def">SPILL</a> <a href="Reg.html#t:Reg">Reg</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a></td><td class="doc"><p>spill this reg to a stack slot
</p></td></tr><tr><td class="src"><a name="v:RELOAD" class="def">RELOAD</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a> <a href="Reg.html#t:Reg">Reg</a></td><td class="doc"><p>reload this reg from a stack slot
</p></td></tr></table></div><div class="subs instances"><p id="control.i:InstrSR" class="caption collapser" onclick="toggleSection('i:InstrSR')">Instances</p><div id="section.i:InstrSR" class="show"><table><tr><td class="src"><a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> instr =&gt; <a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> (<a href="RegAlloc-Liveness.html#t:InstrSR">InstrSR</a> instr)</td><td class="doc empty">&nbsp;</td></tr><tr><td class="src"><a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="Instruction.html#t:Instruction">Instruction</a> (<a href="RegAlloc-Liveness.html#t:InstrSR">InstrSR</a> instr)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:LiveInstr" class="def">LiveInstr</a> instr </p><div class="doc"><p>An instruction with liveness information.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LiveInstr" class="def">LiveInstr</a> (<a href="RegAlloc-Liveness.html#t:InstrSR">InstrSR</a> instr) (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="RegAlloc-Liveness.html#t:Liveness">Liveness</a>)</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:LiveInstr" class="caption collapser" onclick="toggleSection('i:LiveInstr')">Instances</p><div id="section.i:LiveInstr" class="show"><table><tr><td class="src"><a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> instr =&gt; <a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> (<a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr)</td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">data</span>  <a name="t:Liveness" class="def">Liveness</a>  </p><div class="doc"><p>Liveness information.
   The regs which die are ones which are no longer live in the *next* instruction
   in this sequence.
   (NB. if the instruction is a jump, these registers might still be live
   at the jump target(s) - you have to check the liveness at the destination
   block to find out).
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:Liveness" class="def">Liveness</a></td><td class="doc"><p>registers that died because they were clobbered by something.
</p></td></tr><tr><td colspan="2"><div class="subs fields"><p class="caption">Fields</p><dl><dt class="src"><a name="v:liveBorn" class="def">liveBorn</a> :: <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a></dt><dd class="doc"><p>registers born in this instruction (written to for first time).
</p></dd><dt class="src"><a name="v:liveDieRead" class="def">liveDieRead</a> :: <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a></dt><dd class="doc"><p>registers that died because they were read for the last time.
</p></dd><dt class="src"><a name="v:liveDieWrite" class="def">liveDieWrite</a> :: <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</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:LiveInfo" class="def">LiveInfo</a>  </p><div class="doc"><p>Stash regs live on entry to each basic block in the info part of the cmm code.
</p></div><div class="subs constructors"><p class="caption">Constructors</p><table><tr><td class="src"><a name="v:LiveInfo" class="def">LiveInfo</a> (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="Cmm.html#t:CmmStatics">CmmStatics</a>) (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> <a href="BlockId.html#t:BlockId">BlockId</a>) (<a href="../base-4.5.1.0/Data-Maybe.html#t:Maybe">Maybe</a> (<a href="RegAlloc-Liveness.html#t:BlockMap">BlockMap</a> <a href="RegAlloc-Liveness.html#t:RegSet">RegSet</a>)) (<a href="../containers-0.4.2.1/Data-Map.html#t:Map">Map</a> <a href="BlockId.html#t:BlockId">BlockId</a> (<a href="../containers-0.4.2.1/Data-Set.html#t:Set">Set</a> <a href="../base-4.5.1.0/Data-Int.html#t:Int">Int</a>))</td><td class="doc empty">&nbsp;</td></tr></table></div><div class="subs instances"><p id="control.i:LiveInfo" class="caption collapser" onclick="toggleSection('i:LiveInfo')">Instances</p><div id="section.i:LiveInfo" class="show"><table><tr><td class="src"><a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> <a href="RegAlloc-Liveness.html#t:LiveInfo">LiveInfo</a></td><td class="doc empty">&nbsp;</td></tr></table></div></div></div><div class="top"><p class="src"><span class="keyword">type</span> <a name="t:LiveBasicBlock" class="def">LiveBasicBlock</a> instr = <a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> (<a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr)</p><div class="doc"><p>A basic block with liveness information.
</p></div></div><div class="top"><p class="src"><a name="v:mapBlockTop" class="def">mapBlockTop</a> ::  (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr) -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</p><div class="doc"><p>map a function across all the basic blocks in this code
</p></div></div><div class="top"><p class="src"><a name="v:mapBlockTopM" class="def">mapBlockTopM</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr -&gt; m (<a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr)) -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; m (<a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr)</p><div class="doc"><p>map a function across all the basic blocks in this code (monadic version)
</p></div></div><div class="top"><p class="src"><a name="v:mapSCCM" class="def">mapSCCM</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (a -&gt; m b) -&gt; <a href="Digraph.html#t:SCC">SCC</a> a -&gt; m (<a href="Digraph.html#t:SCC">SCC</a> b)</p></div><div class="top"><p class="src"><a name="v:mapGenBlockTop" class="def">mapGenBlockTop</a> ::  (<a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i -&gt; <a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i) -&gt; <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i) -&gt; <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i)</p></div><div class="top"><p class="src"><a name="v:mapGenBlockTopM" class="def">mapGenBlockTopM</a> :: <a href="../base-4.5.1.0/Control-Monad.html#t:Monad">Monad</a> m =&gt; (<a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i -&gt; m (<a href="OldCmm.html#t:GenBasicBlock">GenBasicBlock</a> i)) -&gt; <a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i) -&gt; m (<a href="Cmm.html#t:GenCmmDecl">GenCmmDecl</a> d h (<a href="OldCmm.html#t:ListGraph">ListGraph</a> i))</p><div class="doc"><p>map a function across all the basic blocks in this code (monadic version)
</p></div></div><div class="top"><p class="src"><a name="v:stripLive" class="def">stripLive</a> :: (<a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> statics, <a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> instr, <a href="Instruction.html#t:Instruction">Instruction</a> instr) =&gt; <a href="Platform.html#t:Platform">Platform</a> -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="Instruction.html#t:NatCmmDecl">NatCmmDecl</a> statics instr</p><div class="doc"><p>Strip away liveness information, yielding NatCmmDecl
</p></div></div><div class="top"><p class="src"><a name="v:stripLiveBlock" class="def">stripLiveBlock</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="Platform.html#t:Platform">Platform</a> -&gt; <a href="RegAlloc-Liveness.html#t:LiveBasicBlock">LiveBasicBlock</a> instr -&gt; <a href="Instruction.html#t:NatBasicBlock">NatBasicBlock</a> instr</p><div class="doc"><p>Strip away liveness information from a basic block,
   and make real spill instructions out of SPILL, RELOAD pseudos along the way.
</p></div></div><div class="top"><p class="src"><a name="v:slurpConflicts" class="def">slurpConflicts</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; (<a href="Bag.html#t:Bag">Bag</a> (<a href="UniqSet.html#t:UniqSet">UniqSet</a> <a href="Reg.html#t:Reg">Reg</a>), <a href="Bag.html#t:Bag">Bag</a> (<a href="Reg.html#t:Reg">Reg</a>, <a href="Reg.html#t:Reg">Reg</a>))</p><div class="doc"><p>Slurp out the list of register conflicts and reg-reg moves from this top level thing.
   Slurping of conflicts and moves is wrapped up together so we don't have
   to make two passes over the same code when we want to build the graph.
</p></div></div><div class="top"><p class="src"><a name="v:slurpReloadCoalesce" class="def">slurpReloadCoalesce</a> :: <span class="keyword">forall</span> statics instr. <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="Bag.html#t:Bag">Bag</a> (<a href="Reg.html#t:Reg">Reg</a>, <a href="Reg.html#t:Reg">Reg</a>)</p><div class="doc"><p>For spill/reloads
</p><p>SPILL  v1, slot1
   ...
   RELOAD slot1, v2
</p><p>If we can arrange that v1 and v2 are allocated to the same hreg it's more likely
   the spill/reload instrs can be cleaned and replaced by a nop reg-reg move.
</p></div></div><div class="top"><p class="src"><a name="v:eraseDeltasLive" class="def">eraseDeltasLive</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</p><div class="doc"><p>Erase Delta instructions.
</p></div></div><div class="top"><p class="src"><a name="v:patchEraseLive" class="def">patchEraseLive</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; (<a href="Reg.html#t:Reg">Reg</a> -&gt; <a href="Reg.html#t:Reg">Reg</a>) -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</p><div class="doc"><p>Patch the registers in this code according to this register mapping.
   also erase reg -&gt; reg moves when the reg is the same.
   also erase reg -&gt; reg moves when the destination dies in this instr.
</p></div></div><div class="top"><p class="src"><a name="v:patchRegsLiveInstr" class="def">patchRegsLiveInstr</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; (<a href="Reg.html#t:Reg">Reg</a> -&gt; <a href="Reg.html#t:Reg">Reg</a>) -&gt; <a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveInstr">LiveInstr</a> instr</p><div class="doc"><p>Patch registers in this LiveInstr, including the liveness information.
</p></div></div><div class="top"><p class="src"><a name="v:reverseBlocksInTops" class="def">reverseBlocksInTops</a> ::  <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</p><div class="doc"><p>If we've compute liveness info for this code already we have to reverse
   the SCCs in each top to get them back to the right order so we can do it again.
</p></div></div><div class="top"><p class="src"><a name="v:regLiveness" class="def">regLiveness</a> :: (<a href="Outputable.html#t:PlatformOutputable">PlatformOutputable</a> instr, <a href="Instruction.html#t:Instruction">Instruction</a> instr) =&gt; <a href="Platform.html#t:Platform">Platform</a> -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -&gt; <a href="UniqSupply.html#t:UniqSM">UniqSM</a> (<a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr)</p></div><div class="top"><p class="src"><a name="v:natCmmTopToLive" class="def">natCmmTopToLive</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr =&gt; <a href="Instruction.html#t:NatCmmDecl">NatCmmDecl</a> statics instr -&gt; <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</p><div class="doc"><p>Convert a NatCmmDecl to a LiveCmmDecl, with empty liveness information
</p></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>