Data Structures | |
class | ARCHITECTURE |
class | DAG |
This class represents a directed acyclic graph (DAG). More... | |
class | IllegalAccessNode |
class | InvalidISADesc |
class | BadIODDG |
class | BadRegType |
class | BadInstructionType |
class | NonUniqueRegisterType |
class | IllegalDependance |
class | NonUniqueNodeID |
class | INFO_EDGE |
This class represents the attributes (information) attached to an edge in a DDG. More... | |
class | INFO_NODE |
This class represents the attributes (information) attached to each node in a DDG. More... | |
class | INSTRUCTIONS_TYPES |
This class describes a generic instruction, used by the class ARCHITECTURE to describe an ISA. A generic instruction object contains opcode, unique id per opcode, string opcode, list of writtent registers, list of written register types, etc. More... | |
class | LOOP |
This class represent cyclic data dependence graphs of simple loops (without branches). More... | |
class | REGISTER_TYPES |
class | CBC |
class | EN |
Enumerations | |
enum | edge_type { flowdep_reg = 1, antidep_reg, outputdep_reg, inputdep_reg, flowdep_mem, antidep_mem, outputdep_mem, inputdep_mem, spilldep_mem, other_mem, serial, killerdep, reusedep } |
Edges corresponds to data dependences. Data dependences are classified into multiple types : flowdep_reg, antidep_reg, outputdep_reg, inputdep_reg, flowdep_mem, etc. More... | |
enum | NodeFlag { NodeFlag_Nothing = 0x0, NodeFlag_PartialDef = 0x1, NodeFlag_SpillCode = 0x2, NodeFlag_Volatile = 0x4, NodeFlag_SPUpdate = 0x8, NodeFlag_Prefetch = 0x10, NodeFlag_Preload = 0x20, NodeFlag_Barrier = 0x40, NodeFlag_Clobber = 0x80, NodeFlag_Hoisted = 0x100, NodeFlag_DeadCode = 0x200, NodeFlag_SafeAccess = 0x800, NodeFlag_SafePerfs = 0x1000, NodeFlag_EntryCode = 0x4000, NodeFlag_ExitCode = 0x8000, NodeFlag_KillOp = 0x5000 } |
Nodes may have some flag representing, special nodes. If a node corresponds to a regular instruction, then its flag is NodeFlag_Nothing. More... | |
Functions | |
template<class T> | |
LEDA::list< T > | set_to_list (const set< T > l) |
template<class T> | |
set< T > | list_to_set (const list< T > l) |
bool | lt (node u, node v) |
bool | le (node u, node v) |
bool | gt (node u, node v) |
bool | ge (node u, node v) |
bool | parallel (node u, node v) |
bool | comparable (node u, node v) |
int | MAXIMAL_ANTI_CHAIN (const graph &G, set< node > &MA) |
int | MINIMAL_CHAIN (const graph &G, node_array< int > &chain) |
int | MINIMAL_CHAIN (const DAG &G, array< list< node > > &C) |
int | REGISTER_SATURATION (const DAG &G, leda::list< node > &RS_values) |
int | REGISTER_SATURATION (const DAG &G, leda::list< node > &RS_values, node_array< node > &k) |
int | REGISTER_SATURATION (const DAG &G, int t, leda::list< node > &RS_values) |
int | REGISTER_SATURATION (const DAG &G, int t, leda::list< node > &RS_values, node_array< node > &k) |
std::string | edge_type_to_string (const edge_type) |
Convert an edge_type to string ("flow", "serial", "antidep", ...). | |
edge_type | string_to_edge_type (const std::string) |
Convert a string to an edge_type. | |
void | unroll (const LOOP &L, DAG &unrolled, int unroll_degree) |
Returns the body of the unrolled loop. | |
void | unroll (const LOOP &L, LOOP &unrolled, int unroll_degree) |
Returns an unrolled loop. | |
void | loop_merge (const LOOP &L1, const LOOP &L2, LOOP &L3) |
Merges two independent loop DDGs in order to produce a new DDG. | |
bool | retime_ddg (LOOP &G, LEDA::node_array< int > &r) |
Computes and applies a valid loop retiming (called also loop shifing). | |
bool | retime_ddg (LOOP &G) |
Computes and applies a valid loop retiming (called also loop shifing). | |
bool | apply_retiming (LOOP &G, const LEDA::node_array< int > r) |
Applies the loop retiming given as input. | |
bool | is_lexicographic_positive (LOOP &G, leda::list< edge > &le) |
Checks if all circuits of ![]() ![]() ![]() ![]() |
enum typedef enum edge_type |
Edges corresponds to data dependences. Data dependences are classified into multiple types : flowdep_reg, antidep_reg, outputdep_reg, inputdep_reg, flowdep_mem, etc.
flowdep_reg | |
antidep_reg | |
outputdep_reg | |
inputdep_reg | |
flowdep_mem | |
antidep_mem | |
outputdep_mem | |
inputdep_mem | |
spilldep_mem | |
other_mem | |
serial | |
killerdep | |
reusedep |
Definition at line 50 of file info_edge.h.
enum typedef enum NodeFlag |
Nodes may have some flag representing, special nodes. If a node corresponds to a regular instruction, then its flag is NodeFlag_Nothing.
Definition at line 51 of file info_node.h.
bool apply_retiming | ( | LOOP & | G, | |
const LEDA::node_array< int > | r | |||
) |
Applies the loop retiming given as input.
[in,out] | G | The loop to retime (modified by the loop retiming) |
[in] | r | the input retiming given by the user. |
false if the input retiming is not valid (in case of the presence of a nonpositive retimed edge distance).
For more details about loop retiming, please study the excellent research article of Leiserson and Saxe published in Algorithmica 1991 (Retiming asynchronous circuits).
bool comparable | ( | node | u, | |
node | v | |||
) |
[in] | u | A first node |
[in] | v | A second node |
std::string DDG::edge_type_to_string | ( | const | edge_type | ) |
Convert an edge_type to string ("flow", "serial", "antidep", ...).
bool ge | ( | node | u, | |
node | v | |||
) |
[in] | u | A first node |
[in] | v | A second node |
bool gt | ( | node | u, | |
node | v | |||
) |
[in] | u | A first node |
[in] | v | A second node |
is_lexicographic_positive | ( | LOOP & | G, | |
leda::list< edge > & | le | |||
) |
Checks if all circuits of are lexicographic positive. That is,
a circuit in
,
.
[in] | G | The loop check |
[out] | le | A list of a delinquent circuit ![]() ![]() |
bool le | ( | node | u, | |
node | v | |||
) |
[in] | u | A first node |
[in] | v | A second node |
void loop_merge | ( | const LOOP & | L1, | |
const LOOP & | L2, | |||
LOOP & | L3 | |||
) |
Merges two independent loop DDGs in order to produce a new DDG.
[in] | L1 | The first DDG to consider. |
[in] | L2 | The second DDG to consider. |
[out] | L3 | A new loop consisting of merging distinct copies of L1 and L2. |
bool lt | ( | node | u, | |
node | v | |||
) |
[in] | u | A first node |
[in] | v | A second node |
int MAXIMAL_ANTI_CHAIN | ( | const graph & | G, | |
set< node > & | MA | |||
) |
[in] | G | An acyclic graph (DAG, order) |
[out] | MA | The set of nodes belonging to a maximal antichain |
int DDG::MINIMAL_CHAIN | ( | const DAG & | G, | |
array< list< node > > & | C | |||
) |
int MINIMAL_CHAIN(const DAG &G, array< list<node> > &C) This function computes a minimal chain decomposition of a DAG (an order).
[in] | G | An input DAG |
[out] | C | ![]() ![]() ![]() ![]() |
int MINIMAL_CHAIN | ( | const graph & | G, | |
node_array< int > & | chain | |||
) |
[in] | G | An acyclic graph (DAG, order) |
[out] | chain | Contains the chain number for each node of the DAG. ![]() ![]() |
bool parallel | ( | node | u, | |
node | v | |||
) |
[in] | u | A first node |
[in] | v | A second node |
int REGISTER_SATURATION | ( | const DAG & | G, | |
int | t, | |||
leda::list< node > & | RS_values, | |||
node_array< node > & | k | |||
) |
[in] | G | An input DAG |
[in] | t | A register type identifier. |
[out] | RS_values | The list of saturating values. It is proved that there exists an instruction schedule for any underlying processor constraints that make all the saturating values simultaneously alive. |
[out] | k | A valid saturating killing function. If the computed register saturation is equal to RS, then it is proved that there exists a schedule for the input DAG (for any hardware property) that requires RS registers if the killer of each value ![]() ![]() |
int REGISTER_SATURATION | ( | const DAG & | G, | |
int | t, | |||
leda::list< node > & | RS_values | |||
) |
[in] | G | A DAG |
[in] | t | A register type identifier. |
[out] | RS_values | The list of saturating values of type t. It is proved that there exists an instruction schedule for any underlying processor constraints that make all the saturating values simultaneously alive. |
int REGISTER_SATURATION | ( | const DAG & | G, | |
leda::list< node > & | RS_values, | |||
node_array< node > & | k | |||
) |
[in] | G | An input DAG |
[out] | RS_values | The list of saturating values. It is proved that there exists an instruction schedule for any underlying processor constraints that make all the saturating values simultaneously alive. |
[out] | k | A valid saturating killing function. If the computed register saturation is equal to RS, then it is proved that there exists a schedule for the input DAG (for any hardware property) that requires RS registers if the killer of each value ![]() ![]() |
a unique register type exists in the ISA.
NonUniqueRegisterType | This function implements a heuristics for computing the register saturation of the DAG (computing the optimal register saturation is an NP-complete problem). It consists of computing the maximal register need of a DAG independently of instruction schedules. Our experiments on a large set of DAGs show that our heuristics is optimal in 95% of the cases, and far from the optimal by only one register in 5% of the cases. This concept has been mathematically and experimentally validated in the follwing research article : |
int REGISTER_SATURATION | ( | const DAG & | G, | |
leda::list< node > & | RS_values | |||
) |
[in] | G | A DAG |
[out] | RS_values | The list of saturating values. It is proved that there exists an instruction schedule for any underlying processor constraints that make all the saturating values simultaneously alive. |
a unique register type exists in the ISA.
NonUniqueRegisterType | This function implements a heuristics for computing the register saturation of the DAG (computing the optimal register saturation is an NP-complete problem). It consists of computing the maximal register need of a DAG independently of instruction schedules. Our experiments on a large set of DAGs show that our heuristics is optimal in 95% of the cases, and far from the optimal by only one register in 5% of the cases. This concept has been mathematically and experimentally validated in the follwing research article : |
bool retime_ddg | ( | LOOP & | G | ) |
Computes and applies a valid loop retiming (called also loop shifing).
[in,out] | G | The loop to retime (modified by the loop retiming) |
false if no valid retiming has been found (in case of the presence of nonpositive distance cycle).
For more details about loop retiming, please study the excellent research article of Leiserson and Saxe published in Algorithmica 1991 (Retiming asynchronous circuits).
bool retime_ddg | ( | LOOP & | G, | |
LEDA::node_array< int > & | r | |||
) |
Computes and applies a valid loop retiming (called also loop shifing).
[in,out] | G | The loop to retime (modified by the loop retiming) |
[out] | r | the computed retiming. |
false if no valid retiming has been found (in case of the presence of nonpositive distance cycle).
For more details about loop retiming, please study the excellent research article of Leiserson and Saxe published in Algorithmica 1991 (Retiming asynchronous circuits).
edge_type DDG::string_to_edge_type | ( | const std::string | ) |
Convert a string to an edge_type.
void unroll | ( | const LOOP & | L, | |
LOOP & | unrolled, | |||
int | unroll_degree | |||
) |
Returns an unrolled loop.
[in] | L | The loop to be considered. Not altered by this function. |
[out] | unrolled | The resulting unrolled loop. |
[in] | unroll_degree | The degree of loop unrolling. If equal to zero, no loop unrolling is performed and the resulting loop is empty. |
void unroll | ( | const LOOP & | L, | |
DAG & | unrolled, | |||
int | unroll_degree | |||
) |
Returns the body of the unrolled loop.
[in] | L | The loop to be considered. Not altered by this function. |
[out] | unrolled | The resulting DAG (the loop body of the unrolled loop). |
[in] | unroll_degree | The degree of loop unrolling. If equal to zero, no loop unrolling is performed and the resulting DAG is empty. |