diff options
author | Aditya Kumar <aditya.k7@samsung.com> | 2015-10-06 20:50:35 +0000 |
---|---|---|
committer | Sebastian Pop <spop@gcc.gnu.org> | 2015-10-06 20:50:35 +0000 |
commit | 09fefdad6abc23aa62964bfba2a6fef12c00176b (patch) | |
tree | 927101a0a9a00af19e60cc30d02515cff1ab73fe /gcc/graphite-poly.h | |
parent | 790befae61a1f5a84ab2eded7d828c14528641ba (diff) | |
download | gcc-09fefdad6abc23aa62964bfba2a6fef12c00176b.zip gcc-09fefdad6abc23aa62964bfba2a6fef12c00176b.tar.gz gcc-09fefdad6abc23aa62964bfba2a6fef12c00176b.tar.bz2 |
move dr->alias_set to a helper structure
2015-10-06 Aditya Kumar <aditya.k7@samsung.com>
Sebastian Pop <s.pop@samsung.com>
* graphite-poly.c (new_scop): Initialize drs.
* graphite-poly.h (struct dr_info): New.
(struct scop): Add drs.
* graphite-sese-to-poly.c (pdr_add_alias_set): Use dr_info.
(pdr_add_memory_accesses): Same.
(build_poly_dr): Same.
(build_alias_set): Same.
(build_scop_drs): Same.
(build_pbb_drs): Remove.
* tree-data-ref.c (create_data_ref): Do not initialize alias_set.
* tree-data-ref.h (data_reference): Remove alias_set.
Co-Authored-By: Sebastian Pop <s.pop@samsung.com>
From-SVN: r228545
Diffstat (limited to 'gcc/graphite-poly.h')
-rw-r--r-- | gcc/graphite-poly.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 418af6e..37a1755 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -366,6 +366,42 @@ pbb_set_black_box (poly_bb_p pbb, gimple_poly_bb_p black_box) pbb->black_box = black_box; } +/* A helper structure to keep track of data references, polyhedral BBs, and + alias sets. */ + +struct dr_info +{ + /* The data reference. */ + data_reference_p dr; + + /* ALIAS_SET is the SCC number assigned by a graph_dfs of the alias graph. -1 + is an invalid alias set. */ + int alias_set; + + /* The polyhedral BB containing this DR. */ + poly_bb_p pbb; + + /* Construct a DR_INFO from a data reference DR, an ALIAS_SET, and a PBB. */ + dr_info (data_reference_p dr, int alias_set, poly_bb_p pbb) + : dr (dr), alias_set (alias_set), pbb (pbb) {} + + /* A simpler constructor to be able to push these objects in a vec. */ + dr_info (int i) : dr (NULL), alias_set (-1), pbb (NULL) + { + gcc_assert (i == 0); + } + + /* Assignment operator, to be able to iterate over a vec of these objects. */ + const dr_info & + operator= (const dr_info &p) + { + dr = p.dr; + alias_set = p.alias_set; + pbb = p.pbb; + return *this; + } +}; + /* A SCOP is a Static Control Part of the program, simple enough to be represented in polyhedral form. */ struct scop @@ -381,6 +417,9 @@ struct scop representation. */ vec<poly_bb_p> bbs; + /* All the data references in this scop. */ + vec<dr_info> drs; + /* The context describes known restrictions concerning the parameters and relations in between the parameters. |