File src/plugins/built_in/abstract_objects/stub/ao_block.luadoc
Declares methods that can be invoked on a block (instance of the 'block' class)
Functions
block:get_DDG () | Returns the DDG (Data Dependency Graph) of a block |
block:get_DDG_file_path () | Prints the data dependency graph (DDG) of a block to a DOT file (paths are merged) For each path of the block, prints the corresponding DDG to a DOT file |
block:get_RecMII () | Returns the RecMII of a block RecMII is minimum initiation interval due to inter-iterations data dependencies |
block:get_asmfile () | Returns the asmfile containing a block |
block:get_first_insn () | Returns the first instruction of a block |
block:get_function () | Returns the function containing a block |
block:get_id () | Returns the identifier (ID) of a block |
block:get_imm_dominated () | Returns a table of immediate dominated blocks |
block:get_imm_dominator () | Returns the immediate dominator block |
block:get_imm_postdominated () | Returns a table of immediate post dominated blocks asmfile:compute_post_dominance should be called before using this function |
block:get_imm_postdominator () | Returns the immediate post dominator block asmfile:compute_post_dominance should be called before using this function |
block:get_last_insn () | Returns the last instruction of a block |
block:get_loop () | Returns the loop containing a block |
block:get_nbytes () | Gets the number of bytes of a block |
block:get_ninsns () | Gets the number of instructions of a block |
block:get_predecessors () | Returns a table of predecessor blocks (in the CFG) Warning: Each predecessor block will be referenced as many times as it is source of an edge to 'block'. |
block:get_project () | Returns the project containing a block |
block:get_src_file_path () | Returns path to the source file defining a block |
block:get_src_lines () | Returns minimum and maximum source lines defining a block |
block:get_successors () | Returns a table of successor blocks (in the CFG) Warning: Each successor block will be referenced as many times as it is destination of an edge from 'block'. |
block:has_instruction (insnname) | Checks if a block contains an instruction using its name |
block:instructions () | Iterates over instructions of a block |
block:is_back_edge_origin (dst) | Tests whether (block->dst) is a back edge. |
block:is_loop_entry () | Test whether a block is a loop entry |
block:is_loop_exit () | Test whether a block is a loop exit |
block:predecessors () | Iterates over predecessors of a block |
block:successors () | Iterates over successors of a block |
block:tostring () | Print "Block: |
Functions
- block:get_DDG ()
-
Returns the DDG (Data Dependency Graph) of a block
Return value:
DDG (graph) - block:get_DDG_file_path ()
-
Prints the data dependency graph (DDG) of a block to a DOT file (paths are merged) For each path of the block, prints the corresponding DDG to a DOT file
Return value:
path to the output file - block:get_RecMII ()
-
Returns the RecMII of a block RecMII is minimum initiation interval due to inter-iterations data dependencies
Return value:
RecMII (number) - block:get_asmfile ()
-
Returns the asmfile containing a block
Return value:
asmfile - block:get_first_insn ()
-
Returns the first instruction of a block
Return value:
first instruction - block:get_function ()
-
Returns the function containing a block
Return value:
a function - block:get_id ()
-
Returns the identifier (ID) of a block
Return value:
block ID (integer) - block:get_imm_dominated ()
-
Returns a table of immediate dominated blocks
Return value:
blocks table - block:get_imm_dominator ()
-
Returns the immediate dominator block
Return value:
dominator (block) - block:get_imm_postdominated ()
-
Returns a table of immediate post dominated blocks asmfile:compute_post_dominance should be called before using this function
Return value:
blocks table - block:get_imm_postdominator ()
-
Returns the immediate post dominator block asmfile:compute_post_dominance should be called before using this function
Return value:
post dominator (block) - block:get_last_insn ()
-
Returns the last instruction of a block
Return value:
last instruction - block:get_loop ()
-
Returns the loop containing a block
Return value:
a loop - block:get_nbytes ()
-
Gets the number of bytes of a block
Return value:
the number of bytes - block:get_ninsns ()
-
Gets the number of instructions of a block
Return value:
the number of instructions - block:get_predecessors ()
-
Returns a table of predecessor blocks (in the CFG) Warning: Each predecessor block will be referenced as many times as it is source of an edge to 'block'. In most cases, there is only one edge from a predecessor block to 'block'.
Return value:
blocks table - block:get_project ()
-
Returns the project containing a block
Return value:
project - block:get_src_file_path ()
-
Returns path to the source file defining a block
Return value:
path to source file (string) - block:get_src_lines ()
-
Returns minimum and maximum source lines defining a block
Return value:
min, max (ex: 18,24 if block ranges from lines 18 to 24) - block:get_successors ()
-
Returns a table of successor blocks (in the CFG) Warning: Each successor block will be referenced as many times as it is destination of an edge from 'block'. In most cases, there is only one edge from 'block' to a successor block.
Return value:
blocks table - block:has_instruction (insnname)
-
Checks if a block contains an instruction using its name
Parameters
- insnname: name of an instruction to look for
Return value:
1 if the instruction is found - block:instructions ()
-
Iterates over instructions of a block
Return value:
next instruction - block:is_back_edge_origin (dst)
-
Tests whether (block->dst) is a back edge. In other words, tests whether block is the origin of a back-edge to dst This enables to do an acyclic traversal of the CFG.
Parameters
- dst: destination block
Return value:
boolean - block:is_loop_entry ()
-
Test whether a block is a loop entry
Return value:
boolean - block:is_loop_exit ()
-
Test whether a block is a loop exit
Return value:
boolean - block:predecessors ()
-
Iterates over predecessors of a block
Return value:
previous blockSee also:
- block:successors ()
-
Iterates over successors of a block
Return value:
next blockSee also:
- block:tostring ()
-
Print "Block:
" (meta-method)