diff --git a/MiniC/Lib/CFG.py b/MiniC/Lib/CFG.py index 3937259..d4e040f 100644 --- a/MiniC/Lib/CFG.py +++ b/MiniC/Lib/CFG.py @@ -84,6 +84,14 @@ class Block: cast(List[Statement], self._instructions) + [self.get_terminator()]) + def get_body_and_terminator(self) -> List[Statement]: + """ + Return all statements of the block, except phi-nodes + (and the label of the block). + """ + return (cast(List[Statement], self._instructions) + + [self.get_terminator()]) + def get_label(self) -> Label: """Return the label of the block.""" return self._label @@ -259,7 +267,6 @@ class CFG: # nodes for name, blk in self._blocks.items(): if DF is not None: - print(str(name), blk._label) df_str = "{}" if blk not in DF or not len(DF[blk]) else str(DF[blk]) df_lab = blk.to_dot() + "\n\nDominance frontier:\n" + df_str else: diff --git a/MiniC/Lib/Graphes.py b/MiniC/Lib/Graphes.py index ed8241d..795334d 100644 --- a/MiniC/Lib/Graphes.py +++ b/MiniC/Lib/Graphes.py @@ -156,7 +156,9 @@ class Graph(GeneralGraph): """Print the graph.""" color_names = ['red', 'blue', 'green', 'yellow', 'cyan', 'magenta'] + \ [f"grey{i}" for i in range(0, 100, 10)] - color_shapes = ['ellipse', 'polygon', 'box', 'circle', 'egg', 'pentagon', 'hexagon'] + color_shapes = ['ellipse', 'box', 'diamond', 'trapezium', 'egg', + 'parallelogram', 'house', 'triangle', 'pentagon', 'hexagon', + 'septagon', 'octagon'] dot = Digraph(comment='Conflict Graph') for k in self.graph_dict: shape = None @@ -255,6 +257,10 @@ class Graph(GeneralGraph): class DiGraph(GeneralGraph): """Class for directed graphs.""" + def pred(self, v: Any) -> Set: + """Return all predecessors of the vertex `v` in the graph.""" + return {src for src, dests in self.graph_dict.items() if v in dests} + def neighbourhoods(self) -> List[Tuple[Any, Set]]: """Return all neighbourhoods in the graph.""" return list(self.graph_dict.items()) diff --git a/MiniC/Lib/Terminator.py b/MiniC/Lib/Terminator.py index 5ae5d1e..f7b2112 100644 --- a/MiniC/Lib/Terminator.py +++ b/MiniC/Lib/Terminator.py @@ -52,6 +52,9 @@ class Return(Statement): .format(self)) return self + def is_read_only(self): + return True + @dataclass(init=False) class BranchingTerminator(Instruction): @@ -126,7 +129,7 @@ def jump2terminator(j: ConditionalJump | AbsoluteJump | None, return BranchingTerminator(j.cond, j.op1, j.op2, j.label, label_else) case AbsoluteJump(): return AbsoluteJump(label=j.label) - case None: + case _: if next_label: return AbsoluteJump(next_label) else: diff --git a/MiniC/TP05/LivenessSSA.py b/MiniC/TP05/LivenessSSA.py new file mode 100644 index 0000000..6619951 --- /dev/null +++ b/MiniC/TP05/LivenessSSA.py @@ -0,0 +1,99 @@ +from typing import Dict, Set, Tuple +from Lib.Operands import Temporary +from Lib.Statement import Statement, regset_to_string +from Lib.CFG import Block, CFG +from Lib.PhiNode import PhiNode + + +class LivenessSSA: + """Liveness Analysis on a CFG under SSA Form.""" + + def __init__(self, cfg: CFG, debug=False): + self._cfg: CFG = cfg + self._debug: bool = debug + # Temporary already propagated, by Block + self._seen: Dict[Block, Set[Temporary]] = dict() + # Live Temporary at outputs of Statement + self._liveout: Dict[Statement, Set[Temporary]] = dict() + + def run(self) -> None: + """Compute the liveness.""" + # Initialization + for block in self._cfg.get_blocks(): + self._seen[block] = set() + for instr in block.get_all_statements(): + self._liveout[instr] = set() + # Start the use-def chains + for var, uses in self.gather_uses().items(): + for block, pos, instr in uses: + self.live_start(block, pos, instr, var) + # Add conflicts on phis + self.conflict_on_phis() + # Final debugging print + if self._debug: + self.print_map_in_out() + + def live_start(self, block: Block, pos: int | None, + s: Statement, var: Temporary) -> None: + """Start backward propagation of liveness information.""" + if isinstance(s, PhiNode): + assert(pos is None) + for label, var_phi in s.used().items(): + if var_phi == var: + prev_block = self._cfg.get_block(label) + self.liveout_at_block(prev_block, var) + else: + assert(pos is not None) + self.livein_at_instruction(block, pos, var) + + def liveout_at_block(self, block: Block, var: Temporary) -> None: + """Backward propagation of liveness information at a block.""" + raise NotImplementedError("LivenessSSA") # TODO (Lab 5b, Exercise 1) + + def liveout_at_instruction(self, block: Block, pos: int, var: Temporary) -> None: + """Backward propagation of liveness information at a non-phi instruction.""" + instr = block.get_body_and_terminator()[pos] + raise NotImplementedError("LivenessSSA") # TODO (Lab 5b, Exercise 1) + + def livein_at_instruction(self, block: Block, pos: int, var: Temporary) -> None: + """Backward propagation of liveness information at a non-phi instruction.""" + raise NotImplementedError("LivenessSSA") # TODO (Lab 5b, Exercise 1) + + def gather_uses(self) -> Dict[Temporary, Set[Tuple[Block, int | None, Statement]]]: + """ + Return a dictionnary giving for each variable the set of statements using it, + with additionnaly for each statement, the block of the statement and its position inside. + Phi instructions have position None in their block, while a Terminaor is at the last + position of its block. + """ + uses: Dict[Temporary, Set[Tuple[Block, int | None, Statement]]] = dict() + for block in self._cfg.get_blocks(): + # Look inside the phi node + for instr in block._phis: + assert (isinstance(instr, PhiNode)) + for var in instr.used().values(): + if isinstance(var, Temporary): + var_uses = uses.get(var, set()) + uses[var] = var_uses.union({(block, None, instr)}) + # Look inside the body and the terminator + for pos, instr in enumerate(block.get_body_and_terminator()): + for var in instr.used(): + if isinstance(var, Temporary): + var_uses = uses.get(var, set()) + uses[var] = var_uses.union({(block, pos, instr)}) + return uses + + def conflict_on_phis(self) -> None: + """Ensures that variables defined by phi instructions are in conflict with one-another.""" + raise NotImplementedError("LivenessSSA") # TODO (Lab 5b, Exercise 1) + + def print_map_in_out(self) -> None: # pragma: no cover + """Print live out sets at each instruction, group by block, useful for debugging!""" + print("Liveout: [") + for block in self._cfg.get_blocks(): + print("Block " + str(block.get_label()) + ": {\n " + + ",\n ".join("\"{}\": {}" + .format(instr, regset_to_string(self._liveout[instr])) + for instr in block.get_all_statements()) + + "}") + print("]") diff --git a/MiniC/TP05/SmartAllocator.py b/MiniC/TP05/SmartAllocator.py new file mode 100644 index 0000000..bd33371 --- /dev/null +++ b/MiniC/TP05/SmartAllocator.py @@ -0,0 +1,99 @@ +from typing import List, Dict +from Lib.Errors import MiniCInternalError +from Lib.Operands import Temporary, Operand, S, Register, Offset, DataLocation, GP_REGS +from Lib.Statement import Instruction +from Lib.Allocator import Allocator +from Lib.FunctionData import FunctionData +from Lib import RiscV +from Lib.Graphes import Graph # For Graph coloring utility functions + + +class SmartAllocator(Allocator): + + _igraph: Graph # interference graph + + def __init__(self, fdata: FunctionData, basename: str, liveness, + debug=False, debug_graphs=False): + self._liveness = liveness + self._basename: str = basename + self._debug: bool = debug + self._debug_graphs: bool = debug_graphs + super().__init__(fdata) + + def replace(self, old_instr: Instruction) -> List[Instruction]: + """ + Replace Temporary operands with the corresponding allocated + physical register (Register) OR memory location (Offset). + """ + before: List[Instruction] = [] + after: List[Instruction] = [] + subst: Dict[Operand, Operand] = {} + # TODO (lab5): Compute before, after, subst. This is similar to what + # TODO (lab5): replace from the Naive and AllInMem Allocators do (Lab 4). + raise NotImplementedError("Smart Replace (lab5)") # TODO + # And now return the new list! + instr = old_instr.substitute(subst) + return before + [instr] + after + + def prepare(self) -> None: + """ + Perform all preparatory steps related to smart register allocation: + + - Dataflow analysis to compute the liveness range of each + temporary. + - Interference graph construction. + - Graph coloring. + - Associating temporaries with actual locations. + """ + # Liveness analysis + self._liveness.run() + # Interference graph + self.build_interference_graph() + if self._debug_graphs: + print("Printing the interference graph") + self._igraph.print_dot(self._basename + "interference.dot") + # Smart Allocation via graph coloring + self.smart_alloc() + + def build_interference_graph(self) -> None: + """ + Build the interference graph (in self._igraph). + Vertices of the graph are temporaries, + and an edge exists between temporaries iff they are in conflict. + """ + self._igraph: Graph = Graph() + # Create a vertex for every temporary + # There may be temporaries the code does not use anymore, + # but it does not matter as they interfere with no one. + for v in self._fdata._pool.get_all_temps(): + self._igraph.add_vertex(v) + # Iterate over self._liveness._liveout (dictionary containing all + # live out temporaries for each instruction), and for each conflict use + # self._igraph.add_edge((t1, t2)) to add the corresponding edge. + raise NotImplementedError("build_interference_graph (lab5)") # TODO + + def smart_alloc(self) -> None: + """ + Allocates all temporaries via graph coloring. + Prints the colored graph if self._debug_graphs is True. + + Precondition: the interference graph _igraph must have been built. + """ + # Checking the interference graph has been built + if not self._igraph: + raise MiniCInternalError("Empty interference graph in the Smart Allocator") + # Coloring of the interference graph + coloringreg: Dict[Temporary, int] = self._igraph.color() + if self._debug_graphs: + print("coloring = " + str(coloringreg)) + self._igraph.print_dot(self._basename + "_colored.dot", coloringreg) + # Temporary -> DataLocation (Register or Offset) dictionary, + # specifying where a given Temporary should be allocated: + alloc_dict: Dict[Temporary, DataLocation] = dict() + # Use the coloring `coloringreg` to fill `alloc_dict`. + # Our version is less than 5 lines of code. + raise NotImplementedError("Allocation based on graph coloring (lab5)") # TODO + if self._debug: + print("Allocation:") + print(alloc_dict) + self._fdata._pool.set_temp_allocation(alloc_dict) diff --git a/MiniC/TP05/tp5b.pdf b/MiniC/TP05/tp5b.pdf new file mode 100644 index 0000000..71d8d29 Binary files /dev/null and b/MiniC/TP05/tp5b.pdf differ diff --git a/MiniC/test_codegen.py b/MiniC/test_codegen.py index 3f825c1..e6a16f1 100644 --- a/MiniC/test_codegen.py +++ b/MiniC/test_codegen.py @@ -129,11 +129,8 @@ class TestCodeGen(TestExpectPragmas): if "AllocationError" in result.output: if reg_alloc == 'naive': pytest.skip("Too big for the naive allocator") - elif reg_alloc == 'all-in-mem': - pytest.skip("Too big for the all in memory allocator") else: - raise Exception("AllocationError should only happen " - "for reg_alloc='naive' or reg_alloc='all_in_mem'") + pytest.skip("Offsets too big to be manipulated") elif ("NotImplementedError" in result.output and SKIP_NOT_IMPLEMENTED): pytest.skip("Feature not implemented in this compiler") diff --git a/PLANNING.md b/PLANNING.md index 89d1b92..5f25ad7 100644 --- a/PLANNING.md +++ b/PLANNING.md @@ -90,3 +90,10 @@ _Academic first semester 2022-2023_ * Code in [MiniC/TP05/](MiniC/TP05/). * Documentation (updated) [here](docs/index.html). +# Week 8: + +- :hammer: Lab 5b (1/2): Wednesday 26/10/2021, 10h15-12h15. Rooms A1 (Nicolas Chappe) & B2 (Rémi Di Guardia) + + * Smart Register Allocation [TP05b](MiniC/TP05/tp5b.pdf) + * Code in [MiniC/TP05/](MiniC/TP05/). + diff --git a/docs/_modules/Lib/CFG.html b/docs/_modules/Lib/CFG.html index b937f3f..74ad699 100644 --- a/docs/_modules/Lib/CFG.html +++ b/docs/_modules/Lib/CFG.html @@ -162,6 +162,14 @@ cast(List[Statement], self._instructions) + [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). + """ + return (cast(List[Statement], self._instructions) + + [self.get_terminator()])
+
[docs] def get_label(self) -> Label: """Return the label of the block.""" return self._label
diff --git a/docs/_modules/Lib/Graphes.html b/docs/_modules/Lib/Graphes.html index b92f014..0b0c11e 100644 --- a/docs/_modules/Lib/Graphes.html +++ b/docs/_modules/Lib/Graphes.html @@ -234,7 +234,9 @@ """Print the graph.""" color_names = ['red', 'blue', 'green', 'yellow', 'cyan', 'magenta'] + \ [f"grey{i}" for i in range(0, 100, 10)] - color_shapes = ['ellipse', 'polygon', 'box', 'circle', 'egg', 'pentagon', 'hexagon'] + color_shapes = ['ellipse', 'box', 'diamond', 'trapezium', 'egg', + 'parallelogram', 'house', 'triangle', 'pentagon', 'hexagon', + 'septagon', 'octagon'] dot = Digraph(comment='Conflict Graph') for k in self.graph_dict: shape = None @@ -333,6 +335,10 @@
[docs]class DiGraph(GeneralGraph): """Class for directed graphs.""" +
[docs] def pred(self, v: Any) -> Set: + """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 list(self.graph_dict.items())
diff --git a/docs/_modules/Lib/LinearCode.html b/docs/_modules/Lib/LinearCode.html index 7c04838..fd2f8e4 100644 --- a/docs/_modules/Lib/LinearCode.html +++ b/docs/_modules/Lib/LinearCode.html @@ -131,10 +131,8 @@
[docs] def iter_statements(self, f) -> None: """Iterate over instructions. - For each real instruction (not label or comment), call f, - which must return either None or a list of instruction. If it - returns None, nothing happens. If it returns a list, then the - instruction is replaced by this list. + For each real instruction i (not label or comment), replace it + with the list of instructions given by f(i). """ self._listIns = _iter_statements(self._listIns, f)
@@ -153,7 +151,7 @@
[docs] def add_instruction_PRINTLN_INT(self, reg: DataLocation) -> None: """Print integer value, with newline. (see Expand)""" - # a print instruction generates the temp it prints. + # A print instruction generates the temp it prints. self.add_instruction(mv(A0, reg)) self.add_instruction(call(Function('println_int')))
diff --git a/docs/_modules/Lib/RiscV.html b/docs/_modules/Lib/RiscV.html index d05ee36..218da60 100644 --- a/docs/_modules/Lib/RiscV.html +++ b/docs/_modules/Lib/RiscV.html @@ -146,7 +146,10 @@
[docs]def xor(dr: Operand, sr1: Operand, sr2orimm7: Operand) -> Instru3A: # pragma: no cover - return Instru3A("xor", dr, sr1, sr2orimm7)
+ if isinstance(sr2orimm7, Immediate): + return Instru3A("xori", dr, sr1, sr2orimm7) + else: + return Instru3A("xor", dr, sr1, sr2orimm7)
[docs]def li(dr: Operand, imm7: Immediate) -> Instru3A: diff --git a/docs/_modules/Lib/Statement.html b/docs/_modules/Lib/Statement.html index 9cb51cd..0f8728f 100644 --- a/docs/_modules/Lib/Statement.html +++ b/docs/_modules/Lib/Statement.html @@ -91,7 +91,7 @@ from Lib.Errors import MiniCInternalError -
[docs]def regset_to_string(registerset): +
[docs]def regset_to_string(registerset) -> str: """Utility function: pretty-prints a set of locations.""" return "{" + ",".join(str(x) for x in registerset) + "}"
diff --git a/docs/api/Lib.CFG.html b/docs/api/Lib.CFG.html index 26ea8b4..848910e 100644 --- a/docs/api/Lib.CFG.html +++ b/docs/api/Lib.CFG.html @@ -115,6 +115,13 @@ See the documentation for +
+get_body_and_terminator() List[Statement][source]
+

Return all statements of the block, except phi-nodes +(and the label of the block).

+
+
get_label() Label[source]
diff --git a/docs/api/Lib.Graphes.html b/docs/api/Lib.Graphes.html index 451ef9e..194c749 100644 --- a/docs/api/Lib.Graphes.html +++ b/docs/api/Lib.Graphes.html @@ -230,6 +230,12 @@ Return a dict vertex -> color, where color is an integer (0, 1, …).

class Lib.Graphes.DiGraph(graph_dict=None)[source]

Bases: GeneralGraph

Class for directed graphs.

+
+
+pred(v: Any) Set[source]
+

Return all predecessors of the vertex v in the graph.

+
+
neighbourhoods() List[Tuple[Any, Set]][source]
diff --git a/docs/api/Lib.LinearCode.html b/docs/api/Lib.LinearCode.html index 6c20f36..9b7cb4f 100644 --- a/docs/api/Lib.LinearCode.html +++ b/docs/api/Lib.LinearCode.html @@ -110,10 +110,8 @@ the RiscV program to a file.

iter_statements(f) None[source]

Iterate over instructions. -For each real instruction (not label or comment), call f, -which must return either None or a list of instruction. If it -returns None, nothing happens. If it returns a list, then the -instruction is replaced by this list.

+For each real instruction i (not label or comment), replace it +with the list of instructions given by f(i).

diff --git a/docs/api/Lib.Statement.html b/docs/api/Lib.Statement.html index ed36068..cc7ffc7 100644 --- a/docs/api/Lib.Statement.html +++ b/docs/api/Lib.Statement.html @@ -88,7 +88,7 @@ is inherited by AbsoluteJump and ConditionalJump.

-Lib.Statement.regset_to_string(registerset)[source]
+Lib.Statement.regset_to_string(registerset) str[source]

Utility function: pretty-prints a set of locations.

diff --git a/docs/genindex.html b/docs/genindex.html index 0c266ee..9bd7bb6 100644 --- a/docs/genindex.html +++ b/docs/genindex.html @@ -325,6 +325,8 @@
  • get_blocks() (Lib.CFG.CFG method)
  • get_body() (Lib.CFG.Block method) +
  • +
  • get_body_and_terminator() (Lib.CFG.Block method)
  • get_end() (Lib.CFG.CFG method)
  • @@ -635,6 +637,8 @@
    • PhiNode (class in Lib.PhiNode) +
    • +
    • pred() (Lib.Graphes.DiGraph method)
    • prepare() (Lib.Allocator.Allocator method) diff --git a/docs/objects.inv b/docs/objects.inv index 4a0c4fb..bc53827 100644 Binary files a/docs/objects.inv and b/docs/objects.inv differ diff --git a/docs/searchindex.js b/docs/searchindex.js index dda79c1..b3943fd 100644 --- a/docs/searchindex.js +++ b/docs/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], "cfg": [0, 3, 9, 12, 13, 14], "domin": [0, 13, 14], "error": [0, 13, 14], "functiondata": [0, 1, 2, 7, 13], "graph": [0, 2, 3, 7, 13], "linearcod": [0, 1, 5, 12, 13, 14], "operand": [0, 1, 5, 9, 10, 11, 12, 13, 14], "phinod": [0, 13, 14], "riscv": [0, 2, 5, 7, 8, 9, 11, 13, 14], "statement": [0, 2, 7, 9, 12, 13, 14], "termin": [0, 2, 13, 14], "thi": [1, 2, 3, 5, 7, 8, 10, 11], "file": [1, 5, 7, 8], "defin": [1, 5, 8, 9, 10, 11, 14], "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], "naivealloc": 1, "fdata": [1, 2, 5, 7], "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, "replac": [1, 2, 7, 8], "all": [1, 2, 6, 8, 14], "temporari": [1, 5, 7, 8], "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], "prepar": 1, "respons": 1, "call": [1, 3, 6, 7, 8, 9, 10, 11, 12], "temporarypool": [1, 5, 8], "set_temp_alloc": [1, 8], "map": [1, 8], "from": [1, 6, 8, 11], "where": [1, 6], "thei": [1, 6], "should": [1, 6, 9, 11, 12, 14], "store": [1, 5], "regist": [1, 8], "memori": [1, 5, 8, 14], "Then": 1, "each": [1, 2, 6, 7, 9, 12, 14], "instruct": [1, 2, 7, 10, 11, 12, 14], "order": 1, "previous": [1, 3], "assign": 1, "possibli": 1, "add": [1, 2, 6, 7, 8, 10], "some": [1, 5, 7, 14], "befor": [1, 14], "after": 1, "concret": 1, "return": [1, 2, 3, 5, 6, 7, 8, 9, 12], "list": [1, 2, 6, 7, 8, 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, "iter_stat": [1, 2, 7], "none": [1, 2, 3, 6, 7, 8, 9, 11, 12], "instr": [1, 2], "transform": 1, "an": [1, 2, 3, 6, 7, 11], "rewritecod": 1, "listcod": 1, "modifi": 1, "try": 1, "fail": [1, 6], "ar": [1, 5, 6, 8, 9, 11, 12, 14], "more": 1, "than": [1, 8], "old_instr": 1, "correspond": [1, 9], "too": 1, "mani": 1, "itself": [2, 8], "block": [2, 3, 9, 12, 14], "its": [2, 3, 8, 9, 11, 14], "basic": [2, 14], "label": [2, 5, 7, 9, 10, 11, 12, 14], "inst": 2, "instru3a": [2, 7, 10, 11], "comment": [2, 7, 11], "absolutejump": [2, 7, 10, 11, 12], "branchingtermin": [2, 12], "A": [2, 6, 8, 9, 11, 12], "made": 2, "three": [2, 12], "main": 2, "part": 2, "start": 2, "uniqu": [2, 5], "identifi": [2, 9], "bodi": 2, "exclud": 2, "jump": [2, 10, 11, 12], "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, "to_dot": 2, "str": [2, 3, 5, 6, 7, 8, 11], "output": [2, 7, 9, 11, 12], "string": [2, 5, 8], "get_bodi": 2, "phi": [2, 14], "node": [2, 6, 9, 14], "nor": 2, "get_all_stat": 2, "includ": 2, "get_label": 2, "get_in": 2, "edg": [2, 6], "consid": [2, 11], "get_termin": 2, "set_termin": 2, "term": 2, "set": [2, 3, 6, 11], "f": [2, 7], "For": [2, 7], "real": [2, 7], "given": [2, 3, 5, 7, 9, 11, 12], "assum": 2, "add_instruct": [2, 7], "complet": [2, 7], "control": 2, "flow": 2, "function": [2, 3, 5, 7, 8, 10, 11, 12, 14], "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], "get_start": 2, "set_start": 2, "get_end": 2, "add_block": 2, "blk": 2, "new": [2, 5, 7, 8], "get_block": 2, "name": [2, 5, 6, 7, 8, 9, 11], "get_entri": 2, "predecessor": 2, "add_edg": [2, 6], "src": [2, 9], "dest": 2, "remove_edg": 2, "remov": 2, "out_block": 2, "target": [2, 11, 12], "gather_def": 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], "definit": 2, "appli": 2, "linearize_na": 2, "procedur": 2, "everywher": 2, "print_cod": [2, 7], "lambda": 2, "print": [2, 6, 7, 9, 11, 12], "print_dot": [2, 6, 7], "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, "computedom": 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], "printdt": 3, "displai": 3, "graphic": 3, "render": 3, "tree": 3, "computedt": 3, "dom_graph": 3, "bool": [3, 6, 8], "basenam": 3, "us": [3, 5, 6, 8, 9, 11, 12, 14], "dt": 3, "which": [3, 5, 7, 8, 11], "children": 3, "computedf": 3, "frontier": [3, 14], "except": [4, 6], "minicruntimeerror": 4, "minicinternalerror": 4, "minicunsupportederror": 4, "minictypeerror": 4, "allocationerror": 4, "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], "get_nam": 5, "fresh_tmp": [5, 8], "fresh": [5, 8, 9], "ad": [5, 6], "pool": [5, 8], "fresh_offset": 5, "offset": [5, 8], "stack": 5, "decreas": 5, "rel": 5, "fp": [5, 8], "get_offset": [5, 8], "int": [5, 6, 8], "current": 5, "fresh_label": 5, "get_label_div_by_zero": 5, "python": [6, 14], "orient": [6, 14], "non": [6, 11, 12, 14], "grapherror": 6, "messag": 6, "rais": 6, "self": 6, "loop": 6, "generalgraph": 6, "graph_dict": 6, "regroup": 6, "similar": 6, "between": 6, "direct": 6, "onli": [6, 11], "how": 6, "delet": 6, "vertex": 6, "color": 6, "undirect": 6, "vertic": 6, "add_vertex": 6, "If": [6, 7], "kei": [6, 8], "empti": 6, "valu": [6, 7, 8], "otherwis": [6, 11], "noth": [6, 7], "ha": [6, 8], "dfs_travers": 6, "root": 6, "depth": 6, "search": [6, 14], "is_reachable_from": 6, "v1": 6, "v2": 6, "true": [6, 8, 11, 12], "path": [6, 7], "connected_compon": 6, "connect": 6, "compon": 6, "being": 6, "vetic": 6, "bfs_travers": 6, "breadth": 6, "static": 6, "method": [6, 8], "appear": [6, 14], "twice": 6, "dictionnari": [6, 9], "tupl": 6, "pair": 6, "c": [6, 10], "g": 6, "delete_vertex": 6, "adjac": 6, "delete_edg": 6, "unlimit": 6, "number": [6, 8], "integ": [6, 7, 8], "0": [6, 8], "1": 6, "color_with_k_color": 6, "k": 6, "avoidingnod": 6, "unspecifi": 6, "3": [6, 11, 14], "boolean": 6, "succeed": 6, "belong": 6, "continu": 6, "even": 6, "algo": 6, "digraph": 6, "neighbourhood": 6, "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], "conditionaljump": [7, 11, 12], "also": [7, 8], "relev": 7, "must": [7, 8], "either": [7, 8], "happen": 7, "get_instruct": 7, "add_label": 7, "": [7, 8], "add_com": 7, "add_instruction_println_int": 7, "reg": 7, "dataloc": [7, 8, 9], "newlin": 7, "expand": 7, "text": 7, "subclass": 8, "condit": [8, 10, 11, 12], "address": [8, 11, 14], "immedi": [8, 10], "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, "negat": 8, "opposit": 8, "place": 8, "physic": 8, "zero": 8, "ra": 8, "sp": 8, "gp": 8, "cours": 8, "tp": 8, "a0": 8, "a1": 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, "t": [8, 14], "t0": 8, "t1": 8, "t2": 8, "t3": 8, "t4": 8, "t5": 8, "t6": 8, "frame": 8, "pointer": 8, "save": 8, "gp_reg": 8, "usabl": 8, "basereg": 8, "val": 8, "been": 8, "later": 8, "get_alloced_loc": 8, "manag": 8, "get_all_temp": 8, "add_tmp": 8, "give": [8, 14], "other": [8, 11], "typic": 8, "type": 8, "enforc": 8, "check": 8, "inde": 8, "renam": [8, 9, 11, 12], "copi": 8, "\u03c6": 9, "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, "var": 9, "reli": 9, "preced": 9, "temp_i": 9, "previou": 9, "rename_from": 9, "printin": [9, 11, 12], "stream": [9, 11, 12], "never": [9, 11, 12], "mif08": [10, 12], "uncondit": 10, "conditional_jump": 10, "op1": [10, 11, 12], "cond": [10, 11, 12], "op2": [10, 11, 12], "wrapper": 10, "around": 10, "bge": 10, "bgt": 10, "like": 10, "eq": 10, "dr": 10, "sr1": 10, "sr2orimm7": 10, "mul": 10, "div": 10, "rem": 10, "sub": 10, "land": 10, "lor": 10, "xor": 10, "li": 10, "imm7": 10, "mv": 10, "sr": 10, "ld": 10, "mem": 10, "sd": 10, "asm": 11, "inherit": 11, "In": 11, "turn": 11, "regular": 11, "regset_to_str": 11, "registerset": 11, "pretti": 11, "written": 11, "read": 11, "substitut": [11, 12], "subst": [11, 12], "tstatement": 11, "both": [11, 12], "ins": 11, "is_read_onli": [11, 12], "destin": [11, 12], "arg": [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, "have": [12, 14], "specifi": 12, "mark": 12, "construct": 12, "jump2termin": 12, "extract": 12, "chunk": 12, "label_then": 12, "label_els": 12, "second": 12, "next_label": 12, "potenti": 12, "lib": [13, 14], "packag": 13, "submodul": 13, "modul": [13, 14], "content": 13, "risc": 14, "v": 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, "", "get_all_statements"], [2, 2, 1, "", "get_body"], [2, 2, 1, "", "get_in"], [2, 2, 1, "", "get_label"], [2, 2, 1, "", "get_terminator"], [2, 2, 1, "", "iter_statements"], [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, "", "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, "", "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"]], "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"]], "Lib.Statement.Instru3A": [[11, 2, 1, "", "args"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"]], "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"]], "Lib.Terminator": [[12, 1, 1, "", "BranchingTerminator"], [12, 1, 1, "", "Return"], [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"]], "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"]]}, "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": 6, "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": 56}}) \ 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], "cfg": [0, 3, 9, 12, 13, 14], "domin": [0, 13, 14], "error": [0, 13, 14], "functiondata": [0, 1, 2, 7, 13], "graph": [0, 2, 3, 7, 13], "linearcod": [0, 1, 5, 12, 13, 14], "operand": [0, 1, 5, 9, 10, 11, 12, 13, 14], "phinod": [0, 13, 14], "riscv": [0, 2, 5, 7, 8, 9, 11, 13, 14], "statement": [0, 2, 7, 9, 12, 13, 14], "termin": [0, 2, 13, 14], "thi": [1, 2, 3, 5, 8, 10, 11], "file": [1, 5, 7, 8], "defin": [1, 5, 8, 9, 10, 11, 14], "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], "naivealloc": 1, "fdata": [1, 2, 5, 7], "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, "replac": [1, 2, 7, 8], "all": [1, 2, 6, 8, 14], "temporari": [1, 5, 7, 8], "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], "prepar": 1, "respons": 1, "call": [1, 3, 6, 7, 8, 9, 10, 11, 12], "temporarypool": [1, 5, 8], "set_temp_alloc": [1, 8], "map": [1, 8], "from": [1, 6, 8, 11], "where": [1, 6], "thei": [1, 6], "should": [1, 6, 9, 11, 12, 14], "store": [1, 5], "regist": [1, 8], "memori": [1, 5, 8, 14], "Then": 1, "each": [1, 2, 6, 7, 9, 12, 14], "instruct": [1, 2, 7, 10, 11, 12, 14], "order": 1, "previous": [1, 3], "assign": 1, "possibli": 1, "add": [1, 2, 6, 7, 8, 10], "some": [1, 5, 7, 14], "befor": [1, 14], "after": 1, "concret": 1, "return": [1, 2, 3, 5, 6, 7, 8, 9, 12], "list": [1, 2, 6, 7, 8, 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, "iter_stat": [1, 2, 7], "none": [1, 2, 3, 6, 7, 8, 9, 11, 12], "instr": [1, 2], "transform": 1, "an": [1, 2, 3, 6, 7, 11], "rewritecod": 1, "listcod": 1, "modifi": 1, "try": 1, "fail": [1, 6], "ar": [1, 5, 6, 8, 9, 11, 12, 14], "more": 1, "than": [1, 8], "old_instr": 1, "correspond": [1, 9], "too": 1, "mani": 1, "itself": [2, 8], "block": [2, 3, 9, 12, 14], "its": [2, 3, 8, 9, 11, 14], "basic": [2, 14], "label": [2, 5, 7, 9, 10, 11, 12, 14], "inst": 2, "instru3a": [2, 7, 10, 11], "comment": [2, 7, 11], "absolutejump": [2, 7, 10, 11, 12], "branchingtermin": [2, 12], "A": [2, 6, 8, 9, 11, 12], "made": 2, "three": [2, 12], "main": 2, "part": 2, "start": 2, "uniqu": [2, 5], "identifi": [2, 9], "bodi": 2, "exclud": 2, "jump": [2, 10, 11, 12], "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, "to_dot": 2, "str": [2, 3, 5, 6, 7, 8, 11], "output": [2, 7, 9, 11, 12], "string": [2, 5, 8], "get_bodi": 2, "phi": [2, 14], "node": [2, 6, 9, 14], "nor": 2, "get_all_stat": 2, "includ": 2, "get_body_and_termin": 2, "except": [2, 4, 6], "get_label": 2, "get_in": 2, "edg": [2, 6], "consid": [2, 11], "get_termin": 2, "set_termin": 2, "term": 2, "set": [2, 3, 6, 11], "f": [2, 7], "For": [2, 7], "real": [2, 7], "given": [2, 3, 5, 7, 9, 11, 12], "assum": 2, "add_instruct": [2, 7], "complet": [2, 7], "control": 2, "flow": 2, "function": [2, 3, 5, 7, 8, 10, 11, 12, 14], "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], "get_start": 2, "set_start": 2, "get_end": 2, "add_block": 2, "blk": 2, "new": [2, 5, 7, 8], "get_block": 2, "name": [2, 5, 6, 7, 8, 9, 11], "get_entri": 2, "predecessor": [2, 6], "add_edg": [2, 6], "src": [2, 9], "dest": 2, "remove_edg": 2, "remov": 2, "out_block": 2, "target": [2, 11, 12], "gather_def": 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], "definit": 2, "appli": 2, "linearize_na": 2, "procedur": 2, "everywher": 2, "print_cod": [2, 7], "lambda": 2, "print": [2, 6, 7, 9, 11, 12], "print_dot": [2, 6, 7], "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, "computedom": 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], "printdt": 3, "displai": 3, "graphic": 3, "render": 3, "tree": 3, "computedt": 3, "dom_graph": 3, "bool": [3, 6, 8], "basenam": 3, "us": [3, 5, 6, 8, 9, 11, 12, 14], "dt": 3, "which": [3, 5, 8, 11], "children": 3, "computedf": 3, "frontier": [3, 14], "minicruntimeerror": 4, "minicinternalerror": 4, "minicunsupportederror": 4, "minictypeerror": 4, "allocationerror": 4, "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], "get_nam": 5, "fresh_tmp": [5, 8], "fresh": [5, 8, 9], "ad": [5, 6], "pool": [5, 8], "fresh_offset": 5, "offset": [5, 8], "stack": 5, "decreas": 5, "rel": 5, "fp": [5, 8], "get_offset": [5, 8], "int": [5, 6, 8], "current": 5, "fresh_label": 5, "get_label_div_by_zero": 5, "python": [6, 14], "orient": [6, 14], "non": [6, 11, 12, 14], "grapherror": 6, "messag": 6, "rais": 6, "self": 6, "loop": 6, "generalgraph": 6, "graph_dict": 6, "regroup": 6, "similar": 6, "between": 6, "direct": 6, "onli": [6, 11], "how": 6, "delet": 6, "vertex": 6, "color": 6, "undirect": 6, "vertic": 6, "add_vertex": 6, "If": 6, "kei": [6, 8], "empti": 6, "valu": [6, 7, 8], "otherwis": [6, 11], "noth": 6, "ha": [6, 8], "dfs_travers": 6, "root": 6, "depth": 6, "search": [6, 14], "is_reachable_from": 6, "v1": 6, "v2": 6, "true": [6, 8, 11, 12], "path": [6, 7], "connected_compon": 6, "connect": 6, "compon": 6, "being": 6, "vetic": 6, "bfs_travers": 6, "breadth": 6, "static": 6, "method": [6, 8], "appear": [6, 14], "twice": 6, "dictionnari": [6, 9], "tupl": 6, "pair": 6, "c": [6, 10], "g": 6, "delete_vertex": 6, "adjac": 6, "delete_edg": 6, "unlimit": 6, "number": [6, 8], "integ": [6, 7, 8], "0": [6, 8], "1": 6, "color_with_k_color": 6, "k": 6, "avoidingnod": 6, "unspecifi": 6, "3": [6, 11, 14], "boolean": 6, "succeed": 6, "belong": 6, "continu": 6, "even": 6, "algo": 6, "digraph": 6, "pred": 6, "v": [6, 14], "neighbourhood": 6, "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], "conditionaljump": [7, 11, 12], "also": [7, 8], "relev": 7, "get_instruct": 7, "add_label": 7, "": [7, 8], "add_com": 7, "add_instruction_println_int": 7, "reg": 7, "dataloc": [7, 8, 9], "newlin": 7, "expand": 7, "text": 7, "subclass": 8, "condit": [8, 10, 11, 12], "address": [8, 11, 14], "immedi": [8, 10], "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, "negat": 8, "opposit": 8, "either": 8, "place": 8, "physic": 8, "zero": 8, "ra": 8, "sp": 8, "gp": 8, "cours": 8, "tp": 8, "a0": 8, "a1": 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, "t": [8, 14], "t0": 8, "t1": 8, "t2": 8, "t3": 8, "t4": 8, "t5": 8, "t6": 8, "frame": 8, "pointer": 8, "save": 8, "gp_reg": 8, "usabl": 8, "basereg": 8, "val": 8, "been": 8, "later": 8, "get_alloced_loc": 8, "manag": 8, "get_all_temp": 8, "add_tmp": 8, "give": [8, 14], "must": 8, "other": [8, 11], "typic": 8, "type": 8, "enforc": 8, "check": 8, "inde": 8, "renam": [8, 9, 11, 12], "copi": 8, "\u03c6": 9, "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, "var": 9, "reli": 9, "preced": 9, "temp_i": 9, "previou": 9, "rename_from": 9, "printin": [9, 11, 12], "stream": [9, 11, 12], "never": [9, 11, 12], "mif08": [10, 12], "uncondit": 10, "conditional_jump": 10, "op1": [10, 11, 12], "cond": [10, 11, 12], "op2": [10, 11, 12], "wrapper": 10, "around": 10, "bge": 10, "bgt": 10, "like": 10, "eq": 10, "dr": 10, "sr1": 10, "sr2orimm7": 10, "mul": 10, "div": 10, "rem": 10, "sub": 10, "land": 10, "lor": 10, "xor": 10, "li": 10, "imm7": 10, "mv": 10, "sr": 10, "ld": 10, "mem": 10, "sd": 10, "asm": 11, "inherit": 11, "In": 11, "turn": 11, "regular": 11, "regset_to_str": 11, "registerset": 11, "pretti": 11, "written": 11, "read": 11, "substitut": [11, 12], "subst": [11, 12], "tstatement": 11, "both": [11, 12], "ins": 11, "is_read_onli": [11, 12], "destin": [11, 12], "arg": [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, "have": [12, 14], "specifi": 12, "mark": 12, "construct": 12, "jump2termin": 12, "extract": 12, "chunk": 12, "label_then": 12, "label_els": 12, "second": 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, "", "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_terminator"], [2, 2, 1, "", "iter_statements"], [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, "", "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"]], "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"]], "Lib.Statement.Instru3A": [[11, 2, 1, "", "args"], [11, 2, 1, "", "rename"], [11, 2, 1, "", "substitute"]], "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"]], "Lib.Terminator": [[12, 1, 1, "", "BranchingTerminator"], [12, 1, 1, "", "Return"], [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"]], "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"]]}, "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": 6, "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": 56}}) \ No newline at end of file