<!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.Graph.SpillClean</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-Graph-SpillClean.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.Graph.SpillClean</p></div><div id="description"><p class="caption">Description</p><div class="doc"><p>Clean out unneeded spill/reload instrs </p><ul><li> Handling of join points </li></ul><p>B1: B2: ... ... RELOAD SLOT(0), %r1 RELOAD SLOT(0), %r1 ... A ... ... B ... jump B3 jump B3 </p><p>B3: ... C ... RELOAD SLOT(0), %r1 ... </p><p>the plan: So long as %r1 hasn't been written to in A, B or C then we don't need the reload in B3. </p><p>What we really care about here is that on the entry to B3, %r1 will always have the same value that is in SLOT(0) (ie, %r1 is _valid_) </p><p>This also works if the reloads in B1/B2 were spills instead, because spilling %r1 to a slot makes that slot have the same value as %r1. </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"><a href="#v:cleanSpills">cleanSpills</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr => <a href="Platform.html#t:Platform">Platform</a> -> <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -> <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"><a name="v:cleanSpills" class="def">cleanSpills</a> :: <a href="Instruction.html#t:Instruction">Instruction</a> instr => <a href="Platform.html#t:Platform">Platform</a> -> <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr -> <a href="RegAlloc-Liveness.html#t:LiveCmmDecl">LiveCmmDecl</a> statics instr</p><div class="doc"><p>Clean out unneeded spill/reloads from this top level thing. </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>