<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="generator" content="AsciiDoc 8.6.10">
<title>ToSSA2</title>
<link rel="stylesheet" href="./asciidoc.css" type="text/css">
<link rel="stylesheet" href="./pygments.css" type="text/css">


<script type="text/javascript" src="./asciidoc.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
asciidoc.install();
/*]]>*/
</script>
<link rel="stylesheet" href="./mlton.css" type="text/css">
</head>
<body class="article">
<div id="banner">
<div id="banner-home">
<a href="./Home">MLton 20201002</a>
</div>
</div>
<div id="header">
<h1>ToSSA2</h1>
</div>
<div id="content">
<div id="preamble">
<div class="sectionbody">
<div class="paragraph"><p><a href="ToSSA2">ToSSA2</a> is a translation pass from the <a href="SSA">SSA</a>
<a href="IntermediateLanguage">IntermediateLanguage</a> to the <a href="SSA2">SSA2</a> <a href="IntermediateLanguage">IntermediateLanguage</a>.</p></div>
</div>
</div>
<div class="sect1">
<h2 id="_description">Description</h2>
<div class="sectionbody">
<div class="paragraph"><p>This pass is a simple conversion from a <a href="SSA">SSA</a> program into a
<a href="SSA2">SSA2</a> program.</p></div>
<div class="paragraph"><p>The only interesting portions of the translation are:</p></div>
<div class="ulist"><ul>
<li>
<p>
an <a href="SSA">SSA</a> <span class="monospaced">ref</span> type becomes an object with a single mutable field
</p>
</li>
<li>
<p>
<span class="monospaced">array</span>, <span class="monospaced">vector</span>, and <span class="monospaced">ref</span> are eliminated in favor of select and updates
</p>
</li>
<li>
<p>
<span class="monospaced">Case</span> transfers separate discrimination and constructor argument selects
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_implementation">Implementation</h2>
<div class="sectionbody">
<div class="ulist"><ul>
<li>
<p>
<a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa-to-ssa2.sig"><span class="monospaced">ssa-to-ssa2.sig</span></a>
</p>
</li>
<li>
<p>
<a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa-to-ssa2.fun"><span class="monospaced">ssa-to-ssa2.fun</span></a>
</p>
</li>
</ul></div>
</div>
</div>
<div class="sect1">
<h2 id="_details_and_notes">Details and Notes</h2>
<div class="sectionbody">
<div class="paragraph"><p></p></div>
</div>
</div>
</div>
<div id="footnotes"><hr></div>
<div id="footer">
<div id="footer-text">
</div>
<div id="footer-badges">
</div>
</div>
</body>
</html>
