Import Upstream version 20180207
[hcoop/debian/mlton.git] / doc / guide / localhost / ToSSA2
1 <!DOCTYPE html>
2 <html lang="en">
3 <head>
4 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5 <meta name="generator" content="AsciiDoc 8.6.9">
6 <title>ToSSA2</title>
7 <link rel="stylesheet" href="./asciidoc.css" type="text/css">
8 <link rel="stylesheet" href="./pygments.css" type="text/css">
9
10
11 <script type="text/javascript" src="./asciidoc.js"></script>
12 <script type="text/javascript">
13 /*<![CDATA[*/
14 asciidoc.install();
15 /*]]>*/
16 </script>
17 <link rel="stylesheet" href="./mlton.css" type="text/css">
18 </head>
19 <body class="article">
20 <div id="banner">
21 <div id="banner-home">
22 <a href="./Home">MLton 20180207</a>
23 </div>
24 </div>
25 <div id="header">
26 <h1>ToSSA2</h1>
27 </div>
28 <div id="content">
29 <div id="preamble">
30 <div class="sectionbody">
31 <div class="paragraph"><p><a href="ToSSA2">ToSSA2</a> is a translation pass from the <a href="SSA">SSA</a>
32 <a href="IntermediateLanguage">IntermediateLanguage</a> to the <a href="SSA2">SSA2</a> <a href="IntermediateLanguage">IntermediateLanguage</a>.</p></div>
33 </div>
34 </div>
35 <div class="sect1">
36 <h2 id="_description">Description</h2>
37 <div class="sectionbody">
38 <div class="paragraph"><p>This pass is a simple conversion from a <a href="SSA">SSA</a> program into a
39 <a href="SSA2">SSA2</a> program.</p></div>
40 <div class="paragraph"><p>The only interesting portions of the translation are:</p></div>
41 <div class="ulist"><ul>
42 <li>
43 <p>
44 an <a href="SSA">SSA</a> <span class="monospaced">ref</span> type becomes an object with a single mutable field
45 </p>
46 </li>
47 <li>
48 <p>
49 <span class="monospaced">array</span>, <span class="monospaced">vector</span>, and <span class="monospaced">ref</span> are eliminated in favor of select and updates
50 </p>
51 </li>
52 <li>
53 <p>
54 <span class="monospaced">Case</span> transfers separate discrimination and constructor argument selects
55 </p>
56 </li>
57 </ul></div>
58 </div>
59 </div>
60 <div class="sect1">
61 <h2 id="_implementation">Implementation</h2>
62 <div class="sectionbody">
63 <div class="ulist"><ul>
64 <li>
65 <p>
66 <a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa-to-ssa2.sig"><span class="monospaced">ssa-to-ssa2.sig</span></a>
67 </p>
68 </li>
69 <li>
70 <p>
71 <a href="https://github.com/MLton/mlton/blob/master/mlton/ssa/ssa-to-ssa2.fun"><span class="monospaced">ssa-to-ssa2.fun</span></a>
72 </p>
73 </li>
74 </ul></div>
75 </div>
76 </div>
77 <div class="sect1">
78 <h2 id="_details_and_notes">Details and Notes</h2>
79 <div class="sectionbody">
80 <div class="paragraph"><p></p></div>
81 </div>
82 </div>
83 </div>
84 <div id="footnotes"><hr></div>
85 <div id="footer">
86 <div id="footer-text">
87 </div>
88 <div id="footer-badges">
89 </div>
90 </div>
91 </body>
92 </html>