<spanid="lib-phinode-module"></span><h1>Lib.PhiNode module<aclass="headerlink"href="#module-Lib.PhiNode"title="Permalink to this heading"></a></h1>
<p>Classes for φ nodes in a RiscV CFG <aclass="reference internal"href="Lib.CFG.html#Lib.CFG.CFG"title="Lib.CFG.CFG"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">CFG</span></code></a> under SSA Form:
<aclass="reference internal"href="#Lib.PhiNode.PhiNode"title="Lib.PhiNode.PhiNode"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">PhiNode</span></code></a> for a statement of the form temp_x = φ(temp_0, …, temp_n).
These particular kinds of statements are expected to be in the field
b._phis for a <aclass="reference internal"href="Lib.CFG.html#Lib.CFG.Block"title="Lib.CFG.Block"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Block</span></code></a> b.</p>
<spanclass="sig-name descname"><spanclass="pre">var</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.DataLocation"title="Lib.Operands.DataLocation"><spanclass="pre">DataLocation</span></a></em><aclass="headerlink"href="#Lib.PhiNode.PhiNode.var"title="Permalink to this definition"></a></dt>
<spanclass="sig-name descname"><spanclass="pre">srcs</span></span><emclass="property"><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="pre">Dict</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="Lib.Statement.html#Lib.Statement.Label"title="Lib.Statement.Label"><spanclass="pre">Label</span></a><spanclass="p"><spanclass="pre">,</span></span><spanclass="w"></span><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.Operand"title="Lib.Operands.Operand"><spanclass="pre">Operand</span></a><spanclass="p"><spanclass="pre">]</span></span></em><aclass="headerlink"href="#Lib.PhiNode.PhiNode.srcs"title="Permalink to this definition"></a></dt>
<spanclass="sig-name descname"><spanclass="pre">defined</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">List</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.Operand"title="Lib.Operands.Operand"><spanclass="pre">Operand</span></a><spanclass="p"><spanclass="pre">]</span></span></span></span><aclass="reference internal"href="../_modules/Lib/PhiNode.html#PhiNode.defined"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#Lib.PhiNode.PhiNode.defined"title="Permalink to this definition"></a></dt>
<dd><p>Return the variable defined by the φ node.</p>
<spanclass="sig-name descname"><spanclass="pre">get_srcs</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">Dict</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="Lib.Statement.html#Lib.Statement.Label"title="Lib.Statement.Label"><spanclass="pre">Label</span></a><spanclass="p"><spanclass="pre">,</span></span><spanclass="w"></span><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.Operand"title="Lib.Operands.Operand"><spanclass="pre">Operand</span></a><spanclass="p"><spanclass="pre">]</span></span></span></span><aclass="reference internal"href="../_modules/Lib/PhiNode.html#PhiNode.get_srcs"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#Lib.PhiNode.PhiNode.get_srcs"title="Permalink to this definition"></a></dt>
<dd><p>Return the dictionnary associating for each previous block the corresponding variable.</p>
<spanclass="sig-name descname"><spanclass="pre">used</span></span><spanclass="sig-paren">(</span><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">List</span><spanclass="p"><spanclass="pre">[</span></span><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.Operand"title="Lib.Operands.Operand"><spanclass="pre">Operand</span></a><spanclass="p"><spanclass="pre">]</span></span></span></span><aclass="reference internal"href="../_modules/Lib/PhiNode.html#PhiNode.used"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#Lib.PhiNode.PhiNode.used"title="Permalink to this definition"></a></dt>
<dd><p>Return the variables used by the statement.</p>
<spanclass="sig-name descname"><spanclass="pre">rename</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">renamer</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.Renamer"title="Lib.Operands.Renamer"><spanclass="pre">Renamer</span></a></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="reference internal"href="../_modules/Lib/PhiNode.html#PhiNode.rename"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#Lib.PhiNode.PhiNode.rename"title="Permalink to this definition"></a></dt>
<dd><p>Rename the variable defined by the φ node with a fresh name.</p>
<spanclass="sig-name descname"><spanclass="pre">rename_from</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">renamer</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><aclass="reference internal"href="Lib.Operands.html#Lib.Operands.Renamer"title="Lib.Operands.Renamer"><spanclass="pre">Renamer</span></a></span></em>, <emclass="sig-param"><spanclass="n"><spanclass="pre">label</span></span><spanclass="p"><spanclass="pre">:</span></span><spanclass="w"></span><spanclass="n"><aclass="reference internal"href="Lib.Statement.html#Lib.Statement.Label"title="Lib.Statement.Label"><spanclass="pre">Label</span></a></span></em><spanclass="sig-paren">)</span><spanclass="sig-return"><spanclass="sig-return-icon">→</span><spanclass="sig-return-typehint"><spanclass="pre">None</span></span></span><aclass="reference internal"href="../_modules/Lib/PhiNode.html#PhiNode.rename_from"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#Lib.PhiNode.PhiNode.rename_from"title="Permalink to this definition"></a></dt>
<dd><p>Rename the variable associated to the block identified by <cite>label</cite>.</p>
<spanclass="sig-name descname"><spanclass="pre">printIns</span></span><spanclass="sig-paren">(</span><emclass="sig-param"><spanclass="n"><spanclass="pre">stream</span></span></em><spanclass="sig-paren">)</span><aclass="reference internal"href="../_modules/Lib/PhiNode.html#PhiNode.printIns"><spanclass="viewcode-link"><spanclass="pre">[source]</span></span></a><aclass="headerlink"href="#Lib.PhiNode.PhiNode.printIns"title="Permalink to this definition"></a></dt>