1 line
32 KiB
JavaScript
1 line
32 KiB
JavaScript
Search.setIndex({"docnames": ["api/Lib", "api/Lib.Allocator", "api/Lib.CFG", "api/Lib.Errors", "api/Lib.FunctionData", "api/Lib.LinearCode", "api/Lib.Operands", "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.Errors.rst", "api/Lib.FunctionData.rst", "api/Lib.LinearCode.rst", "api/Lib.Operands.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.Errors module", "Lib.FunctionData module", "Lib.LinearCode module", "Lib.Operands module", "Lib.RiscV module", "Lib.Statement module", "Lib.Terminator module", "MiniC", "Welcome to MiniC\u2019s documentation!"], "terms": {"alloc": [0, 5, 6, 10], "prepar": [0, 1, 11], "replac": [0, 1, 2, 5, 6, 8, 9, 11], "rewritecod": [0, 1, 11], "naivealloc": [0, 1, 10, 11], "cfg": [0, 9, 10, 11], "block": [0, 2, 9, 10, 11], "to_dot": [0, 2, 11], "get_bodi": [0, 2, 11], "get_all_stat": [0, 2, 11], "get_body_and_termin": [0, 2, 11], "get_label": [0, 2, 11], "get_in": [0, 2, 11], "get_termin": [0, 2, 11], "set_termin": [0, 2, 11], "get_phi": [0, 2, 11], "add_phi": [0, 2, 11], "set_phi": [0, 2, 11], "remove_all_phi": [0, 2, 11], "iter_stat": [0, 1, 2, 5, 11], "add_instruct": [0, 2, 5, 11], "fdata": [0, 1, 2, 4, 5, 11], "get_start": [0, 2, 11], "set_start": [0, 2, 11], "get_end": [0, 2, 11], "add_block": [0, 2, 11], "get_block": [0, 2, 11], "get_entri": [0, 2, 11], "add_edg": [0, 2, 11], "remove_edg": [0, 2, 11], "out_block": [0, 2, 11], "gather_def": [0, 2, 11], "linearize_na": [0, 2, 11], "print_cod": [0, 2, 5, 11], "print_dot": [0, 2, 5, 11], "error": [0, 10, 11], "minicruntimeerror": [0, 3, 10, 11], "minicinternalerror": [0, 3, 10, 11], "minicunsupportederror": [0, 3, 10, 11], "minictypeerror": [0, 3, 10, 11], "allocationerror": [0, 3, 10, 11], "functiondata": [0, 1, 2, 5, 10, 11], "get_nam": [0, 4, 11], "fresh_tmp": [0, 4, 6, 11], "fresh_offset": [0, 4, 11], "get_offset": [0, 4, 6, 11], "fresh_label": [0, 4, 11], "get_label_div_by_zero": [0, 4, 11], "linearcod": [0, 1, 4, 9, 10, 11], "get_instruct": [0, 5, 11], "add_label": [0, 5, 11], "add_com": [0, 5, 11], "add_instruction_println_int": [0, 5, 11], "operand": [0, 1, 4, 7, 8, 9, 10, 11], "condit": [0, 6, 7, 8, 9, 10, 11], "negat": [0, 6, 11], "function": [0, 2, 4, 5, 6, 7, 8, 9, 10, 11], "dataloc": [0, 5, 6, 10, 11], "regist": [0, 1, 6, 10, 11], "zero": [0, 6, 10, 11], "ra": [0, 6, 10, 11], "sp": [0, 6, 10, 11], "gp": [0, 6, 10, 11], "tp": [0, 6, 10, 11], "A": [0, 2, 6, 8, 9, 10, 11], "": [0, 5, 6, 10], "t": [0, 6, 10, 11], "a0": [0, 6, 10, 11], "a1": [0, 6, 10, 11], "fp": [0, 4, 6, 10, 11], "gp_reg": [0, 6, 10, 11], "offset": [0, 4, 6, 10, 11], "immedi": [0, 6, 7, 10, 11], "temporari": [0, 1, 4, 5, 6, 10], "get_alloced_loc": [0, 6, 11], "temporarypool": [0, 1, 4, 6, 10, 11], "get_all_temp": [0, 6, 11], "add_tmp": [0, 6, 11], "set_temp_alloc": [0, 1, 6, 11], "renam": [0, 6, 8, 9, 10, 11], "fresh": [0, 4, 6, 11], "defin": [0, 1, 4, 6, 7, 8, 11], "copi": [0, 6, 11], "riscv": [0, 2, 4, 5, 6, 8, 10, 11], "call": [0, 1, 5, 6, 7, 8, 9, 10, 11], "jump": [0, 2, 7, 8, 9, 10, 11], "conditional_jump": [0, 7, 10, 11], "add": [0, 1, 2, 5, 6, 7, 10, 11], "mul": [0, 7, 10, 11], "div": [0, 7, 10, 11], "rem": [0, 7, 10, 11], "sub": [0, 7, 10, 11], "land": [0, 7, 10, 11], "lor": [0, 7, 10, 11], "xor": [0, 7, 10, 11], "li": [0, 7, 10, 11], "mv": [0, 7, 10, 11], "ld": [0, 7, 10, 11], "sd": [0, 7, 10, 11], "statement": [0, 2, 9, 10, 11], "regset_to_str": [0, 8, 10, 11], "us": [0, 4, 6, 8, 9, 11], "substitut": [0, 8, 9, 11], "with_arg": [0, 8, 9, 11], "printin": [0, 8, 9, 11], "comment": [0, 2, 5, 8, 10, 11], "label": [0, 2, 4, 5, 7, 8, 9, 10, 11], "name": [0, 2, 4, 5, 6, 8, 11], "instruct": [0, 1, 2, 5, 7, 8, 9, 10, 11], "ins": [0, 8, 11], "is_read_onli": [0, 8, 9, 11], "arg": [0, 8, 9, 11], "instru3a": [0, 2, 5, 7, 8, 10, 11], "absolutejump": [0, 2, 5, 7, 8, 9, 10, 11], "target": [0, 2, 8, 9, 11], "conditionaljump": [0, 5, 8, 9, 10, 11], "cond": [0, 7, 8, 9, 11], "op1": [0, 7, 8, 9, 11], "op2": [0, 7, 8, 9, 11], "termin": [0, 2, 10, 11], "return": [0, 1, 2, 4, 5, 6, 8, 9, 10, 11], "branchingtermin": [0, 2, 9, 10, 11], "label_then": [0, 9, 11], "label_els": [0, 9, 11], "jump2termin": [0, 9, 10, 11], "thi": [1, 2, 4, 6, 7, 8, 9], "file": [1, 4, 5, 6], "base": [1, 2, 3, 4, 5, 6, 8, 9], "class": [1, 2, 4, 5, 6, 8, 9, 11], "na\u00efv": 1, "implement": [1, 11], "sourc": [1, 2, 3, 4, 5, 6, 7, 8, 9, 11], "object": [1, 2, 4, 5, 6, 8, 11], "gener": [1, 5, 6], "naiv": [1, 2, 11], "allinmem": 1, "smart": 1, "all": [1, 2, 6, 11], "code": [1, 2, 5, 7, 11], "actual": [1, 6], "data": [1, 6, 11], "locat": [1, 6, 8], "i": [1, 2, 4, 5, 6, 7, 8, 9], "done": 1, "two": [1, 9], "step": 1, "first": [1, 8, 9], "respons": 1, "map": [1, 6], "from": [1, 6, 8, 9], "where": [1, 8, 9], "thei": 1, "should": [1, 8, 9, 11], "store": [1, 4], "memori": [1, 4, 6, 11], "Then": 1, "each": [1, 2, 5, 9, 11], "order": 1, "previous": 1, "assign": 1, "possibli": 1, "some": [1, 4, 5, 11], "befor": [1, 11], "after": 1, "concret": 1, "list": [1, 2, 5, 6, 8, 9, 11], "origin": 1, "The": [1, 5, 6, 8, 9, 11], "iter": [1, 2, 5], "over": [1, 2, 5], "handl": 1, "transpar": 1, "none": [1, 2, 5, 6, 8, 9], "old_instr": 1, "transform": 1, "an": [1, 2, 5, 8], "listcod": 1, "modifi": 1, "try": 1, "fail": 1, "ar": [1, 4, 6, 8, 9, 11], "more": 1, "than": [1, 6], "correspond": 1, "too": 1, "mani": 1, "itself": [2, 6], "its": [2, 6, 8, 11], "basic": [2, 11], "inst": 2, "made": 2, "three": [2, 9], "main": 2, "part": 2, "start": 2, "uniqu": [2, 4], "identifi": 2, "bodi": 2, "exclud": 2, "branch": [2, 6, 8, 9], "repres": [2, 11], "final": 2, "point": [2, 11], "successor": [2, 9], "see": [2, 5], "document": 2, "further": 2, "explan": 2, "str": [2, 4, 5, 6, 8], "output": [2, 5, 8, 9], "string": [2, 4, 6], "phi": [2, 11], "node": [2, 11], "nor": 2, "includ": 2, "except": [2, 3], "edg": 2, "consid": [2, 8], "term": 2, "set": [2, 8], "\u03c6": 2, "given": [2, 4, 5, 8, 9], "remov": 2, "f": [2, 5], "For": [2, 5], "real": [2, 5], "assum": 2, "instr": 2, "complet": [2, 5], "control": 2, "flow": 2, "graph": [2, 5], "mainli": 2, "indic": 2, "entri": 2, "exit": 2, "As": 2, "linear": [2, 5], "metadata": [2, 4], "about": [2, 11], "can": 2, "found": 2, "member": [2, 5], "variabl": [2, 4, 5], "blk": 2, "new": [2, 4, 5, 6, 8, 9], "predecessor": 2, "src": 2, "dest": 2, "dict": [2, 6, 8, 9], "ani": 2, "dictionari": 2, "associ": [2, 9], "contain": [2, 4, 5], "one": [2, 6, 8, 9], "definit": 2, "appli": 2, "procedur": 2, "everywher": 2, "lambda": 2, "print": [2, 5, 8, 9], "filenam": [2, 5], "df": [2, 5], "view": [2, 5], "fals": [2, 5, 9], "well": 4, "util": [4, 5, 8], "common": 4, "differ": [4, 6], "intermedi": 4, "represent": [4, 5], "div_by_zero": 4, "usual": 4, "indirectli": 4, "through": 4, "we": [4, 6, 11], "work": [4, 11], "which": [4, 6, 8], "ad": 4, "pool": [4, 6], "stack": 4, "decreas": 4, "rel": 4, "int": [4, 6], "current": 4, "cap": [5, 7, 9], "codegener": [5, 7], "api": [5, 7, 11], "program": 5, "repeatedli": 5, "codegen": 5, "visitor": 5, "build": [5, 6, 9], "meta": 5, "inform": 5, "instanc": 5, "debug": 5, "purpos": [5, 6], "allow": [5, 6, 11], "also": [5, 6], "relev": 5, "reg": 5, "integ": [5, 6], "valu": [5, 6, 8, 9], "newlin": 5, "expand": 5, "text": 5, "path": 5, "subclass": 6, "ha": 6, "address": [6, 8, 11], "constant": 6, "yet": 6, "shortcut": 6, "optyp": 6, "e": 6, "comparison": 6, "condjump": 6, "exampl": 6, "usag": 6, "beq": [6, 7], "equal": 6, "minicpars": [6, 7], "lt": 6, "lower": 6, "constructor": 6, "argument": [6, 11], "shall": 6, "all_op": 6, "oper": 6, "gt": 6, "kei": [6, 8, 9], "opdict": 6, "method": 6, "get": 6, "opposit": 6, "either": 6, "place": 6, "number": 6, "physic": 6, "cours": 6, "a2": 6, "a3": 6, "a4": 6, "a5": 6, "a6": 6, "a7": 6, "s1": 6, "s2": 6, "s3": 6, "s4": 6, "s5": 6, "s6": 6, "s7": 6, "s8": 6, "s9": 6, "s10": 6, "s11": 6, "t0": 6, "t1": 6, "t2": 6, "t3": 6, "t4": 6, "t5": 6, "t6": 6, "frame": 6, "pointer": 6, "save": 6, "0": 6, "usabl": 6, "basereg": 6, "comput": 6, "val": 6, "been": [6, 8, 9], "It": [6, 8], "later": 6, "manag": 6, "give": [6, 11], "must": 6, "other": [6, 8], "typic": 6, "type": [6, 9], "enforc": 6, "check": 6, "inde": 6, "bool": [6, 9], "true": [6, 8, 9], "mif08": [7, 9], "uncondit": 7, "wrapper": 7, "around": 7, "bge": 7, "bgt": 7, "c": 7, "like": 7, "eq": 7, "dr": 7, "sr1": 7, "sr2orimm7": 7, "And": 7, "cannot": 7, "due": 7, "python": [7, 11], "Or": 7, "imm7": 7, "sr": 7, "mem": 7, "asm": 8, "inherit": 8, "In": 8, "turn": 8, "regular": 8, "non": [8, 9, 11], "3": [8, 11], "registerset": 8, "pretti": 8, "written": 8, "read": 8, "subst": [8, 9], "tstatement": 8, "clone": [8, 9], "appear": [8, 9, 11], "new_arg": [8, 9], "have": [8, 9, 11], "stream": [8, 9], "never": [8, 9], "both": [8, 9], "onli": 8, "otherwis": 8, "destin": [8, 9], "take": [8, 9, 11], "absolut": 8, "specif": 8, "kind": [8, 9, 11], "j": [8, 9], "librari": 9, "end": [9, 11], "There": 9, "anoth": 9, "unlik": 9, "wa": 9, "specifi": 9, "mark": 9, "dure": 9, "construct": 9, "extract": 9, "chunk": 9, "second": 9, "alia": 9, "next_label": 9, "potenti": 9, "lib": [10, 11], "packag": 10, "submodul": 10, "modul": [10, 11], "content": 10, "risc": 11, "v": 11, "These": 11, "page": 11, "variou": 11, "folder": 11, "you": 11, "edit": 11, "them": 11, "assembli": 11, "won": 11, "creat": 11, "directli": 11, "veri": 11, "often": 11, "instead": 11, "easili": 11, "standard": 11, "pseudo": 11, "At": 11, "need": 11, "orient": 11, "those": 11, "present": 11, "model": 11, "lab": 11, "4a": 11, "understand": 11, "translat": 11, "make": 11, "domin": 11, "frontier": 11, "special": 11, "phinod": 11, "index": 11, "search": 11}, "objects": {"": [[0, 0, 0, "-", "Lib"]], "Lib": [[1, 0, 0, "-", "Allocator"], [2, 0, 0, "-", "CFG"], [3, 0, 0, "-", "Errors"], [4, 0, 0, "-", "FunctionData"], [5, 0, 0, "-", "LinearCode"], [6, 0, 0, "-", "Operands"], [7, 0, 0, "-", "RiscV"], [8, 0, 0, "-", "Statement"], [9, 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.Errors": [[3, 4, 1, "", "AllocationError"], [3, 4, 1, "", "MiniCInternalError"], [3, 4, 1, "", "MiniCRuntimeError"], [3, 4, 1, "", "MiniCTypeError"], [3, 4, 1, "", "MiniCUnsupportedError"]], "Lib.FunctionData": [[4, 1, 1, "", "FunctionData"]], "Lib.FunctionData.FunctionData": [[4, 2, 1, "", "fresh_label"], [4, 2, 1, "", "fresh_offset"], [4, 2, 1, "", "fresh_tmp"], [4, 2, 1, "", "get_label_div_by_zero"], [4, 2, 1, "", "get_name"], [4, 2, 1, "", "get_offset"]], "Lib.LinearCode": [[5, 1, 1, "", "LinearCode"]], "Lib.LinearCode.LinearCode": [[5, 2, 1, "", "add_comment"], [5, 2, 1, "", "add_instruction"], [5, 2, 1, "", "add_instruction_PRINTLN_INT"], [5, 2, 1, "", "add_label"], [5, 3, 1, "", "fdata"], [5, 2, 1, "", "get_instructions"], [5, 2, 1, "", "iter_statements"], [5, 2, 1, "", "print_code"], [5, 2, 1, "", "print_dot"]], "Lib.Operands": [[6, 5, 1, "", "A"], [6, 5, 1, "", "A0"], [6, 5, 1, "", "A1"], [6, 1, 1, "", "Condition"], [6, 1, 1, "", "DataLocation"], [6, 5, 1, "", "FP"], [6, 1, 1, "", "Function"], [6, 5, 1, "", "GP"], [6, 5, 1, "", "GP_REGS"], [6, 1, 1, "", "Immediate"], [6, 1, 1, "", "Offset"], [6, 1, 1, "", "Operand"], [6, 5, 1, "", "RA"], [6, 1, 1, "", "Register"], [6, 1, 1, "", "Renamer"], [6, 5, 1, "", "S"], [6, 5, 1, "", "SP"], [6, 5, 1, "", "T"], [6, 5, 1, "", "TP"], [6, 1, 1, "", "Temporary"], [6, 1, 1, "", "TemporaryPool"], [6, 5, 1, "", "ZERO"]], "Lib.Operands.Condition": [[6, 2, 1, "", "negate"]], "Lib.Operands.Offset": [[6, 2, 1, "", "get_offset"]], "Lib.Operands.Renamer": [[6, 2, 1, "", "copy"], [6, 2, 1, "", "defined"], [6, 2, 1, "", "fresh"], [6, 2, 1, "", "replace"]], "Lib.Operands.Temporary": [[6, 2, 1, "", "get_alloced_loc"]], "Lib.Operands.TemporaryPool": [[6, 2, 1, "", "add_tmp"], [6, 2, 1, "", "fresh_tmp"], [6, 2, 1, "", "get_all_temps"], [6, 2, 1, "", "get_alloced_loc"], [6, 2, 1, "", "set_temp_allocation"]], "Lib.RiscV": [[7, 6, 1, "", "add"], [7, 6, 1, "", "call"], [7, 6, 1, "", "conditional_jump"], [7, 6, 1, "", "div"], [7, 6, 1, "", "jump"], [7, 6, 1, "", "land"], [7, 6, 1, "", "ld"], [7, 6, 1, "", "li"], [7, 6, 1, "", "lor"], [7, 6, 1, "", "mul"], [7, 6, 1, "", "mv"], [7, 6, 1, "", "rem"], [7, 6, 1, "", "sd"], [7, 6, 1, "", "sub"], [7, 6, 1, "", "xor"]], "Lib.Statement": [[8, 1, 1, "", "AbsoluteJump"], [8, 1, 1, "", "Comment"], [8, 1, 1, "", "ConditionalJump"], [8, 1, 1, "", "Instru3A"], [8, 1, 1, "", "Instruction"], [8, 1, 1, "", "Label"], [8, 1, 1, "", "Statement"], [8, 6, 1, "", "regset_to_string"]], "Lib.Statement.AbsoluteJump": [[8, 2, 1, "", "args"], [8, 3, 1, "", "ins"], [8, 3, 1, "", "label"], [8, 2, 1, "", "rename"], [8, 2, 1, "", "substitute"], [8, 2, 1, "", "targets"], [8, 2, 1, "", "with_args"]], "Lib.Statement.Comment": [[8, 3, 1, "", "comment"], [8, 2, 1, "", "printIns"]], "Lib.Statement.ConditionalJump": [[8, 2, 1, "", "args"], [8, 3, 1, "", "cond"], [8, 3, 1, "", "label"], [8, 3, 1, "", "op1"], [8, 3, 1, "", "op2"], [8, 2, 1, "", "rename"], [8, 2, 1, "", "substitute"], [8, 2, 1, "", "with_args"]], "Lib.Statement.Instru3A": [[8, 2, 1, "", "args"], [8, 2, 1, "", "rename"], [8, 2, 1, "", "substitute"], [8, 2, 1, "", "with_args"]], "Lib.Statement.Instruction": [[8, 2, 1, "", "args"], [8, 2, 1, "", "defined"], [8, 3, 1, "", "ins"], [8, 2, 1, "", "is_read_only"], [8, 2, 1, "", "printIns"], [8, 2, 1, "", "rename"], [8, 2, 1, "", "used"]], "Lib.Statement.Label": [[8, 3, 1, "", "name"], [8, 2, 1, "", "printIns"]], "Lib.Statement.Statement": [[8, 2, 1, "", "defined"], [8, 2, 1, "", "printIns"], [8, 2, 1, "", "substitute"], [8, 2, 1, "", "used"], [8, 2, 1, "", "with_args"]], "Lib.Terminator": [[9, 1, 1, "", "BranchingTerminator"], [9, 1, 1, "", "Return"], [9, 5, 1, "", "Terminator"], [9, 6, 1, "", "jump2terminator"]], "Lib.Terminator.BranchingTerminator": [[9, 2, 1, "", "args"], [9, 3, 1, "", "cond"], [9, 3, 1, "", "label_else"], [9, 3, 1, "", "label_then"], [9, 3, 1, "", "op1"], [9, 3, 1, "", "op2"], [9, 2, 1, "", "rename"], [9, 2, 1, "", "substitute"], [9, 2, 1, "", "targets"], [9, 2, 1, "", "with_args"]], "Lib.Terminator.Return": [[9, 2, 1, "", "args"], [9, 2, 1, "", "is_read_only"], [9, 2, 1, "", "printIns"], [9, 2, 1, "", "rename"], [9, 2, 1, "", "substitute"], [9, 2, 1, "", "targets"], [9, 2, 1, "", "with_args"]]}, "objtypes": {"0": "py:module", "1": "py:class", "2": "py:method", "3": "py:attribute", "4": "py:exception", "5": "py:data", "6": "py:function"}, "objnames": {"0": ["py", "module", "Python module"], "1": ["py", "class", "Python class"], "2": ["py", "method", "Python method"], "3": ["py", "attribute", "Python attribute"], "4": ["py", "exception", "Python exception"], "5": ["py", "data", "Python data"], "6": ["py", "function", "Python function"]}, "titleterms": {"lib": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "packag": 0, "submodul": 0, "modul": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9], "content": [0, 11], "alloc": [1, 11], "cfg": 2, "error": 3, "functiondata": 4, "linearcod": 5, "operand": 6, "riscv": 7, "statement": 8, "termin": 9, "minic": [10, 11], "welcom": 11, "": 11, "document": 11, "base": 11, "librari": 11, "linear": 11, "intermedi": 11, "represent": 11, "temporari": 11, "control": 11, "flow": 11, "graph": 11, "ssa": 11, "form": 11, "indic": 11, "tabl": 11}, "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.Errors module": [[3, "module-Lib.Errors"]], "Lib.FunctionData module": [[4, "module-Lib.FunctionData"]], "Lib.LinearCode module": [[5, "module-Lib.LinearCode"]], "Lib.Operands module": [[6, "module-Lib.Operands"]], "Lib.RiscV module": [[7, "module-Lib.RiscV"]], "Lib.Statement module": [[8, "module-Lib.Statement"]], "Lib.Terminator module": [[9, "module-Lib.Terminator"]], "MiniC": [[10, "minic"]], "Welcome to MiniC\u2019s documentation!": [[11, "welcome-to-minic-s-documentation"]], "Contents:": [[11, null]], "Base library": [[11, "base-library"]], "Linear Intermediate representation": [[11, "linear-intermediate-representation"]], "Temporary allocation": [[11, "temporary-allocation"]], "Control Flow Graph Intermediate representation": [[11, "control-flow-graph-intermediate-representation"]], "SSA form": [[11, "ssa-form"]], "Indices and tables": [[11, "indices-and-tables"]]}, "indexentries": {"lib": [[0, "module-Lib"]], "module": [[0, "module-Lib"], [1, "module-Lib.Allocator"], [2, "module-Lib.CFG"], [3, "module-Lib.Errors"], [4, "module-Lib.FunctionData"], [5, "module-Lib.LinearCode"], [6, "module-Lib.Operands"], [7, "module-Lib.RiscV"], [8, "module-Lib.Statement"], [9, "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"]], "allocationerror": [[3, "Lib.Errors.AllocationError"]], "lib.errors": [[3, "module-Lib.Errors"]], "minicinternalerror": [[3, "Lib.Errors.MiniCInternalError"]], "minicruntimeerror": [[3, "Lib.Errors.MiniCRuntimeError"]], "minictypeerror": [[3, "Lib.Errors.MiniCTypeError"]], "minicunsupportederror": [[3, "Lib.Errors.MiniCUnsupportedError"]], "functiondata (class in lib.functiondata)": [[4, "Lib.FunctionData.FunctionData"]], "lib.functiondata": [[4, "module-Lib.FunctionData"]], "fresh_label() (lib.functiondata.functiondata method)": [[4, "Lib.FunctionData.FunctionData.fresh_label"]], "fresh_offset() (lib.functiondata.functiondata method)": [[4, "Lib.FunctionData.FunctionData.fresh_offset"]], "fresh_tmp() (lib.functiondata.functiondata method)": [[4, "Lib.FunctionData.FunctionData.fresh_tmp"]], "get_label_div_by_zero() (lib.functiondata.functiondata method)": [[4, "Lib.FunctionData.FunctionData.get_label_div_by_zero"]], "get_name() (lib.functiondata.functiondata method)": [[4, "Lib.FunctionData.FunctionData.get_name"]], "get_offset() (lib.functiondata.functiondata method)": [[4, "Lib.FunctionData.FunctionData.get_offset"]], "lib.linearcode": [[5, "module-Lib.LinearCode"]], "linearcode (class in lib.linearcode)": [[5, "Lib.LinearCode.LinearCode"]], "add_comment() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.add_comment"]], "add_instruction() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.add_instruction"]], "add_instruction_println_int() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.add_instruction_PRINTLN_INT"]], "add_label() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.add_label"]], "fdata (lib.linearcode.linearcode attribute)": [[5, "Lib.LinearCode.LinearCode.fdata"]], "get_instructions() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.get_instructions"]], "iter_statements() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.iter_statements"]], "print_code() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.print_code"]], "print_dot() (lib.linearcode.linearcode method)": [[5, "Lib.LinearCode.LinearCode.print_dot"]], "a (in module lib.operands)": [[6, "Lib.Operands.A"]], "a0 (in module lib.operands)": [[6, "Lib.Operands.A0"]], "a1 (in module lib.operands)": [[6, "Lib.Operands.A1"]], "condition (class in lib.operands)": [[6, "Lib.Operands.Condition"]], "datalocation (class in lib.operands)": [[6, "Lib.Operands.DataLocation"]], "fp (in module lib.operands)": [[6, "Lib.Operands.FP"]], "function (class in lib.operands)": [[6, "Lib.Operands.Function"]], "gp (in module lib.operands)": [[6, "Lib.Operands.GP"]], "gp_regs (in module lib.operands)": [[6, "Lib.Operands.GP_REGS"]], "immediate (class in lib.operands)": [[6, "Lib.Operands.Immediate"]], "lib.operands": [[6, "module-Lib.Operands"]], "offset (class in lib.operands)": [[6, "Lib.Operands.Offset"]], "operand (class in lib.operands)": [[6, "Lib.Operands.Operand"]], "ra (in module lib.operands)": [[6, "Lib.Operands.RA"]], "register (class in lib.operands)": [[6, "Lib.Operands.Register"]], "renamer (class in lib.operands)": [[6, "Lib.Operands.Renamer"]], "s (in module lib.operands)": [[6, "Lib.Operands.S"]], "sp (in module lib.operands)": [[6, "Lib.Operands.SP"]], "t (in module lib.operands)": [[6, "Lib.Operands.T"]], "tp (in module lib.operands)": [[6, "Lib.Operands.TP"]], "temporary (class in lib.operands)": [[6, "Lib.Operands.Temporary"]], "temporarypool (class in lib.operands)": [[6, "Lib.Operands.TemporaryPool"]], "zero (in module lib.operands)": [[6, "Lib.Operands.ZERO"]], "add_tmp() (lib.operands.temporarypool method)": [[6, "Lib.Operands.TemporaryPool.add_tmp"]], "copy() (lib.operands.renamer method)": [[6, "Lib.Operands.Renamer.copy"]], "defined() (lib.operands.renamer method)": [[6, "Lib.Operands.Renamer.defined"]], "fresh() (lib.operands.renamer method)": [[6, "Lib.Operands.Renamer.fresh"]], "fresh_tmp() (lib.operands.temporarypool method)": [[6, "Lib.Operands.TemporaryPool.fresh_tmp"]], "get_all_temps() (lib.operands.temporarypool method)": [[6, "Lib.Operands.TemporaryPool.get_all_temps"]], "get_alloced_loc() (lib.operands.temporary method)": [[6, "Lib.Operands.Temporary.get_alloced_loc"]], "get_alloced_loc() (lib.operands.temporarypool method)": [[6, "Lib.Operands.TemporaryPool.get_alloced_loc"]], "get_offset() (lib.operands.offset method)": [[6, "Lib.Operands.Offset.get_offset"]], "negate() (lib.operands.condition method)": [[6, "Lib.Operands.Condition.negate"]], "replace() (lib.operands.renamer method)": [[6, "Lib.Operands.Renamer.replace"]], "set_temp_allocation() (lib.operands.temporarypool method)": [[6, "Lib.Operands.TemporaryPool.set_temp_allocation"]], "lib.riscv": [[7, "module-Lib.RiscV"]], "add() (in module lib.riscv)": [[7, "Lib.RiscV.add"]], "call() (in module lib.riscv)": [[7, "Lib.RiscV.call"]], "conditional_jump() (in module lib.riscv)": [[7, "Lib.RiscV.conditional_jump"]], "div() (in module lib.riscv)": [[7, "Lib.RiscV.div"]], "jump() (in module lib.riscv)": [[7, "Lib.RiscV.jump"]], "land() (in module lib.riscv)": [[7, "Lib.RiscV.land"]], "ld() (in module lib.riscv)": [[7, "Lib.RiscV.ld"]], "li() (in module lib.riscv)": [[7, "Lib.RiscV.li"]], "lor() (in module lib.riscv)": [[7, "Lib.RiscV.lor"]], "mul() (in module lib.riscv)": [[7, "Lib.RiscV.mul"]], "mv() (in module lib.riscv)": [[7, "Lib.RiscV.mv"]], "rem() (in module lib.riscv)": [[7, "Lib.RiscV.rem"]], "sd() (in module lib.riscv)": [[7, "Lib.RiscV.sd"]], "sub() (in module lib.riscv)": [[7, "Lib.RiscV.sub"]], "xor() (in module lib.riscv)": [[7, "Lib.RiscV.xor"]], "absolutejump (class in lib.statement)": [[8, "Lib.Statement.AbsoluteJump"]], "comment (class in lib.statement)": [[8, "Lib.Statement.Comment"]], "conditionaljump (class in lib.statement)": [[8, "Lib.Statement.ConditionalJump"]], "instru3a (class in lib.statement)": [[8, "Lib.Statement.Instru3A"]], "instruction (class in lib.statement)": [[8, "Lib.Statement.Instruction"]], "label (class in lib.statement)": [[8, "Lib.Statement.Label"]], "lib.statement": [[8, "module-Lib.Statement"]], "statement (class in lib.statement)": [[8, "Lib.Statement.Statement"]], "args() (lib.statement.absolutejump method)": [[8, "Lib.Statement.AbsoluteJump.args"]], "args() (lib.statement.conditionaljump method)": [[8, "Lib.Statement.ConditionalJump.args"]], "args() (lib.statement.instru3a method)": [[8, "Lib.Statement.Instru3A.args"]], "args() (lib.statement.instruction method)": [[8, "Lib.Statement.Instruction.args"]], "comment (lib.statement.comment attribute)": [[8, "Lib.Statement.Comment.comment"]], "cond (lib.statement.conditionaljump attribute)": [[8, "Lib.Statement.ConditionalJump.cond"]], "defined() (lib.statement.instruction method)": [[8, "Lib.Statement.Instruction.defined"]], "defined() (lib.statement.statement method)": [[8, "Lib.Statement.Statement.defined"]], "ins (lib.statement.absolutejump attribute)": [[8, "Lib.Statement.AbsoluteJump.ins"]], "ins (lib.statement.instruction attribute)": [[8, "Lib.Statement.Instruction.ins"]], "is_read_only() (lib.statement.instruction method)": [[8, "Lib.Statement.Instruction.is_read_only"]], "label (lib.statement.absolutejump attribute)": [[8, "Lib.Statement.AbsoluteJump.label"]], "label (lib.statement.conditionaljump attribute)": [[8, "Lib.Statement.ConditionalJump.label"]], "name (lib.statement.label attribute)": [[8, "Lib.Statement.Label.name"]], "op1 (lib.statement.conditionaljump attribute)": [[8, "Lib.Statement.ConditionalJump.op1"]], "op2 (lib.statement.conditionaljump attribute)": [[8, "Lib.Statement.ConditionalJump.op2"]], "printins() (lib.statement.comment method)": [[8, "Lib.Statement.Comment.printIns"]], "printins() (lib.statement.instruction method)": [[8, "Lib.Statement.Instruction.printIns"]], "printins() (lib.statement.label method)": [[8, "Lib.Statement.Label.printIns"]], "printins() (lib.statement.statement method)": [[8, "Lib.Statement.Statement.printIns"]], "regset_to_string() (in module lib.statement)": [[8, "Lib.Statement.regset_to_string"]], "rename() (lib.statement.absolutejump method)": [[8, "Lib.Statement.AbsoluteJump.rename"]], "rename() (lib.statement.conditionaljump method)": [[8, "Lib.Statement.ConditionalJump.rename"]], "rename() (lib.statement.instru3a method)": [[8, "Lib.Statement.Instru3A.rename"]], "rename() (lib.statement.instruction method)": [[8, "Lib.Statement.Instruction.rename"]], "substitute() (lib.statement.absolutejump method)": [[8, "Lib.Statement.AbsoluteJump.substitute"]], "substitute() (lib.statement.conditionaljump method)": [[8, "Lib.Statement.ConditionalJump.substitute"]], "substitute() (lib.statement.instru3a method)": [[8, "Lib.Statement.Instru3A.substitute"]], "substitute() (lib.statement.statement method)": [[8, "Lib.Statement.Statement.substitute"]], "targets() (lib.statement.absolutejump method)": [[8, "Lib.Statement.AbsoluteJump.targets"]], "used() (lib.statement.instruction method)": [[8, "Lib.Statement.Instruction.used"]], "used() (lib.statement.statement method)": [[8, "Lib.Statement.Statement.used"]], "with_args() (lib.statement.absolutejump method)": [[8, "Lib.Statement.AbsoluteJump.with_args"]], "with_args() (lib.statement.conditionaljump method)": [[8, "Lib.Statement.ConditionalJump.with_args"]], "with_args() (lib.statement.instru3a method)": [[8, "Lib.Statement.Instru3A.with_args"]], "with_args() (lib.statement.statement method)": [[8, "Lib.Statement.Statement.with_args"]], "branchingterminator (class in lib.terminator)": [[9, "Lib.Terminator.BranchingTerminator"]], "lib.terminator": [[9, "module-Lib.Terminator"]], "return (class in lib.terminator)": [[9, "Lib.Terminator.Return"]], "terminator (in module lib.terminator)": [[9, "Lib.Terminator.Terminator"]], "args() (lib.terminator.branchingterminator method)": [[9, "Lib.Terminator.BranchingTerminator.args"]], "args() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.args"]], "cond (lib.terminator.branchingterminator attribute)": [[9, "Lib.Terminator.BranchingTerminator.cond"]], "is_read_only() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.is_read_only"]], "jump2terminator() (in module lib.terminator)": [[9, "Lib.Terminator.jump2terminator"]], "label_else (lib.terminator.branchingterminator attribute)": [[9, "Lib.Terminator.BranchingTerminator.label_else"]], "label_then (lib.terminator.branchingterminator attribute)": [[9, "Lib.Terminator.BranchingTerminator.label_then"]], "op1 (lib.terminator.branchingterminator attribute)": [[9, "Lib.Terminator.BranchingTerminator.op1"]], "op2 (lib.terminator.branchingterminator attribute)": [[9, "Lib.Terminator.BranchingTerminator.op2"]], "printins() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.printIns"]], "rename() (lib.terminator.branchingterminator method)": [[9, "Lib.Terminator.BranchingTerminator.rename"]], "rename() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.rename"]], "substitute() (lib.terminator.branchingterminator method)": [[9, "Lib.Terminator.BranchingTerminator.substitute"]], "substitute() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.substitute"]], "targets() (lib.terminator.branchingterminator method)": [[9, "Lib.Terminator.BranchingTerminator.targets"]], "targets() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.targets"]], "with_args() (lib.terminator.branchingterminator method)": [[9, "Lib.Terminator.BranchingTerminator.with_args"]], "with_args() (lib.terminator.return method)": [[9, "Lib.Terminator.Return.with_args"]]}}) |