diff --git a/MiniC/Lib/PhiNode.py b/MiniC/Lib/PhiNode.py index 0cb5b55..1548b4f 100644 --- a/MiniC/Lib/PhiNode.py +++ b/MiniC/Lib/PhiNode.py @@ -17,8 +17,9 @@ class PhiNode(Statement): """ A φ node is a renaming in the CFG, of the form temp_x = φ(temp_0, ..., temp_n). The field var contains the variable temp_x. - The field srcs relies for each precedent block in the CFG, identified with its label, - the variable temp_i of the φ node. + The field srcs links each corresponding predecessor in the CFG + ---identified by its label---, to the variable temp_i of the φ + node. """ var: DataLocation srcs: Dict[Label, Operand] diff --git a/PLANNING.md b/PLANNING.md index ae97251..d6fba70 100644 --- a/PLANNING.md +++ b/PLANNING.md @@ -87,3 +87,10 @@ _Academic first semester 2024-2025_ - :book: Course: Thursday 25/10/2024, 10h15-12h15. Amphi B (Gabriel Radanne) * SSA Optims [slides in english](course/cap_cours06b_ssa_optim.pdf). + +# Week 8: + +- :hammer: Lab 5b (1/2): Monday 04/11/2023, 13h30-15h30. Room E001 (Samuel Humeau & Emma Nardino) + + * Smart Register Allocation [TP05b](TP05/tp5b.pdf). + * Code in [MiniC/TP04/](MiniC/TP05/). diff --git a/TP05/tp5b.pdf b/TP05/tp5b.pdf new file mode 100644 index 0000000..1326560 Binary files /dev/null and b/TP05/tp5b.pdf differ diff --git a/docs/html/.buildinfo b/docs/html/.buildinfo index 1f994e9..f2ba597 100644 --- a/docs/html/.buildinfo +++ b/docs/html/.buildinfo @@ -1,4 +1,4 @@ # Sphinx build info version 1 # This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done. -config: 486d1ff73ffb3f41d31651516deff8a8 +config: 33a23b4514891ef44049bf19634072fc tags: 645f666f9bcd5a90fca523b33c5a78b7 diff --git a/docs/html/_modules/Lib/Allocator.html b/docs/html/_modules/Lib/Allocator.html index 0abe9c5..2c64d77 100644 --- a/docs/html/_modules/Lib/Allocator.html +++ b/docs/html/_modules/Lib/Allocator.html @@ -92,7 +92,7 @@
[docs]class Allocator(): - """General base class for Naive, AllInMem and Smart Allocators. + """General base class for Naive, AllInMem and Smart Allocators. Replace all temporaries in the code with actual data locations. Allocation is done in two steps: @@ -118,23 +118,23 @@ pass
[docs] def replace(self, old_instr: Instruction) -> List[Instruction]: - """Transform an instruction with temporaries into a list of instructions.""" + """Transform an instruction with temporaries into a list of instructions.""" return [old_instr]
[docs] def rewriteCode(self, listcode) -> None: - """Modify the code to replace temporaries with + """Modify the code to replace temporaries with registers or memory locations. """ listcode.iter_statements(self.replace)
[docs]class NaiveAllocator(Allocator): - """Naive Allocator: try to assign a register to each temporary, + """Naive Allocator: try to assign a register to each temporary, fails if there are more temporaries than registers. """
[docs] def replace(self, old_instr: Instruction) -> List[Instruction]: - """Replace Temporary operands with the corresponding allocated Register.""" + """Replace Temporary operands with the corresponding allocated Register.""" new_args: List[Operand] = [] for arg in old_instr.args(): if isinstance(arg, Temporary): @@ -145,7 +145,7 @@ return [new_instr]
[docs] def prepare(self) -> None: - """Allocate all temporaries to registers. + """Allocate all temporaries to registers. Fail if there are too many temporaries.""" regs = list(GP_REGS) # Get a writable copy temp_allocation: Dict[Temporary, DataLocation] = dict() diff --git a/docs/html/_modules/Lib/CFG.html b/docs/html/_modules/Lib/CFG.html index 6764529..12e2257 100644 --- a/docs/html/_modules/Lib/CFG.html +++ b/docs/html/_modules/Lib/CFG.html @@ -102,7 +102,7 @@
[docs]class Block: - """ + """ A basic block of a :py:class:`CFG` is made of three main parts: - a start :py:class:`label <Lib.Statement.Label>` that uniquely identifies the block in the CFG @@ -138,7 +138,7 @@ return s
[docs] def to_dot(self) -> str: # pragma: no cover - """Outputs all statements of the block as a string.""" + """Outputs all statements of the block as a string.""" # dot is weird: lines ending with \l instead of \n are left-aligned. NEWLINE = '\\l ' instr = [] @@ -153,11 +153,11 @@ return str(self._label)
[docs] def get_body(self) -> List[BlockInstr]: - """Return the statements in the body of the block (no phi-node nor the terminator).""" + """Return the statements in the body of the block (no phi-node nor the terminator).""" return self._instructions
[docs] def get_all_statements(self) -> List[Statement]: - """ + """ Return all statements of the block (including phi-nodes and the terminator, but not the label of the block). """ @@ -166,7 +166,7 @@ [self.get_terminator()])
[docs] def get_body_and_terminator(self) -> List[Statement]: - """ + """ Return all statements of the block, except phi-nodes (and the label of the block). """ @@ -174,39 +174,39 @@ [self.get_terminator()])
[docs] def get_label(self) -> Label: - """Return the label of the block.""" + """Return the label of the block.""" return self._label
[docs] def get_in(self) -> List['Block']: - """Return the list of blocks with an edge to the considered block.""" + """Return the list of blocks with an edge to the considered block.""" return self._in
[docs] def get_terminator(self) -> Terminator: - """Return the terminator of the block.""" + """Return the terminator of the block.""" return self._terminator
[docs] def set_terminator(self, term: Terminator) -> None: - """Set the terminator of the block.""" + """Set the terminator of the block.""" self._terminator = term
[docs] def get_phis(self) -> List[Statement]: - """Return the list of all φ instructions of the block.""" + """Return the list of all φ instructions of the block.""" return self._phis
[docs] def add_phi(self, phi: Statement) -> None: - """Add a φ instruction to the block.""" + """Add a φ instruction to the block.""" self._phis.append(phi)
[docs] def set_phis(self, phis: List[Statement]) -> None: - """Replace the φ instructions in the block by the given list `phis`.""" + """Replace the φ instructions in the block by the given list `phis`.""" self._phis = phis
[docs] def remove_all_phis(self) -> None: - """Remove all φ instructions in the block.""" + """Remove all φ instructions in the block.""" self._phis = []
[docs] def iter_statements(self, f) -> None: - """Iterate over instructions. + """Iterate over instructions. For each real instruction i (not label or comment), replace it with the list of instructions given by f(i). @@ -225,12 +225,12 @@ .format(self.get_terminator(), end_statements))
[docs] def add_instruction(self, instr: BlockInstr) -> None: - """Add an instruction to the body of the block.""" + """Add an instruction to the body of the block.""" self._instructions.append(instr)
[docs]class CFG: - """ + """ A complete control-flow graph representing a function. This class is mainly made of a list of basic :py:class:`Block`, a label indicating the :py:meth:`entry point of the function <get_start>`, @@ -254,7 +254,7 @@ self._end = self.fdata.fresh_label("end") def _init_blks(self) -> None: - """Add a block for division by 0.""" + """Add a block for division by 0.""" # Label for the address of the error message # This address is added by print_code label_div_by_zero_msg = Label(self.fdata._label_div_by_zero.name + "_msg") @@ -267,53 +267,53 @@ self.add_block(blk)
[docs] def get_start(self) -> Label: - """Return the entry label of the CFG.""" + """Return the entry label of the CFG.""" return self._start
[docs] def set_start(self, start: Label) -> None: - """Set the entry label of the CFG.""" + """Set the entry label of the CFG.""" assert (start in self._blocks) self._start = start
[docs] def get_end(self) -> Label: - """Return the exit label of the CFG.""" + """Return the exit label of the CFG.""" return self._end
[docs] def add_block(self, blk: Block) -> None: - """Add a new block to the CFG.""" + """Add a new block to the CFG.""" self._blocks[blk._label] = blk
[docs] def get_block(self, name: Label) -> Block: - """Return the block with label `name`.""" + """Return the block with label `name`.""" return self._blocks[name]
[docs] def get_blocks(self) -> List[Block]: - """Return all the blocks.""" + """Return all the blocks.""" return [b for b in self._blocks.values()]
[docs] def get_entries(self) -> List[Block]: - """Return all the blocks with no predecessors.""" + """Return all the blocks with no predecessors.""" return [b for b in self._blocks.values() if not b.get_in()]
[docs] def add_edge(self, src: Block, dest: Block) -> None: - """Add the edge src -> dest in the control flow graph.""" + """Add the edge src -> dest in the control flow graph.""" dest.get_in().append(src)
# assert (dest.get_label() in src.get_terminator().targets())
[docs] def remove_edge(self, src: Block, dest: Block) -> None: - """Remove the edge src -> dest in the control flow graph.""" + """Remove the edge src -> dest in the control flow graph.""" dest.get_in().remove(src)
# assert (dest.get_label() not in src.get_terminator().targets())
[docs] def out_blocks(self, block: Block) -> List[Block]: - """ + """ Return the list of blocks in the CFG targeted by the Terminator of Block block. """ return [self.get_block(dest) for dest in block.get_terminator().targets()]
[docs] def gather_defs(self) -> Dict[Any, Set[Block]]: - """ + """ Return a dictionary associating variables to all the blocks containing one of their definitions. """ @@ -328,12 +328,12 @@ return defs
[docs] def iter_statements(self, f) -> None: - """Apply f to all instructions in all the blocks.""" + """Apply f to all instructions in all the blocks.""" for b in self.get_blocks(): b.iter_statements(f)
[docs] def linearize_naive(self) -> Iterator[Statement]: - """ + """ Linearize the given control flow graph as a list of instructions. Naive procedure that adds jumps everywhere. """ @@ -353,13 +353,13 @@
[docs] def print_code(self, output, linearize=(lambda cfg: list(cfg.linearize_naive())), comment=None) -> None: - """Print the linearization of the CFG.""" + """Print the linearization of the CFG.""" statements = linearize(self) _print_code(statements, self.fdata, output, init_label=self._start, fin_label=self._end, fin_div0=False, comment=comment)
[docs] def print_dot(self, filename, DF=None, view=False) -> None: # pragma: no cover - """Print the CFG as a graph.""" + """Print the CFG as a graph.""" graph = Digraph() # nodes for name, blk in self._blocks.items(): diff --git a/docs/html/_modules/Lib/Dominators.html b/docs/html/_modules/Lib/Dominators.html index 657816f..7c2f30f 100644 --- a/docs/html/_modules/Lib/Dominators.html +++ b/docs/html/_modules/Lib/Dominators.html @@ -92,7 +92,7 @@
[docs]def computeDom(cfg: CFG) -> Dict[Block, Set[Block]]: - """ + """ `computeDom(cfg)` computes the table associating blocks to their dominators in `cfg`. It works by solving the equation system. @@ -123,7 +123,7 @@
[docs]def printDT(filename: str, graph: Dict[Block, Set[Block]]) -> None: # pragma: no cover - """Display a graphical rendering of the given domination tree.""" + """Display a graphical rendering of the given domination tree.""" dot = Digraph() for k in graph: dot.node(str(k.get_label())) @@ -135,7 +135,7 @@
[docs]def computeDT(cfg: CFG, dominators: Dict[Block, Set[Block]], dom_graphs: bool, basename: str) -> Dict[Block, Set[Block]]: - """ + """ `computeDT(cfg, dominators)` computes the domination tree of `cfg` using the previously computed `dominators`. It returns `DT`, a dictionary which associates a block with its children @@ -174,7 +174,7 @@ DT: Dict[Block, Set[Block]], b: Block, DF: Dict[Block, Set[Block]]) -> None: - """ + """ `_computeDF_at_block(...)` computes the dominance frontier at the given block, by updating `DF`. @@ -192,7 +192,7 @@
[docs]def computeDF(cfg: CFG, dominators: Dict[Block, Set[Block]], DT: Dict[Block, Set[Block]], dom_graphs: bool, basename: str ) -> Dict[Block, Set[Block]]: - """ + """ `computeDF(...)` computes the dominance frontier of a CFG. It returns `DF` which associates a block to its frontier. diff --git a/docs/html/_modules/Lib/FunctionData.html b/docs/html/_modules/Lib/FunctionData.html index ef804b1..d4179ba 100644 --- a/docs/html/_modules/Lib/FunctionData.html +++ b/docs/html/_modules/Lib/FunctionData.html @@ -94,7 +94,7 @@
[docs]class FunctionData: - """ + """ Stores some metadata on a RiscV function: name of the function, label names, temporary variables (using :py:class:`Lib.Operands.TemporaryPool`), @@ -119,18 +119,18 @@ self._label_div_by_zero = self.fresh_label("div_by_zero")
[docs] def get_name(self) -> str: - """Return the name of the function.""" + """Return the name of the function.""" return self._name
[docs] def fresh_tmp(self) -> Temporary: - """ + """ Return a new fresh Temporary, which is added to the pool. """ return self._pool.fresh_tmp()
[docs] def fresh_offset(self) -> Offset: - """ + """ Return a new offset in the memory stack. Offsets are decreasing relative to FP. """ @@ -144,20 +144,20 @@ return Offset(FP, -8 * self._dec)
[docs] def get_offset(self) -> int: - """ + """ Return the current offset in the memory stack. """ return self._dec
def _fresh_label_name(self, name) -> str: - """ + """ Return a new unique label name based on the given string. """ self._nblabel = self._nblabel + 1 return name + "_" + str(self._nblabel) + "_" + self._name
[docs] def fresh_label(self, name) -> Label: - """ + """ Return a new label, with a unique name based on the given string. """ return Label(self._fresh_label_name(name))
@@ -171,7 +171,7 @@ def _iter_statements( listIns: List[_T], f: Callable[[_T], List[_T]]) -> List[_T | Comment]: - """Iterate over instructions. + """Iterate over instructions. For each real instruction i (not label or comment), replace it with the list of instructions given by f(i). """ @@ -191,7 +191,7 @@ def _print_code(listIns: List, fdata: FunctionData, output, init_label=None, fin_label=None, fin_div0=False, comment=None) -> None: - """ + """ Please use print_code from LinearCode or CFG, not directly this one. Print the instructions from listIns, forming fdata, on output. @@ -214,9 +214,9 @@ # We use t0 because it is caller-saved output.write(""" .text - .globl {0} + .globl {0} {0}: - li t0, {1} + li t0, {1} sub sp, sp, t0 sd ra, 0(sp) sd fp, 8(sp) @@ -226,7 +226,7 @@ if init_label is not None: # Add a jump to init_label before the generated code. output.write(""" - j {0} + j {0} """.format(init_label)) output.write("\n\n##Generated Code\n") # Generated code @@ -243,7 +243,7 @@ output.write(""" ld ra, 0(sp) ld fp, 8(sp) - li t0, {0} + li t0, {0} add sp, sp, t0 ret """.format(cardoffset)) diff --git a/docs/html/_modules/Lib/Graphes.html b/docs/html/_modules/Lib/Graphes.html index 8530b26..049b6c4 100644 --- a/docs/html/_modules/Lib/Graphes.html +++ b/docs/html/_modules/Lib/Graphes.html @@ -87,7 +87,7 @@
[docs]class GraphError(Exception): - """Exception raised for self loops. + """Exception raised for self loops. """ message: str @@ -97,7 +97,7 @@
[docs]class GeneralGraph(object): - """ + """ General class regrouping similarities between directed and non oriented graphs. The only differences between the two are: @@ -113,7 +113,7 @@ graph_dict: Dict[Any, Set] def __init__(self, graph_dict=None): - """ + """ Initializes a graph object. If no dictionary or None is given, an empty dictionary will be used. @@ -123,11 +123,11 @@ self.graph_dict = graph_dict
[docs] def vertices(self) -> List[Any]: - """Return the vertices of a graph.""" + """Return the vertices of a graph.""" return list(self.graph_dict.keys())
[docs] def add_vertex(self, vertex: Any) -> None: - """ + """ If the vertex "vertex" is not in self.graph_dict, a key "vertex" with an empty list as a value is added to the dictionary. @@ -137,7 +137,7 @@ self.graph_dict[vertex] = set()
[docs] def edges(self) -> List[Set]: - """Return the edges of the graph.""" + """Return the edges of the graph.""" return []
def __str__(self): @@ -150,7 +150,7 @@ return res
[docs] def dfs_traversal(self, root: Any) -> List[Any]: - """ + """ Compute a depth first search of the graph, from the vertex root. """ @@ -165,11 +165,11 @@ return seen
[docs] def is_reachable_from(self, v1: Any, v2: Any) -> bool: - """True if there is a path from v1 to v2.""" + """True if there is a path from v1 to v2.""" return v2 in self.dfs_traversal(v1)
[docs] def connected_components(self) -> List[List[Any]]: - """ + """ Compute the list of all connected components of the graph, each component being a list of vetices. """ @@ -183,7 +183,7 @@ return components
[docs] def bfs_traversal(self, root: Any) -> List[Any]: - """ + """ Compute a breadth first search of the graph, from the vertex root. """ @@ -199,10 +199,10 @@
[docs]class Graph(GeneralGraph): - """Class for non oriented graphs.""" + """Class for non oriented graphs."""
[docs] def edges(self) -> List[Set]: - """ + """ A static method generating the set of edges (they appear twice in the dictionnary). Return a list of sets. @@ -215,7 +215,7 @@ return edges
[docs] def add_edge(self, edge: Tuple[Any, Any]) -> None: - """ + """ Add an edge in the graph. edge should be a pair and not (c,c) (we call g.add_edge((v1,v2))) @@ -234,7 +234,7 @@ self.graph_dict[vertex2] = {vertex1}
[docs] def print_dot(self, name: str, colors={}) -> None: - """Print the graph.""" + """Print the graph.""" color_names = ['red', 'blue', 'green', 'yellow', 'cyan', 'magenta'] + \ [f"grey{i}" for i in range(0, 100, 10)] color_shapes = ['ellipse', 'box', 'diamond', 'trapezium', 'egg', @@ -261,20 +261,20 @@ dot.render(name, view=True) # print in pdf
[docs] def delete_vertex(self, vertex: Any) -> None: - """Delete a vertex and all the adjacent edges.""" + """Delete a vertex and all the adjacent edges.""" gdict = self.graph_dict for neighbour in gdict[vertex]: gdict[neighbour].remove(vertex) del gdict[vertex]
[docs] def delete_edge(self, edge: Tuple[Any, Any]): - """Delete an edge.""" + """Delete an edge.""" (v1, v2) = edge self.graph_dict[v1].remove(v2) self.graph_dict[v2].remove(v1)
[docs] def color(self) -> Dict[Any, int]: - """ + """ Color the graph with an unlimited number of colors. Return a dict vertex -> color, where color is an integer (0, 1, ...). """ @@ -283,7 +283,7 @@ # see algo of the course
[docs] def color_with_k_colors(self, K=None, avoidingnodes=()) -> Tuple[Dict[Any, int], bool, List]: - """ + """ Color with <= K colors (if K is unspecified, use unlimited colors). Return 3 values: @@ -336,18 +336,18 @@
[docs]class DiGraph(GeneralGraph): - """Class for directed graphs.""" + """Class for directed graphs."""
[docs] def pred(self, v: Any) -> Set: - """Return all predecessors of the vertex `v` in the graph.""" + """Return all predecessors of the vertex `v` in the graph.""" return {src for src, dests in self.graph_dict.items() if v in dests}
[docs] def neighbourhoods(self) -> List[Tuple[Any, Set]]: - """Return all neighbourhoods in the graph.""" + """Return all neighbourhoods in the graph.""" return list(self.graph_dict.items())
[docs] def edges(self) -> List[Set]: - """ A static method generating the set of edges""" + """ A static method generating the set of edges""" edges = [] for vertex in self.graph_dict: for neighbour in self.graph_dict[vertex]: @@ -355,7 +355,7 @@ return edges
[docs] def add_edge(self, edge: Tuple[Any, Any]) -> None: - """ + """ Add an edge in the graph. edge should be a pair and not (c,c) (we call g.add_edge((v1,v2))) @@ -369,7 +369,7 @@ self.graph_dict[vertex2] = set()
[docs] def print_dot(self, name: str) -> None: - """Print the graph.""" + """Print the graph.""" dot = Digraph(comment='Conflict Graph') for k in self.graph_dict: shape = None @@ -381,14 +381,14 @@ dot.render(name, view=True) # print in pdf
[docs] def delete_vertex(self, vertex: Any) -> None: - """Delete a vertex and all the adjacent edges.""" + """Delete a vertex and all the adjacent edges.""" for node, neighbours in self.graph_dict.items(): if vertex in neighbours: neighbours.remove(vertex) del self.graph_dict[vertex]
[docs] def delete_edge(self, edge: Tuple[Any, Any]) -> None: - """Delete an edge.""" + """Delete an edge.""" (v1, v2) = edge self.graph_dict[v1].remove(v2)
diff --git a/docs/html/_modules/Lib/LinearCode.html b/docs/html/_modules/Lib/LinearCode.html index cc12086..63046f3 100644 --- a/docs/html/_modules/Lib/LinearCode.html +++ b/docs/html/_modules/Lib/LinearCode.html @@ -97,7 +97,7 @@
[docs]class LinearCode: - """ + """ Representation of a RiscV program as a list of instructions. :py:meth:`add_instruction` is repeatedly called in the codegen visitor @@ -111,7 +111,7 @@ the RiscV program to a file. """ - """ + """ The :py:attr:`fdata` member variable contains some meta-information on the program, for instance to allocate a new temporary. See :py:class:`Lib.FunctionData.FunctionData`. @@ -125,7 +125,7 @@ self.fdata = FunctionData(name)
[docs] def add_instruction(self, i: CodeStatement) -> None: - """ + """ Utility function to add an instruction in the program. See also :py:mod:`Lib.RiscV` to generate relevant instructions. @@ -133,7 +133,7 @@ self._listIns.append(i)
[docs] def iter_statements(self, f) -> None: - """Iterate over instructions. + """Iterate over instructions. For each real instruction i (not label or comment), replace it with the list of instructions given by f(i). """ @@ -144,20 +144,20 @@ self._listIns = new_list_ins
[docs] def get_instructions(self) -> List[CodeStatement]: - """Return the list of instructions of the program.""" + """Return the list of instructions of the program.""" return self._listIns
# each instruction has its own "add in list" version
[docs] def add_label(self, s: Label) -> None: - """Add a label in the program.""" + """Add a label in the program.""" return self.add_instruction(s)
[docs] def add_comment(self, s: str) -> None: - """Add a comment in the program.""" + """Add a comment in the program.""" self.add_instruction(Comment(s))
[docs] def add_instruction_PRINTLN_INT(self, reg: DataLocation) -> None: - """Print integer value, with newline. (see Expand)""" + """Print integer value, with newline. (see Expand)""" # A print instruction generates the temp it prints. self.add_instruction(mv(A0, reg)) self.add_instruction(call(Function('println_int')))
@@ -166,12 +166,12 @@ return '\n'.join(map(str, self._listIns))
[docs] def print_code(self, output, comment=None) -> None: - """Outputs the RiscV program as text to a file at the given path.""" + """Outputs the RiscV program as text to a file at the given path.""" _print_code(self._listIns, self.fdata, output, init_label=None, fin_label=None, fin_div0=True, comment=comment)
[docs] def print_dot(self, filename: str, DF=None, view=False) -> None: # pragma: no cover - """Outputs the RiscV program as graph to a file at the given path.""" + """Outputs the RiscV program as graph to a file at the given path.""" # import graphviz here so that students who don't have it can still work on lab4 from graphviz import Digraph graph = Digraph() diff --git a/docs/html/_modules/Lib/Operands.html b/docs/html/_modules/Lib/Operands.html index e2aead9..16ce5a7 100644 --- a/docs/html/_modules/Lib/Operands.html +++ b/docs/html/_modules/Lib/Operands.html @@ -118,7 +118,7 @@
[docs]class Condition(Operand): - """Condition, i.e. comparison operand for a CondJump. + """Condition, i.e. comparison operand for a CondJump. Example usage : @@ -144,7 +144,7 @@ raise MiniCInternalError(f"Unsupported comparison operator {optype}")
[docs] def negate(self) -> 'Condition': - """Return the opposite condition.""" + """Return the opposite condition.""" return Condition(opnot_dict[self._op])
def __str__(self): @@ -152,7 +152,7 @@
[docs]class Function(Operand): - """Operand for build-in function call.""" + """Operand for build-in function call.""" _name: str @@ -164,7 +164,7 @@
[docs]class DataLocation(Operand): - """ A Data Location is either a register, a temporary + """ A Data Location is either a register, a temporary or a place in memory (offset). """ @@ -181,7 +181,7 @@
[docs]class Register(DataLocation): - """ A (physical) register.""" + """ A (physical) register.""" _number: int @@ -234,7 +234,7 @@
[docs]class Offset(DataLocation): - """ Offset = address in memory computed with base + offset.""" + """ Offset = address in memory computed with base + offset.""" _basereg: Register _offset: int @@ -247,12 +247,12 @@ return ("{}({})".format(self._offset, self._basereg))
[docs] def get_offset(self) -> int: - """Return the value of the offset.""" + """Return the value of the offset.""" return self._offset
[docs]class Immediate(DataLocation): - """Immediate operand (integer).""" + """Immediate operand (integer).""" _val: int @@ -264,7 +264,7 @@
[docs]class Temporary(DataLocation): - """Temporary, a location that has not been allocated yet. + """Temporary, a location that has not been allocated yet. It will later be mapped to a physical register (Register) or to a memory location (Offset). """ @@ -279,12 +279,12 @@ return ("temp_{}".format(str(self._number)))
[docs] def get_alloced_loc(self) -> DataLocation: - """Return the DataLocation allocated to this Temporary.""" + """Return the DataLocation allocated to this Temporary.""" return self._pool.get_alloced_loc(self)
[docs]class TemporaryPool: - """Manage a pool of temporaries.""" + """Manage a pool of temporaries.""" _all_temps: List[Temporary] _current_num: int @@ -296,20 +296,20 @@ self._allocation = dict()
[docs] def get_all_temps(self) -> List[Temporary]: - """Return all the temporaries of the pool.""" + """Return all the temporaries of the pool.""" return self._all_temps
[docs] def get_alloced_loc(self, t: Temporary) -> DataLocation: - """Get the actual DataLocation allocated for the temporary t.""" + """Get the actual DataLocation allocated for the temporary t.""" return self._allocation[t]
[docs] def add_tmp(self, t: Temporary): - """Add a temporary to the pool.""" + """Add a temporary to the pool.""" self._all_temps.append(t) self._allocation[t] = t # While no allocation, return the temporary itself
[docs] def set_temp_allocation(self, allocation: Dict[Temporary, DataLocation]) -> None: - """Give a mapping from temporaries to actual registers. + """Give a mapping from temporaries to actual registers. The argument allocation must be a dict from Temporary to DataLocation other than Temporary (typically Register or Offset). Typing enforces that keys are Temporary and values are Datalocation. @@ -322,7 +322,7 @@ self._allocation = allocation
[docs] def fresh_tmp(self) -> Temporary: - """Give a new fresh Temporary and add it to the pool.""" + """Give a new fresh Temporary and add it to the pool.""" t = Temporary(self._current_num, self) self._current_num += 1 self.add_tmp(t) @@ -330,7 +330,7 @@
[docs]class Renamer: - """Manage a renaming of temporaries.""" + """Manage a renaming of temporaries.""" _pool: TemporaryPool _env: Dict[Temporary, Temporary] @@ -340,21 +340,21 @@ self._env = dict()
[docs] def fresh(self, t: Temporary) -> Temporary: - """Give a fresh rename for a Temporary.""" + """Give a fresh rename for a Temporary.""" new_t = self._pool.fresh_tmp() self._env[t] = new_t return new_t
[docs] def replace(self, t: Temporary) -> Temporary: - """Give the rename for a Temporary (which is itself if it is not renamed).""" + """Give the rename for a Temporary (which is itself if it is not renamed).""" return self._env.get(t, t)
[docs] def defined(self, t: Temporary) -> bool: - """True if the Temporary is renamed.""" + """True if the Temporary is renamed.""" return t in self._env
[docs] def copy(self): - """Give a copy of the Renamer.""" + """Give a copy of the Renamer.""" r = Renamer(self._pool) r._env = self._env.copy() return r
diff --git a/docs/html/_modules/Lib/PhiNode.html b/docs/html/_modules/Lib/PhiNode.html index 6165fcc..3f607ff 100644 --- a/docs/html/_modules/Lib/PhiNode.html +++ b/docs/html/_modules/Lib/PhiNode.html @@ -95,36 +95,37 @@
[docs]@dataclass class PhiNode(Statement): - """ + """ A φ node is a renaming in the CFG, of the form temp_x = φ(temp_0, ..., temp_n). The field var contains the variable temp_x. - The field srcs relies for each precedent block in the CFG, identified with its label, - the variable temp_i of the φ node. + The field srcs links each corresponding predecessor in the CFG + ---identified by its label---, to the variable temp_i of the φ + node. """ var: DataLocation srcs: Dict[Label, Operand]
[docs] def defined(self) -> List[Operand]: - """Return the variable defined by the φ node.""" + """Return the variable defined by the φ node.""" return [self.var]
[docs] def get_srcs(self) -> Dict[Label, Operand]: - """ + """ Return the dictionnary associating for each previous block the corresponding variable. """ return self.srcs
[docs] def used(self) -> List[Operand]: - """Return the variables used by the statement.""" + """Return the variables used by the statement.""" return list(self.srcs.values())
[docs] def rename(self, renamer: Renamer) -> None: - """Rename the variable defined by the φ node with a fresh name.""" + """Rename the variable defined by the φ node with a fresh name.""" if isinstance(self.var, Temporary): self.var = renamer.fresh(self.var)
[docs] def rename_from(self, renamer: Renamer, label: Label) -> None: - """Rename the variable associated to the block identified by `label`.""" + """Rename the variable associated to the block identified by `label`.""" if label in self.srcs: t = self.srcs[label] if isinstance(t, Temporary): diff --git a/docs/html/_modules/Lib/RiscV.html b/docs/html/_modules/Lib/RiscV.html index 6e3ca50..fa3caf5 100644 --- a/docs/html/_modules/Lib/RiscV.html +++ b/docs/html/_modules/Lib/RiscV.html @@ -90,17 +90,17 @@
[docs]def call(function: Function) -> Instru3A: - """Function call.""" + """Function call.""" return Instru3A('call', function)
[docs]def jump(label: Label) -> AbsoluteJump: - """Unconditional jump to label.""" + """Unconditional jump to label.""" return AbsoluteJump(label)
[docs]def conditional_jump(label: Label, op1: Operand, cond: Condition, op2: Operand): - """Add a conditional jump to the code. + """Add a conditional jump to the code. This is a wrapper around bge, bgt, beq, ... c is a Condition, like Condition('bgt'), Condition(MiniCParser.EQ), ... """ @@ -141,12 +141,12 @@
[docs]def land(dr: Operand, sr1: Operand, sr2orimm7: Operand) -> Instru3A: - """And instruction (cannot be called `and` due to Python and).""" + """And instruction (cannot be called `and` due to Python and).""" return Instru3A("and", dr, sr1, sr2orimm7)
[docs]def lor(dr: Operand, sr1: Operand, sr2orimm7: Operand) -> Instru3A: - """Or instruction (cannot be called `or` due to Python or).""" + """Or instruction (cannot be called `or` due to Python or).""" return Instru3A("or", dr, sr1, sr2orimm7)
diff --git a/docs/html/_modules/Lib/Statement.html b/docs/html/_modules/Lib/Statement.html index d8435b7..04ea512 100644 --- a/docs/html/_modules/Lib/Statement.html +++ b/docs/html/_modules/Lib/Statement.html @@ -95,7 +95,7 @@
[docs]def regset_to_string(registerset) -> str: - """Utility function: pretty-prints a set of locations.""" + """Utility function: pretty-prints a set of locations.""" return "{" + ",".join(str(x) for x in registerset) + "}"
@@ -105,32 +105,32 @@
[docs]@dataclass(unsafe_hash=True) class Statement: - """A Statement, which is an instruction, a comment or a label.""" + """A Statement, which is an instruction, a comment or a label."""
[docs] def defined(self) -> List[Operand]: - """Operands defined (written) in this instruction""" + """Operands defined (written) in this instruction""" return []
[docs] def used(self) -> List[Operand]: - """Operands used (read) in this instruction""" + """Operands used (read) in this instruction""" return []
[docs] def substitute(self: TStatement, subst: Dict[Operand, Operand]) -> TStatement: - """Return a new instruction, cloned from this one, replacing operands + """Return a new instruction, cloned from this one, replacing operands that appear as key in subst by their value.""" raise Exception( "substitute: Operands {} are not present in instruction {}" .format(subst, self))
[docs] def with_args(self: TStatement, new_args: List[Operand]) -> TStatement: - """Return a new instruction, cloned from this one, where operands have + """Return a new instruction, cloned from this one, where operands have been replaced by new_args.""" raise Exception( "substitute: Operands {} are not present in instruction {}" .format(new_args, self))
[docs] def printIns(self, stream): - """ + """ Print the statement on the given output. Should never be called on the base class. """ @@ -139,7 +139,7 @@
[docs]@dataclass(unsafe_hash=True) class Comment(Statement): - """A comment.""" + """A comment.""" comment: str def __str__(self): # use only for print_dot ! @@ -151,7 +151,7 @@
[docs]@dataclass(unsafe_hash=True) class Label(Statement, Operand): - """A label is both a Statement and an Operand.""" + """A label is both a Statement and an Operand.""" name: str def __str__(self): @@ -170,7 +170,7 @@ _read_only: bool
[docs] def is_read_only(self): - """ + """ True if the instruction only reads from its operands. Otherwise, the first operand is considered as the destination @@ -182,7 +182,7 @@ raise NotImplementedError
[docs] def args(self) -> List[Operand]: - """List of operands the instruction takes""" + """List of operands the instruction takes""" raise NotImplementedError
[docs] def defined(self): @@ -214,7 +214,7 @@ return hash((self.ins, *self.args()))
[docs] def printIns(self, stream): - """Print the instruction on the given output.""" + """Print the instruction on the given output.""" print(' ', str(self), file=stream)
@@ -273,7 +273,7 @@
[docs]@dataclass(init=False) class AbsoluteJump(Instruction): - """ An Absolute Jump is a specific kind of instruction""" + """ An Absolute Jump is a specific kind of instruction""" ins = "j" label: Label _read_only = True @@ -305,13 +305,13 @@ return hash(super)
[docs] def targets(self) -> List[Label]: - """Return the labels targetted by the AbsoluteJump.""" + """Return the labels targetted by the AbsoluteJump.""" return [self.label]
[docs]@dataclass(init=False) class ConditionalJump(Instruction): - """ A Conditional Jump is a specific kind of instruction""" + """ A Conditional Jump is a specific kind of instruction""" cond: Condition label: Label op1: Operand diff --git a/docs/html/_modules/Lib/Terminator.html b/docs/html/_modules/Lib/Terminator.html index 2194c58..f0c0dc8 100644 --- a/docs/html/_modules/Lib/Terminator.html +++ b/docs/html/_modules/Lib/Terminator.html @@ -108,7 +108,7 @@
[docs]@dataclass(unsafe_hash=True) class Return(Statement): - """A terminator that marks the end of the function.""" + """A terminator that marks the end of the function.""" def __str__(self): return ("return") @@ -117,7 +117,7 @@ print("return", file=stream)
[docs] def targets(self) -> List[Label]: - """Return the labels targetted by the Return terminator.""" + """Return the labels targetted by the Return terminator.""" return []
[docs] def args(self) -> List[Operand]: @@ -146,7 +146,7 @@
[docs]@dataclass(init=False) class BranchingTerminator(Instruction): - """A terminating statement with a condition.""" + """A terminating statement with a condition.""" #: The condition of the branch cond: Condition @@ -173,7 +173,7 @@ return [self.op1, self.op2, self.label_then, self.label_else]
[docs] def targets(self) -> List[Label]: - """Return the labels targetted by the Branching terminator.""" + """Return the labels targetted by the Branching terminator.""" return [self.label_then, self.label_else]
[docs] def rename(self, renamer: Renamer): @@ -213,7 +213,7 @@
[docs]def jump2terminator(j: ConditionalJump | AbsoluteJump | None, next_label: Label | None) -> Terminator: - """ + """ Construct the Terminator associated to the potential jump j to the potential label next_label. """ @@ -227,7 +227,7 @@ return BranchingTerminator(j.cond, j.op1, j.op2, j.label, label_else) case AbsoluteJump(): return AbsoluteJump(label=j.label) - case _: + case _: if next_label: return AbsoluteJump(next_label) else: diff --git a/docs/html/api/Lib.Allocator.html b/docs/html/api/Lib.Allocator.html index a9bb12c..585183a 100644 --- a/docs/html/api/Lib.Allocator.html +++ b/docs/html/api/Lib.Allocator.html @@ -1,7 +1,7 @@ - + Lib.Allocator module — MiniC documentation diff --git a/docs/html/api/Lib.CFG.html b/docs/html/api/Lib.CFG.html index 68bbd2c..f978664 100644 --- a/docs/html/api/Lib.CFG.html +++ b/docs/html/api/Lib.CFG.html @@ -1,7 +1,7 @@ - + Lib.CFG module — MiniC documentation diff --git a/docs/html/api/Lib.Dominators.html b/docs/html/api/Lib.Dominators.html index 9fe1b1f..be0cfe3 100644 --- a/docs/html/api/Lib.Dominators.html +++ b/docs/html/api/Lib.Dominators.html @@ -1,7 +1,7 @@ - + Lib.Dominators module — MiniC documentation diff --git a/docs/html/api/Lib.Errors.html b/docs/html/api/Lib.Errors.html index b0f8251..f1c4dd0 100644 --- a/docs/html/api/Lib.Errors.html +++ b/docs/html/api/Lib.Errors.html @@ -1,7 +1,7 @@ - + Lib.Errors module — MiniC documentation diff --git a/docs/html/api/Lib.FunctionData.html b/docs/html/api/Lib.FunctionData.html index 1da9c94..b713ba6 100644 --- a/docs/html/api/Lib.FunctionData.html +++ b/docs/html/api/Lib.FunctionData.html @@ -1,7 +1,7 @@ - + Lib.FunctionData module — MiniC documentation diff --git a/docs/html/api/Lib.Graphes.html b/docs/html/api/Lib.Graphes.html index e917ae8..8715b63 100644 --- a/docs/html/api/Lib.Graphes.html +++ b/docs/html/api/Lib.Graphes.html @@ -1,7 +1,7 @@ - + Lib.Graphes module — MiniC documentation diff --git a/docs/html/api/Lib.LinearCode.html b/docs/html/api/Lib.LinearCode.html index 428159c..135da3e 100644 --- a/docs/html/api/Lib.LinearCode.html +++ b/docs/html/api/Lib.LinearCode.html @@ -1,7 +1,7 @@ - + Lib.LinearCode module — MiniC documentation diff --git a/docs/html/api/Lib.Operands.html b/docs/html/api/Lib.Operands.html index c6babbb..77fd567 100644 --- a/docs/html/api/Lib.Operands.html +++ b/docs/html/api/Lib.Operands.html @@ -1,7 +1,7 @@ - + Lib.Operands module — MiniC documentation diff --git a/docs/html/api/Lib.PhiNode.html b/docs/html/api/Lib.PhiNode.html index c14e794..30d9044 100644 --- a/docs/html/api/Lib.PhiNode.html +++ b/docs/html/api/Lib.PhiNode.html @@ -1,7 +1,7 @@ - + Lib.PhiNode module — MiniC documentation @@ -105,8 +105,9 @@ b._phis for a

Bases: Statement

A φ node is a renaming in the CFG, of the form temp_x = φ(temp_0, …, temp_n). The field var contains the variable temp_x. -The field srcs relies for each precedent block in the CFG, identified with its label, -the variable temp_i of the φ node.

+The field srcs links each corresponding predecessor in the CFG +—identified by its label—, to the variable temp_i of the φ +node.

var: DataLocation
diff --git a/docs/html/api/Lib.RiscV.html b/docs/html/api/Lib.RiscV.html index db2c035..43d0bb6 100644 --- a/docs/html/api/Lib.RiscV.html +++ b/docs/html/api/Lib.RiscV.html @@ -1,7 +1,7 @@ - + Lib.RiscV module — MiniC documentation diff --git a/docs/html/api/Lib.Statement.html b/docs/html/api/Lib.Statement.html index b67d408..5372635 100644 --- a/docs/html/api/Lib.Statement.html +++ b/docs/html/api/Lib.Statement.html @@ -1,7 +1,7 @@ - + Lib.Statement module — MiniC documentation diff --git a/docs/html/api/Lib.Terminator.html b/docs/html/api/Lib.Terminator.html index 769a35a..b1bac9f 100644 --- a/docs/html/api/Lib.Terminator.html +++ b/docs/html/api/Lib.Terminator.html @@ -1,7 +1,7 @@ - + Lib.Terminator module — MiniC documentation diff --git a/docs/html/api/Lib.html b/docs/html/api/Lib.html index 7870a6f..56b21c3 100644 --- a/docs/html/api/Lib.html +++ b/docs/html/api/Lib.html @@ -1,7 +1,7 @@ - + Lib package — MiniC documentation diff --git a/docs/html/api/modules.html b/docs/html/api/modules.html index 013bbb6..e20adb6 100644 --- a/docs/html/api/modules.html +++ b/docs/html/api/modules.html @@ -1,7 +1,7 @@ - + MiniC — MiniC documentation diff --git a/docs/html/index.html b/docs/html/index.html index 7868ea9..18c304a 100644 --- a/docs/html/index.html +++ b/docs/html/index.html @@ -1,7 +1,7 @@ - + Welcome to MiniC’s documentation! — MiniC documentation diff --git a/docs/html/searchindex.js b/docs/html/searchindex.js index 3acac44..32e361c 100644 --- a/docs/html/searchindex.js +++ b/docs/html/searchindex.js @@ -1 +1 @@ -Search.setIndex({"docnames": ["api/Lib", "api/Lib.Allocator", "api/Lib.CFG", "api/Lib.Dominators", "api/Lib.Errors", "api/Lib.FunctionData", "api/Lib.Graphes", "api/Lib.LinearCode", "api/Lib.Operands", "api/Lib.PhiNode", "api/Lib.RiscV", "api/Lib.Statement", "api/Lib.Terminator", "api/modules", "index"], "filenames": ["api/Lib.rst", "api/Lib.Allocator.rst", "api/Lib.CFG.rst", "api/Lib.Dominators.rst", "api/Lib.Errors.rst", "api/Lib.FunctionData.rst", "api/Lib.Graphes.rst", "api/Lib.LinearCode.rst", "api/Lib.Operands.rst", "api/Lib.PhiNode.rst", "api/Lib.RiscV.rst", "api/Lib.Statement.rst", "api/Lib.Terminator.rst", "api/modules.rst", "index.rst"], "titles": ["Lib package", "Lib.Allocator module", "Lib.CFG module", "Lib.Dominators module", "Lib.Errors module", "Lib.FunctionData module", "Lib.Graphes module", "Lib.LinearCode module", "Lib.Operands module", "Lib.PhiNode module", "Lib.RiscV module", "Lib.Statement module", "Lib.Terminator module", "MiniC", "Welcome to MiniC\u2019s documentation!"], "terms": {"alloc": [0, 7, 8, 13], "prepar": [0, 1, 14], "replac": [0, 1, 2, 7, 8, 11, 12, 14], "rewritecod": [0, 1, 14], "naivealloc": [0, 1, 13, 14], "cfg": [0, 3, 9, 12, 13, 14], "block": [0, 2, 3, 9, 12, 13, 14], "to_dot": [0, 2, 14], "get_bodi": [0, 2, 14], "get_all_stat": [0, 2, 14], "get_body_and_termin": [0, 2, 14], "get_label": [0, 2, 14], "get_in": [0, 2, 14], "get_termin": [0, 2, 14], "set_termin": [0, 2, 14], "get_phi": [0, 2, 14], "add_phi": [0, 2, 14], "set_phi": [0, 2, 14], "remove_all_phi": [0, 2, 14], "iter_stat": [0, 1, 2, 7, 14], "add_instruct": [0, 2, 7, 14], "fdata": [0, 1, 2, 5, 7, 14], "get_start": [0, 2, 14], "set_start": [0, 2, 14], "get_end": [0, 2, 14], "add_block": [0, 2, 14], "get_block": [0, 2, 14], "get_entri": [0, 2, 14], "add_edg": [0, 2, 6, 14], "remove_edg": [0, 2, 14], "out_block": [0, 2, 14], "gather_def": [0, 2, 14], "linearize_na": [0, 2, 14], "print_cod": [0, 2, 7, 14], "print_dot": [0, 2, 6, 7, 14], "domin": [0, 13, 14], "computedom": [0, 3, 13, 14], "printdt": [0, 3, 13, 14], "computedt": [0, 3, 13, 14], "computedf": [0, 3, 13, 14], "error": [0, 13, 14], "minicruntimeerror": [0, 4, 13, 14], "minicinternalerror": [0, 4, 13, 14], "minicunsupportederror": [0, 4, 13, 14], "minictypeerror": [0, 4, 13, 14], "allocationerror": [0, 4, 13, 14], "functiondata": [0, 1, 2, 7, 13, 14], "get_nam": [0, 5, 14], "fresh_tmp": [0, 5, 8, 14], "fresh_offset": [0, 5, 14], "get_offset": [0, 5, 8, 14], "fresh_label": [0, 5, 14], "get_label_div_by_zero": [0, 5, 14], "graph": [0, 2, 3, 7, 13], "grapherror": [0, 6, 13, 14], "messag": [0, 6, 14], "generalgraph": [0, 6, 13, 14], "graph_dict": [0, 6, 14], "vertic": [0, 6, 14], "add_vertex": [0, 6, 14], "edg": [0, 2, 6, 14], "dfs_travers": [0, 6, 14], "is_reachable_from": [0, 6, 14], "connected_compon": [0, 6, 14], "bfs_travers": [0, 6, 14], "delete_vertex": [0, 6, 14], "delete_edg": [0, 6, 14], "color": [0, 6, 14], "color_with_k_color": [0, 6, 14], "digraph": [0, 6, 13, 14], "pred": [0, 6, 14], "neighbourhood": [0, 6, 14], "linearcod": [0, 1, 5, 12, 13, 14], "get_instruct": [0, 7, 14], "add_label": [0, 7, 14], "add_com": [0, 7, 14], "add_instruction_println_int": [0, 7, 14], "operand": [0, 1, 5, 9, 10, 11, 12, 13, 14], "condit": [0, 8, 10, 11, 12, 13, 14], "negat": [0, 8, 14], "function": [0, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14], "dataloc": [0, 7, 8, 9, 13, 14], "regist": [0, 1, 8, 13, 14], "zero": [0, 8, 13, 14], "ra": [0, 8, 13, 14], "sp": [0, 8, 13, 14], "gp": [0, 8, 13, 14], "tp": [0, 8, 13, 14], "A": [0, 2, 6, 8, 9, 11, 12, 13, 14], "": [0, 7, 8, 13], "t": [0, 8, 13, 14], "a0": [0, 8, 13, 14], "a1": [0, 8, 13, 14], "fp": [0, 5, 8, 13, 14], "gp_reg": [0, 8, 13, 14], "offset": [0, 5, 8, 13, 14], "immedi": [0, 8, 10, 13, 14], "temporari": [0, 1, 5, 7, 8, 13], "get_alloced_loc": [0, 8, 14], "temporarypool": [0, 1, 5, 8, 13, 14], "get_all_temp": [0, 8, 14], "add_tmp": [0, 8, 14], "set_temp_alloc": [0, 1, 8, 14], "renam": [0, 8, 9, 11, 12, 13, 14], "fresh": [0, 5, 8, 9, 14], "defin": [0, 1, 5, 8, 9, 10, 11, 14], "copi": [0, 8, 14], "phinod": [0, 13, 14], "var": [0, 9, 14], "src": [0, 2, 9, 14], "get_src": [0, 9, 14], "us": [0, 3, 5, 6, 8, 9, 11, 12, 14], "rename_from": [0, 9, 14], "printin": [0, 9, 11, 12, 14], "riscv": [0, 2, 5, 7, 8, 9, 11, 13, 14], "call": [0, 1, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14], "jump": [0, 2, 10, 11, 12, 13, 14], "conditional_jump": [0, 10, 13, 14], "add": [0, 1, 2, 6, 7, 8, 10, 13, 14], "mul": [0, 10, 13, 14], "div": [0, 10, 13, 14], "rem": [0, 10, 13, 14], "sub": [0, 10, 13, 14], "land": [0, 10, 13, 14], "lor": [0, 10, 13, 14], "xor": [0, 10, 13, 14], "li": [0, 10, 13, 14], "mv": [0, 10, 13, 14], "ld": [0, 10, 13, 14], "sd": [0, 10, 13, 14], "statement": [0, 2, 9, 12, 13, 14], "regset_to_str": [0, 11, 13, 14], "substitut": [0, 11, 12, 14], "with_arg": [0, 11, 12, 14], "comment": [0, 2, 7, 11, 13, 14], "label": [0, 2, 5, 7, 9, 10, 11, 12, 13, 14], "name": [0, 2, 5, 6, 7, 8, 9, 11, 14], "instruct": [0, 1, 2, 7, 10, 11, 12, 13, 14], "ins": [0, 11, 14], "is_read_onli": [0, 11, 12, 14], "arg": [0, 11, 12, 14], "instru3a": [0, 2, 7, 10, 11, 13, 14], "absolutejump": [0, 2, 7, 10, 11, 12, 13, 14], "target": [0, 2, 11, 12, 14], "conditionaljump": [0, 7, 11, 12, 13, 14], "cond": [0, 10, 11, 12, 14], "op1": [0, 10, 11, 12, 14], "op2": [0, 10, 11, 12, 14], "termin": [0, 2, 13, 14], "return": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14], "branchingtermin": [0, 2, 12, 13, 14], "label_then": [0, 12, 14], "label_els": [0, 12, 14], "jump2termin": [0, 12, 13, 14], "thi": [1, 2, 3, 5, 8, 10, 11, 12], "file": [1, 5, 7, 8], "base": [1, 2, 4, 5, 6, 7, 8, 9, 11, 12], "class": [1, 2, 5, 6, 7, 8, 9, 11, 12, 14], "na\u00efv": 1, "implement": [1, 14], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "object": [1, 2, 5, 6, 7, 8, 11, 14], "gener": [1, 6, 7, 8], "naiv": [1, 2, 14], "allinmem": 1, "smart": 1, "all": [1, 2, 6, 8, 14], "code": [1, 2, 7, 10, 14], "actual": [1, 6, 8], "data": [1, 8, 14], "locat": [1, 8, 11], "i": [1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12], "done": [1, 6], "two": [1, 6, 12], "step": 1, "first": [1, 6, 11, 12], "respons": 1, "map": [1, 8], "from": [1, 6, 8, 11, 12], "where": [1, 6, 11, 12], "thei": [1, 6], "should": [1, 6, 9, 11, 12, 14], "store": [1, 5], "memori": [1, 5, 8, 14], "Then": 1, "each": [1, 2, 6, 7, 9, 12, 14], "order": 1, "previous": [1, 3], "assign": 1, "possibli": 1, "some": [1, 5, 7, 14], "befor": [1, 14], "after": 1, "concret": 1, "list": [1, 2, 6, 7, 8, 9, 11, 12, 14], "origin": 1, "The": [1, 6, 7, 8, 9, 11, 12, 14], "iter": [1, 2, 7], "over": [1, 2, 7], "handl": 1, "transpar": 1, "none": [1, 2, 3, 6, 7, 8, 9, 11, 12], "old_instr": 1, "transform": 1, "an": [1, 2, 3, 6, 7, 11], "listcod": 1, "modifi": 1, "try": 1, "fail": [1, 6], "ar": [1, 5, 6, 8, 9, 11, 12, 14], "more": 1, "than": [1, 8], "correspond": [1, 9], "too": 1, "mani": 1, "itself": [2, 8], "its": [2, 3, 8, 9, 11, 14], "basic": [2, 14], "inst": 2, "made": 2, "three": [2, 12], "main": 2, "part": 2, "start": 2, "uniqu": [2, 5], "identifi": [2, 9], "bodi": 2, "exclud": 2, "branch": [2, 8, 11, 12], "repres": [2, 14], "final": 2, "point": [2, 14], "successor": [2, 12], "see": [2, 7], "document": 2, "further": 2, "explan": 2, "str": [2, 3, 5, 6, 7, 8, 11], "output": [2, 7, 9, 11, 12], "string": [2, 5, 8], "phi": [2, 14], "node": [2, 6, 9, 14], "nor": 2, "includ": 2, "except": [2, 4, 6], "consid": [2, 11], "term": 2, "set": [2, 3, 6, 11], "\u03c6": [2, 9], "given": [2, 3, 5, 7, 9, 11, 12], "remov": 2, "f": [2, 7], "For": [2, 7], "real": [2, 7], "assum": 2, "instr": 2, "complet": [2, 7], "control": 2, "flow": 2, "mainli": 2, "indic": 2, "entri": [2, 3], "exit": 2, "As": 2, "linear": [2, 7], "metadata": [2, 5], "about": [2, 14], "can": 2, "found": 2, "member": [2, 7], "variabl": [2, 5, 7, 9], "blk": 2, "new": [2, 5, 7, 8, 11, 12], "predecessor": [2, 6], "dest": 2, "dict": [2, 3, 6, 8, 9, 11, 12], "ani": [2, 6], "dictionari": [2, 3, 6], "associ": [2, 3, 9, 12], "contain": [2, 5, 7, 9], "one": [2, 8, 11, 12], "definit": 2, "appli": 2, "procedur": 2, "everywher": 2, "lambda": 2, "print": [2, 6, 7, 9, 11, 12], "filenam": [2, 3, 7], "df": [2, 3, 7], "view": [2, 7], "fals": [2, 7, 12], "util": [3, 5, 7, 11], "work": [3, 5, 14], "do": [3, 6], "hesit": 3, "look": 3, "get": [3, 8], "better": 3, "understand": [3, 14], "algorithm": 3, "comput": [3, 6, 8], "tabl": 3, "It": [3, 8, 11], "solv": 3, "equat": 3, "system": 3, "helper": 3, "dure": [3, 12], "ssa": [3, 9], "displai": 3, "graphic": 3, "render": 3, "tree": 3, "dom_graph": 3, "bool": [3, 6, 8, 12], "basenam": 3, "dt": 3, "which": [3, 5, 8, 11], "children": 3, "frontier": [3, 14], "well": 5, "common": 5, "differ": [5, 6, 8], "intermedi": 5, "represent": [5, 7], "div_by_zero": 5, "usual": 5, "indirectli": 5, "through": 5, "we": [5, 6, 8, 14], "ad": [5, 6], "pool": [5, 8], "stack": 5, "decreas": 5, "rel": 5, "int": [5, 6, 8], "current": 5, "python": [6, 10, 14], "orient": [6, 14], "non": [6, 11, 12, 14], "rais": 6, "self": 6, "loop": 6, "regroup": 6, "similar": 6, "between": 6, "direct": 6, "onli": [6, 11], "how": 6, "delet": 6, "vertex": 6, "undirect": 6, "If": 6, "kei": [6, 8, 11, 12], "empti": 6, "valu": [6, 7, 8, 11, 12], "otherwis": [6, 11], "noth": 6, "ha": [6, 8], "root": 6, "depth": 6, "search": [6, 14], "v1": 6, "v2": 6, "true": [6, 8, 11, 12], "path": [6, 7], "connect": 6, "compon": 6, "being": 6, "vetic": 6, "breadth": 6, "static": 6, "method": [6, 8], "appear": [6, 11, 12, 14], "twice": 6, "dictionnari": [6, 9], "tupl": 6, "pair": 6, "c": [6, 10], "g": 6, "adjac": 6, "unlimit": 6, "number": [6, 8], "integ": [6, 7, 8], "0": [6, 8], "1": 6, "k": 6, "avoidingnod": 6, "unspecifi": 6, "3": [6, 11, 14], "boolean": 6, "succeed": 6, "belong": 6, "continu": 6, "even": 6, "algo": 6, "v": [6, 14], "cap": [7, 10, 12], "codegener": [7, 10], "api": [7, 10], "program": 7, "repeatedli": 7, "codegen": 7, "visitor": 7, "build": [7, 8, 12], "meta": 7, "inform": 7, "instanc": 7, "debug": 7, "purpos": [7, 8], "allow": [7, 8, 14], "also": [7, 8], "relev": 7, "reg": 7, "newlin": 7, "expand": 7, "text": 7, "subclass": 8, "address": [8, 11, 14], "constant": 8, "yet": 8, "shortcut": 8, "optyp": 8, "e": 8, "comparison": 8, "condjump": 8, "exampl": 8, "usag": 8, "beq": [8, 10], "equal": 8, "minicpars": [8, 10], "lt": 8, "lower": 8, "constructor": 8, "argument": [8, 14], "shall": 8, "all_op": 8, "oper": 8, "gt": 8, "opdict": 8, "opposit": 8, "either": 8, "place": 8, "physic": 8, "cours": 8, "a2": 8, "a3": 8, "a4": 8, "a5": 8, "a6": 8, "a7": 8, "s1": 8, "s2": 8, "s3": 8, "s4": 8, "s5": 8, "s6": 8, "s7": 8, "s8": 8, "s9": 8, "s10": 8, "s11": 8, "t0": 8, "t1": 8, "t2": 8, "t3": 8, "t4": 8, "t5": 8, "t6": 8, "frame": 8, "pointer": 8, "save": 8, "usabl": 8, "basereg": 8, "val": 8, "been": [8, 11, 12], "later": 8, "manag": 8, "give": [8, 14], "must": 8, "other": [8, 11], "typic": 8, "type": [8, 12], "enforc": 8, "check": 8, "inde": 8, "under": 9, "form": 9, "temp_x": 9, "temp_0": 9, "temp_n": 9, "These": [9, 14], "particular": 9, "kind": [9, 11, 12, 14], "expect": 9, "field": 9, "b": 9, "_phi": 9, "reli": 9, "preced": 9, "temp_i": 9, "previou": 9, "stream": [9, 11, 12], "never": [9, 11, 12], "mif08": [10, 12], "uncondit": 10, "wrapper": 10, "around": 10, "bge": 10, "bgt": 10, "like": 10, "eq": 10, "dr": 10, "sr1": 10, "sr2orimm7": 10, "And": 10, "cannot": 10, "due": 10, "Or": 10, "imm7": 10, "sr": 10, "mem": 10, "asm": 11, "inherit": 11, "In": 11, "turn": 11, "regular": 11, "registerset": 11, "pretti": 11, "written": 11, "read": 11, "subst": [11, 12], "tstatement": 11, "clone": [11, 12], "new_arg": [11, 12], "have": [11, 12, 14], "both": [11, 12], "destin": [11, 12], "take": [11, 12, 14], "absolut": 11, "specif": 11, "j": [11, 12], "librari": 12, "end": [12, 14], "There": 12, "anoth": 12, "unlik": 12, "wa": 12, "specifi": 12, "mark": 12, "construct": 12, "extract": 12, "chunk": 12, "second": 12, "alia": 12, "next_label": 12, "potenti": 12, "lib": [13, 14], "packag": 13, "submodul": 13, "modul": [13, 14], "content": 13, "risc": 14, "page": 14, "variou": 14, "folder": 14, "you": 14, "edit": 14, "them": 14, "assembli": 14, "won": 14, "creat": 14, "directli": 14, "veri": 14, "often": 14, "instead": 14, "easili": 14, "standard": 14, "pseudo": 14, "At": 14, "need": 14, "those": 14, "present": 14, "model": 14, "lab": 14, "4a": 14, "translat": 14, "make": 14, "special": 14, "index": 14}, "objects": {"": [[0, 0, 0, "-", "Lib"]], "Lib": [[1, 0, 0, "-", "Allocator"], [2, 0, 0, "-", "CFG"], [3, 0, 0, "-", "Dominators"], [4, 0, 0, "-", "Errors"], [5, 0, 0, "-", "FunctionData"], [6, 0, 0, "-", "Graphes"], [7, 0, 0, "-", "LinearCode"], [8, 0, 0, "-", "Operands"], [9, 0, 0, "-", "PhiNode"], [10, 0, 0, "-", "RiscV"], [11, 0, 0, "-", "Statement"], [12, 0, 0, "-", "Terminator"]], "Lib.Allocator": [[1, 1, 1, "", "Allocator"], [1, 1, 1, "", "NaiveAllocator"]], "Lib.Allocator.Allocator": [[1, 2, 1, "", "prepare"], [1, 2, 1, "", "replace"], [1, 2, 1, "", "rewriteCode"]], "Lib.Allocator.NaiveAllocator": [[1, 2, 1, "", "prepare"], [1, 2, 1, "", "replace"]], "Lib.CFG": [[2, 1, 1, "", "Block"], [2, 1, 1, "", "CFG"]], "Lib.CFG.Block": [[2, 2, 1, "", "add_instruction"], [2, 2, 1, "", "add_phi"], [2, 2, 1, "", "get_all_statements"], [2, 2, 1, "", "get_body"], [2, 2, 1, "", "get_body_and_terminator"], [2, 2, 1, "", "get_in"], [2, 2, 1, "", "get_label"], [2, 2, 1, "", "get_phis"], [2, 2, 1, "", "get_terminator"], [2, 2, 1, "", "iter_statements"], [2, 2, 1, "", "remove_all_phis"], [2, 2, 1, "", "set_phis"], [2, 2, 1, "", "set_terminator"], [2, 2, 1, "", "to_dot"]], "Lib.CFG.CFG": [[2, 2, 1, "", "add_block"], [2, 2, 1, "", "add_edge"], [2, 3, 1, "", "fdata"], [2, 2, 1, "", "gather_defs"], [2, 2, 1, "", "get_block"], [2, 2, 1, "", "get_blocks"], [2, 2, 1, "", "get_end"], [2, 2, 1, "", "get_entries"], [2, 2, 1, "", "get_start"], [2, 2, 1, "", "iter_statements"], [2, 2, 1, "", "linearize_naive"], [2, 2, 1, "", "out_blocks"], [2, 2, 1, "", "print_code"], [2, 2, 1, "", "print_dot"], [2, 2, 1, "", "remove_edge"], [2, 2, 1, "", "set_start"]], "Lib.Dominators": [[3, 4, 1, "", "computeDF"], [3, 4, 1, "", "computeDT"], [3, 4, 1, "", "computeDom"], [3, 4, 1, "", "printDT"]], "Lib.Errors": [[4, 5, 1, "", "AllocationError"], [4, 5, 1, "", "MiniCInternalError"], [4, 5, 1, "", "MiniCRuntimeError"], [4, 5, 1, "", "MiniCTypeError"], [4, 5, 1, "", "MiniCUnsupportedError"]], "Lib.FunctionData": [[5, 1, 1, "", "FunctionData"]], "Lib.FunctionData.FunctionData": [[5, 2, 1, "", "fresh_label"], [5, 2, 1, "", "fresh_offset"], [5, 2, 1, "", "fresh_tmp"], [5, 2, 1, "", "get_label_div_by_zero"], [5, 2, 1, "", "get_name"], [5, 2, 1, "", "get_offset"]], "Lib.Graphes": [[6, 1, 1, "", "DiGraph"], [6, 1, 1, "", "GeneralGraph"], [6, 1, 1, "", "Graph"], [6, 5, 1, "", "GraphError"]], "Lib.Graphes.DiGraph": [[6, 2, 1, "", "add_edge"], [6, 2, 1, "", "delete_edge"], [6, 2, 1, "", "delete_vertex"], [6, 2, 1, "", "edges"], [6, 2, 1, "", "neighbourhoods"], [6, 2, 1, "", "pred"], [6, 2, 1, "", "print_dot"]], "Lib.Graphes.GeneralGraph": [[6, 2, 1, "", "add_vertex"], [6, 2, 1, "", "bfs_traversal"], [6, 2, 1, "", "connected_components"], [6, 2, 1, "", "dfs_traversal"], [6, 2, 1, "", "edges"], [6, 3, 1, "", "graph_dict"], [6, 2, 1, "", "is_reachable_from"], [6, 2, 1, "", "vertices"]], "Lib.Graphes.Graph": [[6, 2, 1, "", "add_edge"], [6, 2, 1, "", "color"], [6, 2, 1, "", "color_with_k_colors"], [6, 2, 1, "", "delete_edge"], [6, 2, 1, "", "delete_vertex"], [6, 2, 1, "", "edges"], [6, 2, 1, "", "print_dot"]], "Lib.Graphes.GraphError": [[6, 3, 1, "", "message"]], "Lib.LinearCode": [[7, 1, 1, "", "LinearCode"]], "Lib.LinearCode.LinearCode": [[7, 2, 1, "", "add_comment"], [7, 2, 1, "", "add_instruction"], [7, 2, 1, "", "add_instruction_PRINTLN_INT"], [7, 2, 1, "", "add_label"], [7, 3, 1, "", "fdata"], [7, 2, 1, "", "get_instructions"], [7, 2, 1, "", "iter_statements"], [7, 2, 1, "", "print_code"], [7, 2, 1, "", "print_dot"]], "Lib.Operands": [[8, 6, 1, "", "A"], [8, 6, 1, "", "A0"], [8, 6, 1, "", "A1"], [8, 1, 1, "", "Condition"], [8, 1, 1, "", "DataLocation"], [8, 6, 1, "", "FP"], [8, 1, 1, "", "Function"], [8, 6, 1, "", "GP"], [8, 6, 1, "", "GP_REGS"], [8, 1, 1, "", "Immediate"], [8, 1, 1, "", "Offset"], [8, 1, 1, "", "Operand"], [8, 6, 1, "", "RA"], [8, 1, 1, "", "Register"], [8, 1, 1, "", "Renamer"], [8, 6, 1, "", "S"], [8, 6, 1, "", "SP"], [8, 6, 1, "", "T"], [8, 6, 1, "", "TP"], [8, 1, 1, "", "Temporary"], [8, 1, 1, "", "TemporaryPool"], [8, 6, 1, "", "ZERO"]], "Lib.Operands.Condition": [[8, 2, 1, "", "negate"]], "Lib.Operands.Offset": [[8, 2, 1, "", "get_offset"]], "Lib.Operands.Renamer": [[8, 2, 1, "", "copy"], [8, 2, 1, "", "defined"], [8, 2, 1, "", "fresh"], [8, 2, 1, "", "replace"]], "Lib.Operands.Temporary": [[8, 2, 1, "", "get_alloced_loc"]], "Lib.Operands.TemporaryPool": [[8, 2, 1, "", "add_tmp"], [8, 2, 1, "", "fresh_tmp"], [8, 2, 1, "", "get_all_temps"], [8, 2, 1, "", "get_alloced_loc"], [8, 2, 1, "", "set_temp_allocation"]], "Lib.PhiNode": [[9, 1, 1, "", "PhiNode"]], "Lib.PhiNode.PhiNode": [[9, 2, 1, "", "defined"], [9, 2, 1, "", "get_srcs"], [9, 2, 1, "", "printIns"], [9, 2, 1, "", "rename"], [9, 2, 1, "", "rename_from"], [9, 3, 1, "", "srcs"], [9, 2, 1, "", "used"], [9, 3, 1, "", "var"]], "Lib.RiscV": [[10, 4, 1, "", "add"], [10, 4, 1, "", "call"], [10, 4, 1, "", "conditional_jump"], [10, 4, 1, "", "div"], [10, 4, 1, "", "jump"], [10, 4, 1, "", "land"], [10, 4, 1, "", "ld"], [10, 4, 1, "", "li"], [10, 4, 1, "", "lor"], [10, 4, 1, "", "mul"], [10, 4, 1, "", "mv"], [10, 4, 1, "", "rem"], [10, 4, 1, "", "sd"], [10, 4, 1, "", "sub"], [10, 4, 1, "", "xor"]], "Lib.Statement": [[11, 1, 1, "", "AbsoluteJump"], [11, 1, 1, "", "Comment"], [11, 1, 1, "", "ConditionalJump"], [11, 1, 1, "", "Instru3A"], [11, 1, 1, "", "Instruction"], [11, 1, 1, "", "Label"], [11, 1, 1, "", "Statement"], [11, 4, 1, "", "regset_to_string"]], "Lib.Statement.AbsoluteJump": [[11, 2, 1, "", "args"], [11, 3, 1, "", "ins"], [11, 3, 1, "", "label"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "targets"], [11, 2, 1, "", "with_args"]], "Lib.Statement.Comment": [[11, 3, 1, "", "comment"], [11, 2, 1, "", "printIns"]], "Lib.Statement.ConditionalJump": [[11, 2, 1, "", "args"], [11, 3, 1, "", "cond"], [11, 3, 1, "", "label"], [11, 3, 1, "", "op1"], [11, 3, 1, "", "op2"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "with_args"]], "Lib.Statement.Instru3A": [[11, 2, 1, "", "args"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "with_args"]], "Lib.Statement.Instruction": [[11, 2, 1, "", "args"], [11, 2, 1, "", "defined"], [11, 3, 1, "", "ins"], [11, 2, 1, "", "is_read_only"], [11, 2, 1, "", "printIns"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "used"]], "Lib.Statement.Label": [[11, 3, 1, "", "name"], [11, 2, 1, "", "printIns"]], "Lib.Statement.Statement": [[11, 2, 1, "", "defined"], [11, 2, 1, "", "printIns"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "used"], [11, 2, 1, "", "with_args"]], "Lib.Terminator": [[12, 1, 1, "", "BranchingTerminator"], [12, 1, 1, "", "Return"], [12, 6, 1, "", "Terminator"], [12, 4, 1, "", "jump2terminator"]], "Lib.Terminator.BranchingTerminator": [[12, 2, 1, "", "args"], [12, 3, 1, "", "cond"], [12, 3, 1, "", "label_else"], [12, 3, 1, "", "label_then"], [12, 3, 1, "", "op1"], [12, 3, 1, "", "op2"], [12, 2, 1, "", "rename"], [12, 2, 1, "", "substitute"], [12, 2, 1, "", "targets"], [12, 2, 1, "", "with_args"]], "Lib.Terminator.Return": [[12, 2, 1, "", "args"], [12, 2, 1, "", "is_read_only"], [12, 2, 1, "", "printIns"], [12, 2, 1, "", "rename"], [12, 2, 1, "", "substitute"], [12, 2, 1, "", "targets"], [12, 2, 1, "", "with_args"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function", "5": "py:exception", "6": "py:data"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"], "5": ["py", "exception", "Python exception"], "6": ["py", "data", "Python data"]}, "titleterms": {"lib": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "packag": 0, "submodul": 0, "modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "content": [0, 14], "alloc": [1, 14], "cfg": 2, "domin": 3, "error": 4, "functiondata": 5, "graph": [6, 14], "linearcod": 7, "operand": 8, "phinod": 9, "riscv": 10, "statement": 11, "termin": 12, "minic": [13, 14], "welcom": 14, "": 14, "document": 14, "base": 14, "librari": 14, "linear": 14, "intermedi": 14, "represent": 14, "temporari": 14, "control": 14, "flow": 14, "ssa": 14, "form": 14, "indic": 14, "tabl": 14}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Lib package": [[0, "lib-package"]], "Submodules": [[0, "submodules"]], "Module contents": [[0, "module-Lib"]], "Lib.Allocator module": [[1, "module-Lib.Allocator"]], "Lib.CFG module": [[2, "module-Lib.CFG"]], "Lib.Dominators module": [[3, "module-Lib.Dominators"]], "Lib.Errors module": [[4, "module-Lib.Errors"]], "Lib.FunctionData module": [[5, "module-Lib.FunctionData"]], "Lib.Graphes module": [[6, "module-Lib.Graphes"]], "Lib.LinearCode module": [[7, "module-Lib.LinearCode"]], "Lib.Operands module": [[8, "module-Lib.Operands"]], "Lib.PhiNode module": [[9, "module-Lib.PhiNode"]], "Lib.RiscV module": [[10, "module-Lib.RiscV"]], "Lib.Statement module": [[11, "module-Lib.Statement"]], "Lib.Terminator module": [[12, "module-Lib.Terminator"]], "MiniC": [[13, "minic"]], "Welcome to MiniC\u2019s documentation!": [[14, "welcome-to-minic-s-documentation"]], "Contents:": [[14, null]], "Base library": [[14, "base-library"]], "Linear Intermediate representation": [[14, "linear-intermediate-representation"]], "Temporary allocation": [[14, "temporary-allocation"]], "Control Flow Graph Intermediate representation": [[14, "control-flow-graph-intermediate-representation"]], "SSA form": [[14, "ssa-form"]], "Indices and tables": [[14, "indices-and-tables"]]}, "indexentries": {"lib": [[0, "module-Lib"]], "module": [[0, "module-Lib"], [1, "module-Lib.Allocator"], [2, "module-Lib.CFG"], [3, "module-Lib.Dominators"], [4, "module-Lib.Errors"], [5, "module-Lib.FunctionData"], [6, "module-Lib.Graphes"], [7, "module-Lib.LinearCode"], [8, "module-Lib.Operands"], [9, "module-Lib.PhiNode"], [10, "module-Lib.RiscV"], [11, "module-Lib.Statement"], [12, "module-Lib.Terminator"]], "allocator (class in lib.allocator)": [[1, "Lib.Allocator.Allocator"]], "lib.allocator": [[1, "module-Lib.Allocator"]], "naiveallocator (class in lib.allocator)": [[1, "Lib.Allocator.NaiveAllocator"]], "prepare() (lib.allocator.allocator method)": [[1, "Lib.Allocator.Allocator.prepare"]], "prepare() (lib.allocator.naiveallocator method)": [[1, "Lib.Allocator.NaiveAllocator.prepare"]], "replace() (lib.allocator.allocator method)": [[1, "Lib.Allocator.Allocator.replace"]], "replace() (lib.allocator.naiveallocator method)": [[1, "Lib.Allocator.NaiveAllocator.replace"]], "rewritecode() (lib.allocator.allocator method)": [[1, "Lib.Allocator.Allocator.rewriteCode"]], "block (class in lib.cfg)": [[2, "Lib.CFG.Block"]], "cfg (class in lib.cfg)": [[2, "Lib.CFG.CFG"]], "lib.cfg": [[2, "module-Lib.CFG"]], "add_block() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.add_block"]], "add_edge() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.add_edge"]], "add_instruction() (lib.cfg.block method)": [[2, "Lib.CFG.Block.add_instruction"]], "add_phi() (lib.cfg.block method)": [[2, "Lib.CFG.Block.add_phi"]], "fdata (lib.cfg.cfg attribute)": [[2, "Lib.CFG.CFG.fdata"]], "gather_defs() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.gather_defs"]], "get_all_statements() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_all_statements"]], "get_block() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_block"]], "get_blocks() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_blocks"]], "get_body() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_body"]], "get_body_and_terminator() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_body_and_terminator"]], "get_end() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_end"]], "get_entries() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_entries"]], "get_in() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_in"]], "get_label() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_label"]], "get_phis() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_phis"]], "get_start() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_start"]], "get_terminator() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_terminator"]], "iter_statements() (lib.cfg.block method)": [[2, "Lib.CFG.Block.iter_statements"]], "iter_statements() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.iter_statements"]], "linearize_naive() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.linearize_naive"]], "out_blocks() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.out_blocks"]], "print_code() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.print_code"]], "print_dot() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.print_dot"]], "remove_all_phis() (lib.cfg.block method)": [[2, "Lib.CFG.Block.remove_all_phis"]], "remove_edge() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.remove_edge"]], "set_phis() (lib.cfg.block method)": [[2, "Lib.CFG.Block.set_phis"]], "set_start() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.set_start"]], "set_terminator() (lib.cfg.block method)": [[2, "Lib.CFG.Block.set_terminator"]], "to_dot() (lib.cfg.block method)": [[2, "Lib.CFG.Block.to_dot"]], "lib.dominators": [[3, "module-Lib.Dominators"]], "computedf() (in module lib.dominators)": [[3, "Lib.Dominators.computeDF"]], "computedt() (in module lib.dominators)": [[3, "Lib.Dominators.computeDT"]], "computedom() (in module lib.dominators)": [[3, "Lib.Dominators.computeDom"]], "printdt() (in module lib.dominators)": [[3, "Lib.Dominators.printDT"]], "allocationerror": [[4, "Lib.Errors.AllocationError"]], "lib.errors": [[4, "module-Lib.Errors"]], "minicinternalerror": [[4, "Lib.Errors.MiniCInternalError"]], "minicruntimeerror": [[4, "Lib.Errors.MiniCRuntimeError"]], "minictypeerror": [[4, "Lib.Errors.MiniCTypeError"]], "minicunsupportederror": [[4, "Lib.Errors.MiniCUnsupportedError"]], "functiondata (class in lib.functiondata)": [[5, "Lib.FunctionData.FunctionData"]], "lib.functiondata": [[5, "module-Lib.FunctionData"]], "fresh_label() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.fresh_label"]], "fresh_offset() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.fresh_offset"]], "fresh_tmp() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.fresh_tmp"]], "get_label_div_by_zero() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.get_label_div_by_zero"]], "get_name() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.get_name"]], "get_offset() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.get_offset"]], "digraph (class in lib.graphes)": [[6, "Lib.Graphes.DiGraph"]], "generalgraph (class in lib.graphes)": [[6, "Lib.Graphes.GeneralGraph"]], "graph (class in lib.graphes)": [[6, "Lib.Graphes.Graph"]], "grapherror": [[6, "Lib.Graphes.GraphError"]], "lib.graphes": [[6, "module-Lib.Graphes"]], "add_edge() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.add_edge"]], "add_edge() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.add_edge"]], "add_vertex() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.add_vertex"]], "bfs_traversal() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.bfs_traversal"]], "color() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.color"]], "color_with_k_colors() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.color_with_k_colors"]], "connected_components() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.connected_components"]], "delete_edge() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.delete_edge"]], "delete_edge() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.delete_edge"]], "delete_vertex() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.delete_vertex"]], "delete_vertex() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.delete_vertex"]], "dfs_traversal() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.dfs_traversal"]], "edges() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.edges"]], "edges() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.edges"]], "edges() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.edges"]], "graph_dict (lib.graphes.generalgraph attribute)": [[6, "Lib.Graphes.GeneralGraph.graph_dict"]], "is_reachable_from() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.is_reachable_from"]], "message (lib.graphes.grapherror attribute)": [[6, "Lib.Graphes.GraphError.message"]], "neighbourhoods() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.neighbourhoods"]], "pred() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.pred"]], "print_dot() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.print_dot"]], "print_dot() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.print_dot"]], "vertices() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.vertices"]], "lib.linearcode": [[7, "module-Lib.LinearCode"]], "linearcode (class in lib.linearcode)": [[7, "Lib.LinearCode.LinearCode"]], "add_comment() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_comment"]], "add_instruction() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_instruction"]], "add_instruction_println_int() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_instruction_PRINTLN_INT"]], "add_label() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_label"]], "fdata (lib.linearcode.linearcode attribute)": [[7, "Lib.LinearCode.LinearCode.fdata"]], "get_instructions() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.get_instructions"]], "iter_statements() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.iter_statements"]], "print_code() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.print_code"]], "print_dot() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.print_dot"]], "a (in module lib.operands)": [[8, "Lib.Operands.A"]], "a0 (in module lib.operands)": [[8, "Lib.Operands.A0"]], "a1 (in module lib.operands)": [[8, "Lib.Operands.A1"]], "condition (class in lib.operands)": [[8, "Lib.Operands.Condition"]], "datalocation (class in lib.operands)": [[8, "Lib.Operands.DataLocation"]], "fp (in module lib.operands)": [[8, "Lib.Operands.FP"]], "function (class in lib.operands)": [[8, "Lib.Operands.Function"]], "gp (in module lib.operands)": [[8, "Lib.Operands.GP"]], "gp_regs (in module lib.operands)": [[8, "Lib.Operands.GP_REGS"]], "immediate (class in lib.operands)": [[8, "Lib.Operands.Immediate"]], "lib.operands": [[8, "module-Lib.Operands"]], "offset (class in lib.operands)": [[8, "Lib.Operands.Offset"]], "operand (class in lib.operands)": [[8, "Lib.Operands.Operand"]], "ra (in module lib.operands)": [[8, "Lib.Operands.RA"]], "register (class in lib.operands)": [[8, "Lib.Operands.Register"]], "renamer (class in lib.operands)": [[8, "Lib.Operands.Renamer"]], "s (in module lib.operands)": [[8, "Lib.Operands.S"]], "sp (in module lib.operands)": [[8, "Lib.Operands.SP"]], "t (in module lib.operands)": [[8, "Lib.Operands.T"]], "tp (in module lib.operands)": [[8, "Lib.Operands.TP"]], "temporary (class in lib.operands)": [[8, "Lib.Operands.Temporary"]], "temporarypool (class in lib.operands)": [[8, "Lib.Operands.TemporaryPool"]], "zero (in module lib.operands)": [[8, "Lib.Operands.ZERO"]], "add_tmp() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.add_tmp"]], "copy() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.copy"]], "defined() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.defined"]], "fresh() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.fresh"]], "fresh_tmp() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.fresh_tmp"]], "get_all_temps() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.get_all_temps"]], "get_alloced_loc() (lib.operands.temporary method)": [[8, "Lib.Operands.Temporary.get_alloced_loc"]], "get_alloced_loc() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.get_alloced_loc"]], "get_offset() (lib.operands.offset method)": [[8, "Lib.Operands.Offset.get_offset"]], "negate() (lib.operands.condition method)": [[8, "Lib.Operands.Condition.negate"]], "replace() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.replace"]], "set_temp_allocation() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.set_temp_allocation"]], "lib.phinode": [[9, "module-Lib.PhiNode"]], "phinode (class in lib.phinode)": [[9, "Lib.PhiNode.PhiNode"]], "defined() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.defined"]], "get_srcs() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.get_srcs"]], "printins() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.printIns"]], "rename() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.rename"]], "rename_from() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.rename_from"]], "srcs (lib.phinode.phinode attribute)": [[9, "Lib.PhiNode.PhiNode.srcs"]], "used() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.used"]], "var (lib.phinode.phinode attribute)": [[9, "Lib.PhiNode.PhiNode.var"]], "lib.riscv": [[10, "module-Lib.RiscV"]], "add() (in module lib.riscv)": [[10, "Lib.RiscV.add"]], "call() (in module lib.riscv)": [[10, "Lib.RiscV.call"]], "conditional_jump() (in module lib.riscv)": [[10, "Lib.RiscV.conditional_jump"]], "div() (in module lib.riscv)": [[10, "Lib.RiscV.div"]], "jump() (in module lib.riscv)": [[10, "Lib.RiscV.jump"]], "land() (in module lib.riscv)": [[10, "Lib.RiscV.land"]], "ld() (in module lib.riscv)": [[10, "Lib.RiscV.ld"]], "li() (in module lib.riscv)": [[10, "Lib.RiscV.li"]], "lor() (in module lib.riscv)": [[10, "Lib.RiscV.lor"]], "mul() (in module lib.riscv)": [[10, "Lib.RiscV.mul"]], "mv() (in module lib.riscv)": [[10, "Lib.RiscV.mv"]], "rem() (in module lib.riscv)": [[10, "Lib.RiscV.rem"]], "sd() (in module lib.riscv)": [[10, "Lib.RiscV.sd"]], "sub() (in module lib.riscv)": [[10, "Lib.RiscV.sub"]], "xor() (in module lib.riscv)": [[10, "Lib.RiscV.xor"]], "absolutejump (class in lib.statement)": [[11, "Lib.Statement.AbsoluteJump"]], "comment (class in lib.statement)": [[11, "Lib.Statement.Comment"]], "conditionaljump (class in lib.statement)": [[11, "Lib.Statement.ConditionalJump"]], "instru3a (class in lib.statement)": [[11, "Lib.Statement.Instru3A"]], "instruction (class in lib.statement)": [[11, "Lib.Statement.Instruction"]], "label (class in lib.statement)": [[11, "Lib.Statement.Label"]], "lib.statement": [[11, "module-Lib.Statement"]], "statement (class in lib.statement)": [[11, "Lib.Statement.Statement"]], "args() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.args"]], "args() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.args"]], "args() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.args"]], "args() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.args"]], "comment (lib.statement.comment attribute)": [[11, "Lib.Statement.Comment.comment"]], "cond (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.cond"]], "defined() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.defined"]], "defined() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.defined"]], "ins (lib.statement.absolutejump attribute)": [[11, "Lib.Statement.AbsoluteJump.ins"]], "ins (lib.statement.instruction attribute)": [[11, "Lib.Statement.Instruction.ins"]], "is_read_only() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.is_read_only"]], "label (lib.statement.absolutejump attribute)": [[11, "Lib.Statement.AbsoluteJump.label"]], "label (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.label"]], "name (lib.statement.label attribute)": [[11, "Lib.Statement.Label.name"]], "op1 (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.op1"]], "op2 (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.op2"]], "printins() (lib.statement.comment method)": [[11, "Lib.Statement.Comment.printIns"]], "printins() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.printIns"]], "printins() (lib.statement.label method)": [[11, "Lib.Statement.Label.printIns"]], "printins() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.printIns"]], "regset_to_string() (in module lib.statement)": [[11, "Lib.Statement.regset_to_string"]], "rename() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.rename"]], "rename() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.rename"]], "rename() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.rename"]], "rename() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.rename"]], "substitute() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.substitute"]], "substitute() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.substitute"]], "substitute() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.substitute"]], "substitute() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.substitute"]], "targets() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.targets"]], "used() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.used"]], "used() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.used"]], "with_args() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.with_args"]], "with_args() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.with_args"]], "with_args() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.with_args"]], "with_args() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.with_args"]], "branchingterminator (class in lib.terminator)": [[12, "Lib.Terminator.BranchingTerminator"]], "lib.terminator": [[12, "module-Lib.Terminator"]], "return (class in lib.terminator)": [[12, "Lib.Terminator.Return"]], "terminator (in module lib.terminator)": [[12, "Lib.Terminator.Terminator"]], "args() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.args"]], "args() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.args"]], "cond (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.cond"]], "is_read_only() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.is_read_only"]], "jump2terminator() (in module lib.terminator)": [[12, "Lib.Terminator.jump2terminator"]], "label_else (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.label_else"]], "label_then (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.label_then"]], "op1 (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.op1"]], "op2 (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.op2"]], "printins() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.printIns"]], "rename() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.rename"]], "rename() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.rename"]], "substitute() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.substitute"]], "substitute() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.substitute"]], "targets() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.targets"]], "targets() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.targets"]], "with_args() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.with_args"]], "with_args() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.with_args"]]}}) \ No newline at end of file +Search.setIndex({"docnames": ["api/Lib", "api/Lib.Allocator", "api/Lib.CFG", "api/Lib.Dominators", "api/Lib.Errors", "api/Lib.FunctionData", "api/Lib.Graphes", "api/Lib.LinearCode", "api/Lib.Operands", "api/Lib.PhiNode", "api/Lib.RiscV", "api/Lib.Statement", "api/Lib.Terminator", "api/modules", "index"], "filenames": ["api/Lib.rst", "api/Lib.Allocator.rst", "api/Lib.CFG.rst", "api/Lib.Dominators.rst", "api/Lib.Errors.rst", "api/Lib.FunctionData.rst", "api/Lib.Graphes.rst", "api/Lib.LinearCode.rst", "api/Lib.Operands.rst", "api/Lib.PhiNode.rst", "api/Lib.RiscV.rst", "api/Lib.Statement.rst", "api/Lib.Terminator.rst", "api/modules.rst", "index.rst"], "titles": ["Lib package", "Lib.Allocator module", "Lib.CFG module", "Lib.Dominators module", "Lib.Errors module", "Lib.FunctionData module", "Lib.Graphes module", "Lib.LinearCode module", "Lib.Operands module", "Lib.PhiNode module", "Lib.RiscV module", "Lib.Statement module", "Lib.Terminator module", "MiniC", "Welcome to MiniC\u2019s documentation!"], "terms": {"alloc": [0, 7, 8, 13], "prepar": [0, 1, 14], "replac": [0, 1, 2, 7, 8, 11, 12, 14], "rewritecod": [0, 1, 14], "naivealloc": [0, 1, 13, 14], "cfg": [0, 3, 9, 12, 13, 14], "block": [0, 2, 3, 9, 12, 13, 14], "to_dot": [0, 2, 14], "get_bodi": [0, 2, 14], "get_all_stat": [0, 2, 14], "get_body_and_termin": [0, 2, 14], "get_label": [0, 2, 14], "get_in": [0, 2, 14], "get_termin": [0, 2, 14], "set_termin": [0, 2, 14], "get_phi": [0, 2, 14], "add_phi": [0, 2, 14], "set_phi": [0, 2, 14], "remove_all_phi": [0, 2, 14], "iter_stat": [0, 1, 2, 7, 14], "add_instruct": [0, 2, 7, 14], "fdata": [0, 1, 2, 5, 7, 14], "get_start": [0, 2, 14], "set_start": [0, 2, 14], "get_end": [0, 2, 14], "add_block": [0, 2, 14], "get_block": [0, 2, 14], "get_entri": [0, 2, 14], "add_edg": [0, 2, 6, 14], "remove_edg": [0, 2, 14], "out_block": [0, 2, 14], "gather_def": [0, 2, 14], "linearize_na": [0, 2, 14], "print_cod": [0, 2, 7, 14], "print_dot": [0, 2, 6, 7, 14], "domin": [0, 13, 14], "computedom": [0, 3, 13, 14], "printdt": [0, 3, 13, 14], "computedt": [0, 3, 13, 14], "computedf": [0, 3, 13, 14], "error": [0, 13, 14], "minicruntimeerror": [0, 4, 13, 14], "minicinternalerror": [0, 4, 13, 14], "minicunsupportederror": [0, 4, 13, 14], "minictypeerror": [0, 4, 13, 14], "allocationerror": [0, 4, 13, 14], "functiondata": [0, 1, 2, 7, 13, 14], "get_nam": [0, 5, 14], "fresh_tmp": [0, 5, 8, 14], "fresh_offset": [0, 5, 14], "get_offset": [0, 5, 8, 14], "fresh_label": [0, 5, 14], "get_label_div_by_zero": [0, 5, 14], "graph": [0, 2, 3, 7, 13], "grapherror": [0, 6, 13, 14], "messag": [0, 6, 14], "generalgraph": [0, 6, 13, 14], "graph_dict": [0, 6, 14], "vertic": [0, 6, 14], "add_vertex": [0, 6, 14], "edg": [0, 2, 6, 14], "dfs_travers": [0, 6, 14], "is_reachable_from": [0, 6, 14], "connected_compon": [0, 6, 14], "bfs_travers": [0, 6, 14], "delete_vertex": [0, 6, 14], "delete_edg": [0, 6, 14], "color": [0, 6, 14], "color_with_k_color": [0, 6, 14], "digraph": [0, 6, 13, 14], "pred": [0, 6, 14], "neighbourhood": [0, 6, 14], "linearcod": [0, 1, 5, 12, 13, 14], "get_instruct": [0, 7, 14], "add_label": [0, 7, 14], "add_com": [0, 7, 14], "add_instruction_println_int": [0, 7, 14], "operand": [0, 1, 5, 9, 10, 11, 12, 13, 14], "condit": [0, 8, 10, 11, 12, 13, 14], "negat": [0, 8, 14], "function": [0, 2, 3, 5, 7, 8, 10, 11, 12, 13, 14], "dataloc": [0, 7, 8, 9, 13, 14], "regist": [0, 1, 8, 13, 14], "zero": [0, 8, 13, 14], "ra": [0, 8, 13, 14], "sp": [0, 8, 13, 14], "gp": [0, 8, 13, 14], "tp": [0, 8, 13, 14], "A": [0, 2, 6, 8, 9, 11, 12, 13, 14], "": [0, 7, 8, 13], "t": [0, 8, 13, 14], "a0": [0, 8, 13, 14], "a1": [0, 8, 13, 14], "fp": [0, 5, 8, 13, 14], "gp_reg": [0, 8, 13, 14], "offset": [0, 5, 8, 13, 14], "immedi": [0, 8, 10, 13, 14], "temporari": [0, 1, 5, 7, 8, 13], "get_alloced_loc": [0, 8, 14], "temporarypool": [0, 1, 5, 8, 13, 14], "get_all_temp": [0, 8, 14], "add_tmp": [0, 8, 14], "set_temp_alloc": [0, 1, 8, 14], "renam": [0, 8, 9, 11, 12, 13, 14], "fresh": [0, 5, 8, 9, 14], "defin": [0, 1, 5, 8, 9, 10, 11, 14], "copi": [0, 8, 14], "phinod": [0, 13, 14], "var": [0, 9, 14], "src": [0, 2, 9, 14], "get_src": [0, 9, 14], "us": [0, 3, 5, 6, 8, 9, 11, 12, 14], "rename_from": [0, 9, 14], "printin": [0, 9, 11, 12, 14], "riscv": [0, 2, 5, 7, 8, 9, 11, 13, 14], "call": [0, 1, 3, 6, 7, 8, 9, 10, 11, 12, 13, 14], "jump": [0, 2, 10, 11, 12, 13, 14], "conditional_jump": [0, 10, 13, 14], "add": [0, 1, 2, 6, 7, 8, 10, 13, 14], "mul": [0, 10, 13, 14], "div": [0, 10, 13, 14], "rem": [0, 10, 13, 14], "sub": [0, 10, 13, 14], "land": [0, 10, 13, 14], "lor": [0, 10, 13, 14], "xor": [0, 10, 13, 14], "li": [0, 10, 13, 14], "mv": [0, 10, 13, 14], "ld": [0, 10, 13, 14], "sd": [0, 10, 13, 14], "statement": [0, 2, 9, 12, 13, 14], "regset_to_str": [0, 11, 13, 14], "substitut": [0, 11, 12, 14], "with_arg": [0, 11, 12, 14], "comment": [0, 2, 7, 11, 13, 14], "label": [0, 2, 5, 7, 9, 10, 11, 12, 13, 14], "name": [0, 2, 5, 6, 7, 8, 9, 11, 14], "instruct": [0, 1, 2, 7, 10, 11, 12, 13, 14], "ins": [0, 11, 14], "is_read_onli": [0, 11, 12, 14], "arg": [0, 11, 12, 14], "instru3a": [0, 2, 7, 10, 11, 13, 14], "absolutejump": [0, 2, 7, 10, 11, 12, 13, 14], "target": [0, 2, 11, 12, 14], "conditionaljump": [0, 7, 11, 12, 13, 14], "cond": [0, 10, 11, 12, 14], "op1": [0, 10, 11, 12, 14], "op2": [0, 10, 11, 12, 14], "termin": [0, 2, 13, 14], "return": [0, 1, 2, 3, 5, 6, 7, 8, 9, 11, 12, 13, 14], "branchingtermin": [0, 2, 12, 13, 14], "label_then": [0, 12, 14], "label_els": [0, 12, 14], "jump2termin": [0, 12, 13, 14], "thi": [1, 2, 3, 5, 8, 10, 11, 12], "file": [1, 5, 7, 8], "base": [1, 2, 4, 5, 6, 7, 8, 9, 11, 12], "class": [1, 2, 5, 6, 7, 8, 9, 11, 12, 14], "na\u00efv": 1, "implement": [1, 14], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14], "object": [1, 2, 5, 6, 7, 8, 11, 14], "gener": [1, 6, 7, 8], "naiv": [1, 2, 14], "allinmem": 1, "smart": 1, "all": [1, 2, 6, 8, 14], "code": [1, 2, 7, 10, 14], "actual": [1, 6, 8], "data": [1, 8, 14], "locat": [1, 8, 11], "i": [1, 2, 3, 5, 6, 7, 8, 9, 10, 11, 12], "done": [1, 6], "two": [1, 6, 12], "step": 1, "first": [1, 6, 11, 12], "respons": 1, "map": [1, 8], "from": [1, 6, 8, 11, 12], "where": [1, 6, 11, 12], "thei": [1, 6], "should": [1, 6, 9, 11, 12, 14], "store": [1, 5], "memori": [1, 5, 8, 14], "Then": 1, "each": [1, 2, 6, 7, 9, 12, 14], "order": 1, "previous": [1, 3], "assign": 1, "possibli": 1, "some": [1, 5, 7, 14], "befor": [1, 14], "after": 1, "concret": 1, "list": [1, 2, 6, 7, 8, 9, 11, 12, 14], "origin": 1, "The": [1, 6, 7, 8, 9, 11, 12, 14], "iter": [1, 2, 7], "over": [1, 2, 7], "handl": 1, "transpar": 1, "none": [1, 2, 3, 6, 7, 8, 9, 11, 12], "old_instr": 1, "transform": 1, "an": [1, 2, 3, 6, 7, 11], "listcod": 1, "modifi": 1, "try": 1, "fail": [1, 6], "ar": [1, 5, 6, 8, 9, 11, 12, 14], "more": 1, "than": [1, 8], "correspond": [1, 9], "too": 1, "mani": 1, "itself": [2, 8], "its": [2, 3, 8, 9, 11, 14], "basic": [2, 14], "inst": 2, "made": 2, "three": [2, 12], "main": 2, "part": 2, "start": 2, "uniqu": [2, 5], "identifi": [2, 9], "bodi": 2, "exclud": 2, "branch": [2, 8, 11, 12], "repres": [2, 14], "final": 2, "point": [2, 14], "successor": [2, 12], "see": [2, 7], "document": 2, "further": 2, "explan": 2, "str": [2, 3, 5, 6, 7, 8, 11], "output": [2, 7, 9, 11, 12], "string": [2, 5, 8], "phi": [2, 14], "node": [2, 6, 9, 14], "nor": 2, "includ": 2, "except": [2, 4, 6], "consid": [2, 11], "term": 2, "set": [2, 3, 6, 11], "\u03c6": [2, 9], "given": [2, 3, 5, 7, 9, 11, 12], "remov": 2, "f": [2, 7], "For": [2, 7], "real": [2, 7], "assum": 2, "instr": 2, "complet": [2, 7], "control": 2, "flow": 2, "mainli": 2, "indic": 2, "entri": [2, 3], "exit": 2, "As": 2, "linear": [2, 7], "metadata": [2, 5], "about": [2, 14], "can": 2, "found": 2, "member": [2, 7], "variabl": [2, 5, 7, 9], "blk": 2, "new": [2, 5, 7, 8, 11, 12], "predecessor": [2, 6, 9], "dest": 2, "dict": [2, 3, 6, 8, 9, 11, 12], "ani": [2, 6], "dictionari": [2, 3, 6], "associ": [2, 3, 9, 12], "contain": [2, 5, 7, 9], "one": [2, 8, 11, 12], "definit": 2, "appli": 2, "procedur": 2, "everywher": 2, "lambda": 2, "print": [2, 6, 7, 9, 11, 12], "filenam": [2, 3, 7], "df": [2, 3, 7], "view": [2, 7], "fals": [2, 7, 12], "util": [3, 5, 7, 11], "work": [3, 5, 14], "do": [3, 6], "hesit": 3, "look": 3, "get": [3, 8], "better": 3, "understand": [3, 14], "algorithm": 3, "comput": [3, 6, 8], "tabl": 3, "It": [3, 8, 11], "solv": 3, "equat": 3, "system": 3, "helper": 3, "dure": [3, 12], "ssa": [3, 9], "displai": 3, "graphic": 3, "render": 3, "tree": 3, "dom_graph": 3, "bool": [3, 6, 8, 12], "basenam": 3, "dt": 3, "which": [3, 5, 8, 11], "children": 3, "frontier": [3, 14], "well": 5, "common": 5, "differ": [5, 6, 8], "intermedi": 5, "represent": [5, 7], "div_by_zero": 5, "usual": 5, "indirectli": 5, "through": 5, "we": [5, 6, 8, 14], "ad": [5, 6], "pool": [5, 8], "stack": 5, "decreas": 5, "rel": 5, "int": [5, 6, 8], "current": 5, "python": [6, 10, 14], "orient": [6, 14], "non": [6, 11, 12, 14], "rais": 6, "self": 6, "loop": 6, "regroup": 6, "similar": 6, "between": 6, "direct": 6, "onli": [6, 11], "how": 6, "delet": 6, "vertex": 6, "undirect": 6, "If": 6, "kei": [6, 8, 11, 12], "empti": 6, "valu": [6, 7, 8, 11, 12], "otherwis": [6, 11], "noth": 6, "ha": [6, 8], "root": 6, "depth": 6, "search": [6, 14], "v1": 6, "v2": 6, "true": [6, 8, 11, 12], "path": [6, 7], "connect": 6, "compon": 6, "being": 6, "vetic": 6, "breadth": 6, "static": 6, "method": [6, 8], "appear": [6, 11, 12, 14], "twice": 6, "dictionnari": [6, 9], "tupl": 6, "pair": 6, "c": [6, 10], "g": 6, "adjac": 6, "unlimit": 6, "number": [6, 8], "integ": [6, 7, 8], "0": [6, 8], "1": 6, "k": 6, "avoidingnod": 6, "unspecifi": 6, "3": [6, 11, 14], "boolean": 6, "succeed": 6, "belong": 6, "continu": 6, "even": 6, "algo": 6, "v": [6, 14], "cap": [7, 10, 12], "codegener": [7, 10], "api": [7, 10], "program": 7, "repeatedli": 7, "codegen": 7, "visitor": 7, "build": [7, 8, 12], "meta": 7, "inform": 7, "instanc": 7, "debug": 7, "purpos": [7, 8], "allow": [7, 8, 14], "also": [7, 8], "relev": 7, "reg": 7, "newlin": 7, "expand": 7, "text": 7, "subclass": 8, "address": [8, 11, 14], "constant": 8, "yet": 8, "shortcut": 8, "optyp": 8, "e": 8, "comparison": 8, "condjump": 8, "exampl": 8, "usag": 8, "beq": [8, 10], "equal": 8, "minicpars": [8, 10], "lt": 8, "lower": 8, "constructor": 8, "argument": [8, 14], "shall": 8, "all_op": 8, "oper": 8, "gt": 8, "opdict": 8, "opposit": 8, "either": 8, "place": 8, "physic": 8, "cours": 8, "a2": 8, "a3": 8, "a4": 8, "a5": 8, "a6": 8, "a7": 8, "s1": 8, "s2": 8, "s3": 8, "s4": 8, "s5": 8, "s6": 8, "s7": 8, "s8": 8, "s9": 8, "s10": 8, "s11": 8, "t0": 8, "t1": 8, "t2": 8, "t3": 8, "t4": 8, "t5": 8, "t6": 8, "frame": 8, "pointer": 8, "save": 8, "usabl": 8, "basereg": 8, "val": 8, "been": [8, 11, 12], "later": 8, "manag": 8, "give": [8, 14], "must": 8, "other": [8, 11], "typic": 8, "type": [8, 12], "enforc": 8, "check": 8, "inde": 8, "under": 9, "form": 9, "temp_x": 9, "temp_0": 9, "temp_n": 9, "These": [9, 14], "particular": 9, "kind": [9, 11, 12, 14], "expect": 9, "field": 9, "b": 9, "_phi": 9, "link": 9, "temp_i": 9, "previou": 9, "stream": [9, 11, 12], "never": [9, 11, 12], "mif08": [10, 12], "uncondit": 10, "wrapper": 10, "around": 10, "bge": 10, "bgt": 10, "like": 10, "eq": 10, "dr": 10, "sr1": 10, "sr2orimm7": 10, "And": 10, "cannot": 10, "due": 10, "Or": 10, "imm7": 10, "sr": 10, "mem": 10, "asm": 11, "inherit": 11, "In": 11, "turn": 11, "regular": 11, "registerset": 11, "pretti": 11, "written": 11, "read": 11, "subst": [11, 12], "tstatement": 11, "clone": [11, 12], "new_arg": [11, 12], "have": [11, 12, 14], "both": [11, 12], "destin": [11, 12], "take": [11, 12, 14], "absolut": 11, "specif": 11, "j": [11, 12], "librari": 12, "end": [12, 14], "There": 12, "anoth": 12, "unlik": 12, "wa": 12, "specifi": 12, "mark": 12, "construct": 12, "extract": 12, "chunk": 12, "second": 12, "alia": 12, "next_label": 12, "potenti": 12, "lib": [13, 14], "packag": 13, "submodul": 13, "modul": [13, 14], "content": 13, "risc": 14, "page": 14, "variou": 14, "folder": 14, "you": 14, "edit": 14, "them": 14, "assembli": 14, "won": 14, "creat": 14, "directli": 14, "veri": 14, "often": 14, "instead": 14, "easili": 14, "standard": 14, "pseudo": 14, "At": 14, "need": 14, "those": 14, "present": 14, "model": 14, "lab": 14, "4a": 14, "translat": 14, "make": 14, "special": 14, "index": 14}, "objects": {"": [[0, 0, 0, "-", "Lib"]], "Lib": [[1, 0, 0, "-", "Allocator"], [2, 0, 0, "-", "CFG"], [3, 0, 0, "-", "Dominators"], [4, 0, 0, "-", "Errors"], [5, 0, 0, "-", "FunctionData"], [6, 0, 0, "-", "Graphes"], [7, 0, 0, "-", "LinearCode"], [8, 0, 0, "-", "Operands"], [9, 0, 0, "-", "PhiNode"], [10, 0, 0, "-", "RiscV"], [11, 0, 0, "-", "Statement"], [12, 0, 0, "-", "Terminator"]], "Lib.Allocator": [[1, 1, 1, "", "Allocator"], [1, 1, 1, "", "NaiveAllocator"]], "Lib.Allocator.Allocator": [[1, 2, 1, "", "prepare"], [1, 2, 1, "", "replace"], [1, 2, 1, "", "rewriteCode"]], "Lib.Allocator.NaiveAllocator": [[1, 2, 1, "", "prepare"], [1, 2, 1, "", "replace"]], "Lib.CFG": [[2, 1, 1, "", "Block"], [2, 1, 1, "", "CFG"]], "Lib.CFG.Block": [[2, 2, 1, "", "add_instruction"], [2, 2, 1, "", "add_phi"], [2, 2, 1, "", "get_all_statements"], [2, 2, 1, "", "get_body"], [2, 2, 1, "", "get_body_and_terminator"], [2, 2, 1, "", "get_in"], [2, 2, 1, "", "get_label"], [2, 2, 1, "", "get_phis"], [2, 2, 1, "", "get_terminator"], [2, 2, 1, "", "iter_statements"], [2, 2, 1, "", "remove_all_phis"], [2, 2, 1, "", "set_phis"], [2, 2, 1, "", "set_terminator"], [2, 2, 1, "", "to_dot"]], "Lib.CFG.CFG": [[2, 2, 1, "", "add_block"], [2, 2, 1, "", "add_edge"], [2, 3, 1, "", "fdata"], [2, 2, 1, "", "gather_defs"], [2, 2, 1, "", "get_block"], [2, 2, 1, "", "get_blocks"], [2, 2, 1, "", "get_end"], [2, 2, 1, "", "get_entries"], [2, 2, 1, "", "get_start"], [2, 2, 1, "", "iter_statements"], [2, 2, 1, "", "linearize_naive"], [2, 2, 1, "", "out_blocks"], [2, 2, 1, "", "print_code"], [2, 2, 1, "", "print_dot"], [2, 2, 1, "", "remove_edge"], [2, 2, 1, "", "set_start"]], "Lib.Dominators": [[3, 4, 1, "", "computeDF"], [3, 4, 1, "", "computeDT"], [3, 4, 1, "", "computeDom"], [3, 4, 1, "", "printDT"]], "Lib.Errors": [[4, 5, 1, "", "AllocationError"], [4, 5, 1, "", "MiniCInternalError"], [4, 5, 1, "", "MiniCRuntimeError"], [4, 5, 1, "", "MiniCTypeError"], [4, 5, 1, "", "MiniCUnsupportedError"]], "Lib.FunctionData": [[5, 1, 1, "", "FunctionData"]], "Lib.FunctionData.FunctionData": [[5, 2, 1, "", "fresh_label"], [5, 2, 1, "", "fresh_offset"], [5, 2, 1, "", "fresh_tmp"], [5, 2, 1, "", "get_label_div_by_zero"], [5, 2, 1, "", "get_name"], [5, 2, 1, "", "get_offset"]], "Lib.Graphes": [[6, 1, 1, "", "DiGraph"], [6, 1, 1, "", "GeneralGraph"], [6, 1, 1, "", "Graph"], [6, 5, 1, "", "GraphError"]], "Lib.Graphes.DiGraph": [[6, 2, 1, "", "add_edge"], [6, 2, 1, "", "delete_edge"], [6, 2, 1, "", "delete_vertex"], [6, 2, 1, "", "edges"], [6, 2, 1, "", "neighbourhoods"], [6, 2, 1, "", "pred"], [6, 2, 1, "", "print_dot"]], "Lib.Graphes.GeneralGraph": [[6, 2, 1, "", "add_vertex"], [6, 2, 1, "", "bfs_traversal"], [6, 2, 1, "", "connected_components"], [6, 2, 1, "", "dfs_traversal"], [6, 2, 1, "", "edges"], [6, 3, 1, "", "graph_dict"], [6, 2, 1, "", "is_reachable_from"], [6, 2, 1, "", "vertices"]], "Lib.Graphes.Graph": [[6, 2, 1, "", "add_edge"], [6, 2, 1, "", "color"], [6, 2, 1, "", "color_with_k_colors"], [6, 2, 1, "", "delete_edge"], [6, 2, 1, "", "delete_vertex"], [6, 2, 1, "", "edges"], [6, 2, 1, "", "print_dot"]], "Lib.Graphes.GraphError": [[6, 3, 1, "", "message"]], "Lib.LinearCode": [[7, 1, 1, "", "LinearCode"]], "Lib.LinearCode.LinearCode": [[7, 2, 1, "", "add_comment"], [7, 2, 1, "", "add_instruction"], [7, 2, 1, "", "add_instruction_PRINTLN_INT"], [7, 2, 1, "", "add_label"], [7, 3, 1, "", "fdata"], [7, 2, 1, "", "get_instructions"], [7, 2, 1, "", "iter_statements"], [7, 2, 1, "", "print_code"], [7, 2, 1, "", "print_dot"]], "Lib.Operands": [[8, 6, 1, "", "A"], [8, 6, 1, "", "A0"], [8, 6, 1, "", "A1"], [8, 1, 1, "", "Condition"], [8, 1, 1, "", "DataLocation"], [8, 6, 1, "", "FP"], [8, 1, 1, "", "Function"], [8, 6, 1, "", "GP"], [8, 6, 1, "", "GP_REGS"], [8, 1, 1, "", "Immediate"], [8, 1, 1, "", "Offset"], [8, 1, 1, "", "Operand"], [8, 6, 1, "", "RA"], [8, 1, 1, "", "Register"], [8, 1, 1, "", "Renamer"], [8, 6, 1, "", "S"], [8, 6, 1, "", "SP"], [8, 6, 1, "", "T"], [8, 6, 1, "", "TP"], [8, 1, 1, "", "Temporary"], [8, 1, 1, "", "TemporaryPool"], [8, 6, 1, "", "ZERO"]], "Lib.Operands.Condition": [[8, 2, 1, "", "negate"]], "Lib.Operands.Offset": [[8, 2, 1, "", "get_offset"]], "Lib.Operands.Renamer": [[8, 2, 1, "", "copy"], [8, 2, 1, "", "defined"], [8, 2, 1, "", "fresh"], [8, 2, 1, "", "replace"]], "Lib.Operands.Temporary": [[8, 2, 1, "", "get_alloced_loc"]], "Lib.Operands.TemporaryPool": [[8, 2, 1, "", "add_tmp"], [8, 2, 1, "", "fresh_tmp"], [8, 2, 1, "", "get_all_temps"], [8, 2, 1, "", "get_alloced_loc"], [8, 2, 1, "", "set_temp_allocation"]], "Lib.PhiNode": [[9, 1, 1, "", "PhiNode"]], "Lib.PhiNode.PhiNode": [[9, 2, 1, "", "defined"], [9, 2, 1, "", "get_srcs"], [9, 2, 1, "", "printIns"], [9, 2, 1, "", "rename"], [9, 2, 1, "", "rename_from"], [9, 3, 1, "", "srcs"], [9, 2, 1, "", "used"], [9, 3, 1, "", "var"]], "Lib.RiscV": [[10, 4, 1, "", "add"], [10, 4, 1, "", "call"], [10, 4, 1, "", "conditional_jump"], [10, 4, 1, "", "div"], [10, 4, 1, "", "jump"], [10, 4, 1, "", "land"], [10, 4, 1, "", "ld"], [10, 4, 1, "", "li"], [10, 4, 1, "", "lor"], [10, 4, 1, "", "mul"], [10, 4, 1, "", "mv"], [10, 4, 1, "", "rem"], [10, 4, 1, "", "sd"], [10, 4, 1, "", "sub"], [10, 4, 1, "", "xor"]], "Lib.Statement": [[11, 1, 1, "", "AbsoluteJump"], [11, 1, 1, "", "Comment"], [11, 1, 1, "", "ConditionalJump"], [11, 1, 1, "", "Instru3A"], [11, 1, 1, "", "Instruction"], [11, 1, 1, "", "Label"], [11, 1, 1, "", "Statement"], [11, 4, 1, "", "regset_to_string"]], "Lib.Statement.AbsoluteJump": [[11, 2, 1, "", "args"], [11, 3, 1, "", "ins"], [11, 3, 1, "", "label"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "targets"], [11, 2, 1, "", "with_args"]], "Lib.Statement.Comment": [[11, 3, 1, "", "comment"], [11, 2, 1, "", "printIns"]], "Lib.Statement.ConditionalJump": [[11, 2, 1, "", "args"], [11, 3, 1, "", "cond"], [11, 3, 1, "", "label"], [11, 3, 1, "", "op1"], [11, 3, 1, "", "op2"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "with_args"]], "Lib.Statement.Instru3A": [[11, 2, 1, "", "args"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "with_args"]], "Lib.Statement.Instruction": [[11, 2, 1, "", "args"], [11, 2, 1, "", "defined"], [11, 3, 1, "", "ins"], [11, 2, 1, "", "is_read_only"], [11, 2, 1, "", "printIns"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "used"]], "Lib.Statement.Label": [[11, 3, 1, "", "name"], [11, 2, 1, "", "printIns"]], "Lib.Statement.Statement": [[11, 2, 1, "", "defined"], [11, 2, 1, "", "printIns"], [11, 2, 1, "", "substitute"], [11, 2, 1, "", "used"], [11, 2, 1, "", "with_args"]], "Lib.Terminator": [[12, 1, 1, "", "BranchingTerminator"], [12, 1, 1, "", "Return"], [12, 6, 1, "", "Terminator"], [12, 4, 1, "", "jump2terminator"]], "Lib.Terminator.BranchingTerminator": [[12, 2, 1, "", "args"], [12, 3, 1, "", "cond"], [12, 3, 1, "", "label_else"], [12, 3, 1, "", "label_then"], [12, 3, 1, "", "op1"], [12, 3, 1, "", "op2"], [12, 2, 1, "", "rename"], [12, 2, 1, "", "substitute"], [12, 2, 1, "", "targets"], [12, 2, 1, "", "with_args"]], "Lib.Terminator.Return": [[12, 2, 1, "", "args"], [12, 2, 1, "", "is_read_only"], [12, 2, 1, "", "printIns"], [12, 2, 1, "", "rename"], [12, 2, 1, "", "substitute"], [12, 2, 1, "", "targets"], [12, 2, 1, "", "with_args"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:function", "5": "py:exception", "6": "py:data"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "function", "Python function"], "5": ["py", "exception", "Python exception"], "6": ["py", "data", "Python data"]}, "titleterms": {"lib": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "packag": 0, "submodul": 0, "modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12], "content": [0, 14], "alloc": [1, 14], "cfg": 2, "domin": 3, "error": 4, "functiondata": 5, "graph": [6, 14], "linearcod": 7, "operand": 8, "phinod": 9, "riscv": 10, "statement": 11, "termin": 12, "minic": [13, 14], "welcom": 14, "": 14, "document": 14, "base": 14, "librari": 14, "linear": 14, "intermedi": 14, "represent": 14, "temporari": 14, "control": 14, "flow": 14, "ssa": 14, "form": 14, "indic": 14, "tabl": 14}, "envversion": {"sphinx.domains.c": 2, "sphinx.domains.changeset": 1, "sphinx.domains.citation": 1, "sphinx.domains.cpp": 8, "sphinx.domains.index": 1, "sphinx.domains.javascript": 2, "sphinx.domains.math": 2, "sphinx.domains.python": 3, "sphinx.domains.rst": 2, "sphinx.domains.std": 2, "sphinx.ext.viewcode": 1, "sphinx": 57}, "alltitles": {"Lib package": [[0, "lib-package"]], "Submodules": [[0, "submodules"]], "Module contents": [[0, "module-Lib"]], "Lib.Allocator module": [[1, "module-Lib.Allocator"]], "Lib.CFG module": [[2, "module-Lib.CFG"]], "Lib.Dominators module": [[3, "module-Lib.Dominators"]], "Lib.Errors module": [[4, "module-Lib.Errors"]], "Lib.FunctionData module": [[5, "module-Lib.FunctionData"]], "Lib.Graphes module": [[6, "module-Lib.Graphes"]], "Lib.LinearCode module": [[7, "module-Lib.LinearCode"]], "Lib.Operands module": [[8, "module-Lib.Operands"]], "Lib.PhiNode module": [[9, "module-Lib.PhiNode"]], "Lib.RiscV module": [[10, "module-Lib.RiscV"]], "Lib.Statement module": [[11, "module-Lib.Statement"]], "Lib.Terminator module": [[12, "module-Lib.Terminator"]], "MiniC": [[13, "minic"]], "Welcome to MiniC\u2019s documentation!": [[14, "welcome-to-minic-s-documentation"]], "Contents:": [[14, null]], "Base library": [[14, "base-library"]], "Linear Intermediate representation": [[14, "linear-intermediate-representation"]], "Temporary allocation": [[14, "temporary-allocation"]], "Control Flow Graph Intermediate representation": [[14, "control-flow-graph-intermediate-representation"]], "SSA form": [[14, "ssa-form"]], "Indices and tables": [[14, "indices-and-tables"]]}, "indexentries": {"lib": [[0, "module-Lib"]], "module": [[0, "module-Lib"], [1, "module-Lib.Allocator"], [2, "module-Lib.CFG"], [3, "module-Lib.Dominators"], [4, "module-Lib.Errors"], [5, "module-Lib.FunctionData"], [6, "module-Lib.Graphes"], [7, "module-Lib.LinearCode"], [8, "module-Lib.Operands"], [9, "module-Lib.PhiNode"], [10, "module-Lib.RiscV"], [11, "module-Lib.Statement"], [12, "module-Lib.Terminator"]], "allocator (class in lib.allocator)": [[1, "Lib.Allocator.Allocator"]], "lib.allocator": [[1, "module-Lib.Allocator"]], "naiveallocator (class in lib.allocator)": [[1, "Lib.Allocator.NaiveAllocator"]], "prepare() (lib.allocator.allocator method)": [[1, "Lib.Allocator.Allocator.prepare"]], "prepare() (lib.allocator.naiveallocator method)": [[1, "Lib.Allocator.NaiveAllocator.prepare"]], "replace() (lib.allocator.allocator method)": [[1, "Lib.Allocator.Allocator.replace"]], "replace() (lib.allocator.naiveallocator method)": [[1, "Lib.Allocator.NaiveAllocator.replace"]], "rewritecode() (lib.allocator.allocator method)": [[1, "Lib.Allocator.Allocator.rewriteCode"]], "block (class in lib.cfg)": [[2, "Lib.CFG.Block"]], "cfg (class in lib.cfg)": [[2, "Lib.CFG.CFG"]], "lib.cfg": [[2, "module-Lib.CFG"]], "add_block() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.add_block"]], "add_edge() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.add_edge"]], "add_instruction() (lib.cfg.block method)": [[2, "Lib.CFG.Block.add_instruction"]], "add_phi() (lib.cfg.block method)": [[2, "Lib.CFG.Block.add_phi"]], "fdata (lib.cfg.cfg attribute)": [[2, "Lib.CFG.CFG.fdata"]], "gather_defs() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.gather_defs"]], "get_all_statements() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_all_statements"]], "get_block() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_block"]], "get_blocks() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_blocks"]], "get_body() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_body"]], "get_body_and_terminator() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_body_and_terminator"]], "get_end() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_end"]], "get_entries() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_entries"]], "get_in() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_in"]], "get_label() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_label"]], "get_phis() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_phis"]], "get_start() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.get_start"]], "get_terminator() (lib.cfg.block method)": [[2, "Lib.CFG.Block.get_terminator"]], "iter_statements() (lib.cfg.block method)": [[2, "Lib.CFG.Block.iter_statements"]], "iter_statements() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.iter_statements"]], "linearize_naive() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.linearize_naive"]], "out_blocks() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.out_blocks"]], "print_code() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.print_code"]], "print_dot() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.print_dot"]], "remove_all_phis() (lib.cfg.block method)": [[2, "Lib.CFG.Block.remove_all_phis"]], "remove_edge() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.remove_edge"]], "set_phis() (lib.cfg.block method)": [[2, "Lib.CFG.Block.set_phis"]], "set_start() (lib.cfg.cfg method)": [[2, "Lib.CFG.CFG.set_start"]], "set_terminator() (lib.cfg.block method)": [[2, "Lib.CFG.Block.set_terminator"]], "to_dot() (lib.cfg.block method)": [[2, "Lib.CFG.Block.to_dot"]], "lib.dominators": [[3, "module-Lib.Dominators"]], "computedf() (in module lib.dominators)": [[3, "Lib.Dominators.computeDF"]], "computedt() (in module lib.dominators)": [[3, "Lib.Dominators.computeDT"]], "computedom() (in module lib.dominators)": [[3, "Lib.Dominators.computeDom"]], "printdt() (in module lib.dominators)": [[3, "Lib.Dominators.printDT"]], "allocationerror": [[4, "Lib.Errors.AllocationError"]], "lib.errors": [[4, "module-Lib.Errors"]], "minicinternalerror": [[4, "Lib.Errors.MiniCInternalError"]], "minicruntimeerror": [[4, "Lib.Errors.MiniCRuntimeError"]], "minictypeerror": [[4, "Lib.Errors.MiniCTypeError"]], "minicunsupportederror": [[4, "Lib.Errors.MiniCUnsupportedError"]], "functiondata (class in lib.functiondata)": [[5, "Lib.FunctionData.FunctionData"]], "lib.functiondata": [[5, "module-Lib.FunctionData"]], "fresh_label() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.fresh_label"]], "fresh_offset() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.fresh_offset"]], "fresh_tmp() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.fresh_tmp"]], "get_label_div_by_zero() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.get_label_div_by_zero"]], "get_name() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.get_name"]], "get_offset() (lib.functiondata.functiondata method)": [[5, "Lib.FunctionData.FunctionData.get_offset"]], "digraph (class in lib.graphes)": [[6, "Lib.Graphes.DiGraph"]], "generalgraph (class in lib.graphes)": [[6, "Lib.Graphes.GeneralGraph"]], "graph (class in lib.graphes)": [[6, "Lib.Graphes.Graph"]], "grapherror": [[6, "Lib.Graphes.GraphError"]], "lib.graphes": [[6, "module-Lib.Graphes"]], "add_edge() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.add_edge"]], "add_edge() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.add_edge"]], "add_vertex() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.add_vertex"]], "bfs_traversal() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.bfs_traversal"]], "color() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.color"]], "color_with_k_colors() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.color_with_k_colors"]], "connected_components() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.connected_components"]], "delete_edge() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.delete_edge"]], "delete_edge() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.delete_edge"]], "delete_vertex() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.delete_vertex"]], "delete_vertex() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.delete_vertex"]], "dfs_traversal() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.dfs_traversal"]], "edges() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.edges"]], "edges() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.edges"]], "edges() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.edges"]], "graph_dict (lib.graphes.generalgraph attribute)": [[6, "Lib.Graphes.GeneralGraph.graph_dict"]], "is_reachable_from() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.is_reachable_from"]], "message (lib.graphes.grapherror attribute)": [[6, "Lib.Graphes.GraphError.message"]], "neighbourhoods() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.neighbourhoods"]], "pred() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.pred"]], "print_dot() (lib.graphes.digraph method)": [[6, "Lib.Graphes.DiGraph.print_dot"]], "print_dot() (lib.graphes.graph method)": [[6, "Lib.Graphes.Graph.print_dot"]], "vertices() (lib.graphes.generalgraph method)": [[6, "Lib.Graphes.GeneralGraph.vertices"]], "lib.linearcode": [[7, "module-Lib.LinearCode"]], "linearcode (class in lib.linearcode)": [[7, "Lib.LinearCode.LinearCode"]], "add_comment() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_comment"]], "add_instruction() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_instruction"]], "add_instruction_println_int() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_instruction_PRINTLN_INT"]], "add_label() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.add_label"]], "fdata (lib.linearcode.linearcode attribute)": [[7, "Lib.LinearCode.LinearCode.fdata"]], "get_instructions() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.get_instructions"]], "iter_statements() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.iter_statements"]], "print_code() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.print_code"]], "print_dot() (lib.linearcode.linearcode method)": [[7, "Lib.LinearCode.LinearCode.print_dot"]], "a (in module lib.operands)": [[8, "Lib.Operands.A"]], "a0 (in module lib.operands)": [[8, "Lib.Operands.A0"]], "a1 (in module lib.operands)": [[8, "Lib.Operands.A1"]], "condition (class in lib.operands)": [[8, "Lib.Operands.Condition"]], "datalocation (class in lib.operands)": [[8, "Lib.Operands.DataLocation"]], "fp (in module lib.operands)": [[8, "Lib.Operands.FP"]], "function (class in lib.operands)": [[8, "Lib.Operands.Function"]], "gp (in module lib.operands)": [[8, "Lib.Operands.GP"]], "gp_regs (in module lib.operands)": [[8, "Lib.Operands.GP_REGS"]], "immediate (class in lib.operands)": [[8, "Lib.Operands.Immediate"]], "lib.operands": [[8, "module-Lib.Operands"]], "offset (class in lib.operands)": [[8, "Lib.Operands.Offset"]], "operand (class in lib.operands)": [[8, "Lib.Operands.Operand"]], "ra (in module lib.operands)": [[8, "Lib.Operands.RA"]], "register (class in lib.operands)": [[8, "Lib.Operands.Register"]], "renamer (class in lib.operands)": [[8, "Lib.Operands.Renamer"]], "s (in module lib.operands)": [[8, "Lib.Operands.S"]], "sp (in module lib.operands)": [[8, "Lib.Operands.SP"]], "t (in module lib.operands)": [[8, "Lib.Operands.T"]], "tp (in module lib.operands)": [[8, "Lib.Operands.TP"]], "temporary (class in lib.operands)": [[8, "Lib.Operands.Temporary"]], "temporarypool (class in lib.operands)": [[8, "Lib.Operands.TemporaryPool"]], "zero (in module lib.operands)": [[8, "Lib.Operands.ZERO"]], "add_tmp() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.add_tmp"]], "copy() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.copy"]], "defined() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.defined"]], "fresh() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.fresh"]], "fresh_tmp() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.fresh_tmp"]], "get_all_temps() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.get_all_temps"]], "get_alloced_loc() (lib.operands.temporary method)": [[8, "Lib.Operands.Temporary.get_alloced_loc"]], "get_alloced_loc() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.get_alloced_loc"]], "get_offset() (lib.operands.offset method)": [[8, "Lib.Operands.Offset.get_offset"]], "negate() (lib.operands.condition method)": [[8, "Lib.Operands.Condition.negate"]], "replace() (lib.operands.renamer method)": [[8, "Lib.Operands.Renamer.replace"]], "set_temp_allocation() (lib.operands.temporarypool method)": [[8, "Lib.Operands.TemporaryPool.set_temp_allocation"]], "lib.phinode": [[9, "module-Lib.PhiNode"]], "phinode (class in lib.phinode)": [[9, "Lib.PhiNode.PhiNode"]], "defined() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.defined"]], "get_srcs() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.get_srcs"]], "printins() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.printIns"]], "rename() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.rename"]], "rename_from() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.rename_from"]], "srcs (lib.phinode.phinode attribute)": [[9, "Lib.PhiNode.PhiNode.srcs"]], "used() (lib.phinode.phinode method)": [[9, "Lib.PhiNode.PhiNode.used"]], "var (lib.phinode.phinode attribute)": [[9, "Lib.PhiNode.PhiNode.var"]], "lib.riscv": [[10, "module-Lib.RiscV"]], "add() (in module lib.riscv)": [[10, "Lib.RiscV.add"]], "call() (in module lib.riscv)": [[10, "Lib.RiscV.call"]], "conditional_jump() (in module lib.riscv)": [[10, "Lib.RiscV.conditional_jump"]], "div() (in module lib.riscv)": [[10, "Lib.RiscV.div"]], "jump() (in module lib.riscv)": [[10, "Lib.RiscV.jump"]], "land() (in module lib.riscv)": [[10, "Lib.RiscV.land"]], "ld() (in module lib.riscv)": [[10, "Lib.RiscV.ld"]], "li() (in module lib.riscv)": [[10, "Lib.RiscV.li"]], "lor() (in module lib.riscv)": [[10, "Lib.RiscV.lor"]], "mul() (in module lib.riscv)": [[10, "Lib.RiscV.mul"]], "mv() (in module lib.riscv)": [[10, "Lib.RiscV.mv"]], "rem() (in module lib.riscv)": [[10, "Lib.RiscV.rem"]], "sd() (in module lib.riscv)": [[10, "Lib.RiscV.sd"]], "sub() (in module lib.riscv)": [[10, "Lib.RiscV.sub"]], "xor() (in module lib.riscv)": [[10, "Lib.RiscV.xor"]], "absolutejump (class in lib.statement)": [[11, "Lib.Statement.AbsoluteJump"]], "comment (class in lib.statement)": [[11, "Lib.Statement.Comment"]], "conditionaljump (class in lib.statement)": [[11, "Lib.Statement.ConditionalJump"]], "instru3a (class in lib.statement)": [[11, "Lib.Statement.Instru3A"]], "instruction (class in lib.statement)": [[11, "Lib.Statement.Instruction"]], "label (class in lib.statement)": [[11, "Lib.Statement.Label"]], "lib.statement": [[11, "module-Lib.Statement"]], "statement (class in lib.statement)": [[11, "Lib.Statement.Statement"]], "args() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.args"]], "args() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.args"]], "args() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.args"]], "args() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.args"]], "comment (lib.statement.comment attribute)": [[11, "Lib.Statement.Comment.comment"]], "cond (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.cond"]], "defined() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.defined"]], "defined() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.defined"]], "ins (lib.statement.absolutejump attribute)": [[11, "Lib.Statement.AbsoluteJump.ins"]], "ins (lib.statement.instruction attribute)": [[11, "Lib.Statement.Instruction.ins"]], "is_read_only() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.is_read_only"]], "label (lib.statement.absolutejump attribute)": [[11, "Lib.Statement.AbsoluteJump.label"]], "label (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.label"]], "name (lib.statement.label attribute)": [[11, "Lib.Statement.Label.name"]], "op1 (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.op1"]], "op2 (lib.statement.conditionaljump attribute)": [[11, "Lib.Statement.ConditionalJump.op2"]], "printins() (lib.statement.comment method)": [[11, "Lib.Statement.Comment.printIns"]], "printins() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.printIns"]], "printins() (lib.statement.label method)": [[11, "Lib.Statement.Label.printIns"]], "printins() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.printIns"]], "regset_to_string() (in module lib.statement)": [[11, "Lib.Statement.regset_to_string"]], "rename() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.rename"]], "rename() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.rename"]], "rename() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.rename"]], "rename() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.rename"]], "substitute() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.substitute"]], "substitute() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.substitute"]], "substitute() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.substitute"]], "substitute() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.substitute"]], "targets() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.targets"]], "used() (lib.statement.instruction method)": [[11, "Lib.Statement.Instruction.used"]], "used() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.used"]], "with_args() (lib.statement.absolutejump method)": [[11, "Lib.Statement.AbsoluteJump.with_args"]], "with_args() (lib.statement.conditionaljump method)": [[11, "Lib.Statement.ConditionalJump.with_args"]], "with_args() (lib.statement.instru3a method)": [[11, "Lib.Statement.Instru3A.with_args"]], "with_args() (lib.statement.statement method)": [[11, "Lib.Statement.Statement.with_args"]], "branchingterminator (class in lib.terminator)": [[12, "Lib.Terminator.BranchingTerminator"]], "lib.terminator": [[12, "module-Lib.Terminator"]], "return (class in lib.terminator)": [[12, "Lib.Terminator.Return"]], "terminator (in module lib.terminator)": [[12, "Lib.Terminator.Terminator"]], "args() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.args"]], "args() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.args"]], "cond (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.cond"]], "is_read_only() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.is_read_only"]], "jump2terminator() (in module lib.terminator)": [[12, "Lib.Terminator.jump2terminator"]], "label_else (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.label_else"]], "label_then (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.label_then"]], "op1 (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.op1"]], "op2 (lib.terminator.branchingterminator attribute)": [[12, "Lib.Terminator.BranchingTerminator.op2"]], "printins() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.printIns"]], "rename() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.rename"]], "rename() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.rename"]], "substitute() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.substitute"]], "substitute() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.substitute"]], "targets() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.targets"]], "targets() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.targets"]], "with_args() (lib.terminator.branchingterminator method)": [[12, "Lib.Terminator.BranchingTerminator.with_args"]], "with_args() (lib.terminator.return method)": [[12, "Lib.Terminator.Return.with_args"]]}}) \ No newline at end of file