diff options
author | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-20 15:56:14 -0600 |
---|---|---|
committer | Tuowen Zhao <ztuowen@gmail.com> | 2016-09-20 15:56:14 -0600 |
commit | 6983c09937baac3ffb7d3a45c3c5009c0eba7e6c (patch) | |
tree | b42f0f9383b40fbeb540bf51b9f11eaf6f80c990 /include/irtools.hh | |
parent | b829868dfd6cbe9da07227220856b975f33e2037 (diff) | |
download | chill-6983c09937baac3ffb7d3a45c3c5009c0eba7e6c.tar.gz chill-6983c09937baac3ffb7d3a45c3c5009c0eba7e6c.tar.bz2 chill-6983c09937baac3ffb7d3a45c3c5009c0eba7e6c.zip |
python loop & more doc
Diffstat (limited to 'include/irtools.hh')
-rw-r--r-- | include/irtools.hh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/irtools.hh b/include/irtools.hh index a3b552a..6648847 100644 --- a/include/irtools.hh +++ b/include/irtools.hh @@ -33,12 +33,41 @@ struct ir_tree_node { } }; +//! Build IR tree from the source code +/*! + * Block type node can only be leaf, i.e., there is no further stuctures inside a block allowed + * @param control + * @param parent + * @return + */ std::vector<ir_tree_node *> build_ir_tree(IR_Control *control, ir_tree_node *parent = NULL); +//! Extract statements from IR tree +/*! + * Statements returned are ordered in lexical order in the source code + * @param ir_tree + * @return + */ std::vector<ir_tree_node *> extract_ir_stmts( const std::vector<ir_tree_node *> &ir_tree); bool is_dependence_valid(ir_tree_node *src_node, ir_tree_node *dst_node, const DependenceVector &dv, bool before); +//! test data dependeces between two statements +/*! + * The first statement in parameter must be lexically before the second statement in parameter. + * Returned dependences are all lexicographically positive + * @param ir + * @param repr1 + * @param IS1 + * @param repr2 + * @param IS2 + * @param freevar + * @param index + * @param i + * @param j + * @return Dependecies between the two statements. First vector is dependencies from first to second, + * second vector is the reverse + */ std::pair<std::vector<DependenceVector>, std::vector<DependenceVector> > test_data_dependences( IR_Code *ir, const omega::CG_outputRepr *repr1, const omega::Relation &IS1, const omega::CG_outputRepr *repr2, |