class documentation

Block that defined another scope within. E.g, def foo(): ---> ParentScopeBlock x = 1 ---> RawBasicBlock

Method __init__ Undocumented
Method apply_transform Undocumented
Method enumerate Undocumented
Method fill_conditions Fill all the block with a list of conditions to reach. Solve for backward simple data flow equation: cond(n) = (&=cond(m)) | split_edge(m) where m is pred(n)
Method fill_df Undocumented
Method fill_dominates solving the data flow equations Dom(n) = {n} | (&=Dom(m)) where m = preds(n)
Method fill_idom fill `idom` and `rev_idom` of all blocks. This essentially build the dominator tree.
Method get_code_to_analyse Undocumented
Method rename Undocumented
Instance Variable ast_node Undocumented
Instance Variable blocks Undocumented
Instance Variable counter Undocumented
Instance Variable locals Undocumented
Instance Variable phi_stub_block Undocumented
Instance Variable rev_dom_list Undocumented
Instance Variable scope_name Undocumented
Instance Variable var_version_list Undocumented

Inherited from RawBasicBlock:

Class Method from_list Undocumented
Method __repr__ Undocumented
Method cleanup_code remove all target from var_version_list (stack). Typically used in renaming when back up of node happen. :return: None
Method fill_phi Undocumented
Method get_conditions_from_prev Return the conditions from the immediate predecessor. A / B C Calling this method on block B will return the condition to enter B from A. Return a sets of condition.
Method get_num_of_parents Undocumented
Method get_phi_functions Undocumented
Method has_phi Undocumented
Method insert_doms insert dom_blk such that dom_blks is dominating self
Method insert_phi Insert into phi variables if it does not exist
Method recompute_liveout recompute the liveout of this block :return: True if changed, False if not changed
Constant BLOCK_IF Undocumented
Constant BLOCK_WHILE Undocumented
Constant IS_FALSE_BLOCK Undocumented
Constant IS_TRUE_BLOCK Undocumented
Instance Variable block_end_code Undocumented
Instance Variable block_end_type Undocumented
Instance Variable cond_prompt_cache Undocumented
Instance Variable cond_requirements Undocumented
Instance Variable conditions Undocumented
Instance Variable df Undocumented
Instance Variable end_line Undocumented
Instance Variable idom Undocumented
Instance Variable live_out Undocumented
Instance Variable name Undocumented
Instance Variable nxt_block_list Undocumented
Instance Variable parent_node Undocumented
Instance Variable phi Undocumented
Instance Variable prev_block_list Undocumented
Instance Variable rev_idom Undocumented
Instance Variable scope Undocumented
Instance Variable ssa_code Undocumented
Instance Variable start_line Undocumented
Instance Variable ue_var Undocumented
Instance Variable var_kill Undocumented
Instance Variable _phi_repr Undocumented
def __init__(self, start_line=None, end_line=None, name=None, block_end_type=None, stack_dict=None, counter_dict=None, scope_name='', parent_node=None, ast_node=None): (source)
def apply_transform(self): (source)

Undocumented

def enumerate(self, cfg_instance=None): (source)
def fill_conditions(self): (source)

Fill all the block with a list of conditions to reach. Solve for backward simple data flow equation: cond(n) = (&=cond(m)) | split_edge(m) where m is pred(n) !. Gather all prev into a list. 2. Cancel all get_conditions_from_prev() from the list and record whatever left. 3. Intersect the list and add with the leftover.

def fill_df(self, block_list): (source)

Undocumented

def fill_dominates(self): (source)

solving the data flow equations Dom(n) = {n} | (&=Dom(m)) where m = preds(n)

def fill_idom(self): (source)

fill `idom` and `rev_idom` of all blocks. This essentially build the dominator tree.

def get_code_to_analyse(self): (source)
def rename(self): (source)

Undocumented

ast_node = (source)

Undocumented

blocks = (source)

Undocumented

counter = (source)

Undocumented

locals = (source)

Undocumented

phi_stub_block = (source)

Undocumented

rev_dom_list = (source)
scope_name = (source)

Undocumented

var_version_list = (source)

Undocumented