aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorAditya Kumar <aditya.k7@samsung.com>2015-12-24 16:41:57 +0000
committerSebastian Pop <spop@gcc.gnu.org>2015-12-24 16:41:57 +0000
commit1cb287721a2d556baf84dd9850870ef317edc1a9 (patch)
tree81518d888ddc03ee3062d88b582ab57231044c67 /gcc
parent402cab17fd7775cf392b1464df86ca3cc445accf (diff)
downloadgcc-1cb287721a2d556baf84dd9850870ef317edc1a9.zip
gcc-1cb287721a2d556baf84dd9850870ef317edc1a9.tar.gz
gcc-1cb287721a2d556baf84dd9850870ef317edc1a9.tar.bz2
Use const-ref instead of values for sese_l passed to functions.
gcc/ChangeLog: 2015-12-24 hiraditya <hiraditya@msn.com> * graphite-sese-to-poly.c (build_loop_iteration_domains): Use ref instead of value. * sese.c (invariant_in_sese_p_rec): Use const ref instead of value. (scalar_evolution_in_region): Same * sese.h (bb_in_region): Same (bb_in_sese_p): Same. (stmt_in_sese_p): Same. (defined_in_sese_p): Same. (loop_in_sese_p): Same. From-SVN: r231947
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog11
-rw-r--r--gcc/graphite-sese-to-poly.c2
-rw-r--r--gcc/sese.c4
-rw-r--r--gcc/sese.h14
4 files changed, 21 insertions, 10 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 1a1032d..dfd46d9 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,16 @@
2015-12-24 Aditya Kumar <aditya.k7@samsung.com>
+ * graphite-sese-to-poly.c (build_loop_iteration_domains): Use ref instead of value.
+ * sese.c (invariant_in_sese_p_rec): Use const ref instead of value.
+ (scalar_evolution_in_region): Same
+ * sese.h (bb_in_region): Same
+ (bb_in_sese_p): Same.
+ (stmt_in_sese_p): Same.
+ (defined_in_sese_p): Same.
+ (loop_in_sese_p): Same.
+
+2015-12-24 Aditya Kumar <aditya.k7@samsung.com>
+
* graphite-scop-detection.c
(scop_detection::get_nearest_dom_with_single_entry): Check l == l2.
(scop_detection::get_nearest_pdom_with_single_exit): Same.
diff --git a/gcc/graphite-sese-to-poly.c b/gcc/graphite-sese-to-poly.c
index 7992c28..a7fd5d9 100644
--- a/gcc/graphite-sese-to-poly.c
+++ b/gcc/graphite-sese-to-poly.c
@@ -465,7 +465,7 @@ build_loop_iteration_domains (scop_p scop, struct loop *loop,
{
tree nb_iters = number_of_latch_executions (loop);
- sese_l region = scop->scop_info->region;
+ const sese_l& region = scop->scop_info->region;
gcc_assert (loop_in_sese_p (loop, region));
isl_set *inner = isl_set_copy (outer);
diff --git a/gcc/sese.c b/gcc/sese.c
index 74dc4ac..b0f54de 100644
--- a/gcc/sese.c
+++ b/gcc/sese.c
@@ -523,7 +523,7 @@ set_ifsese_condition (ifsese if_region, tree condition)
when T depends on memory that may change in REGION. */
bool
-invariant_in_sese_p_rec (tree t, sese_l &region, bool *has_vdefs)
+invariant_in_sese_p_rec (tree t, const sese_l &region, bool *has_vdefs)
{
if (!defined_in_sese_p (t, region))
return true;
@@ -596,7 +596,7 @@ scev_analyzable_p (tree def, sese_l &region)
is not defined in the REGION is considered a parameter. */
tree
-scalar_evolution_in_region (sese_l &region, loop_p loop, tree t)
+scalar_evolution_in_region (const sese_l &region, loop_p loop, tree t)
{
gimple *def;
struct loop *def_loop;
diff --git a/gcc/sese.h b/gcc/sese.h
index 626a077..99df354 100644
--- a/gcc/sese.h
+++ b/gcc/sese.h
@@ -109,9 +109,9 @@ extern void free_sese_info (sese_info_p);
extern void sese_insert_phis_for_liveouts (sese_info_p, basic_block, edge, edge);
extern void build_sese_loop_nests (sese_info_p);
extern struct loop *outermost_loop_in_sese (sese_l &, basic_block);
-extern tree scalar_evolution_in_region (sese_l &, loop_p, tree);
+extern tree scalar_evolution_in_region (const sese_l &, loop_p, tree);
extern bool scev_analyzable_p (tree, sese_l &);
-extern bool invariant_in_sese_p_rec (tree, sese_l &, bool *);
+extern bool invariant_in_sese_p_rec (tree, const sese_l &, bool *);
/* Check that SESE contains LOOP. */
@@ -133,7 +133,7 @@ sese_nb_params (sese_info_p region)
EXIT blocks. */
static inline bool
-bb_in_region (basic_block bb, basic_block entry, basic_block exit)
+bb_in_region (const_basic_block bb, const_basic_block entry, const_basic_block exit)
{
/* FIXME: PR67842. */
#if 0
@@ -158,7 +158,7 @@ bb_in_region (basic_block bb, basic_block entry, basic_block exit)
EXIT blocks. */
static inline bool
-bb_in_sese_p (basic_block bb, sese_l &r)
+bb_in_sese_p (basic_block bb, const sese_l &r)
{
return bb_in_region (bb, r.entry->dest, r.exit->dest);
}
@@ -166,7 +166,7 @@ bb_in_sese_p (basic_block bb, sese_l &r)
/* Returns true when STMT is defined in REGION. */
static inline bool
-stmt_in_sese_p (gimple *stmt, sese_l &r)
+stmt_in_sese_p (gimple *stmt, const sese_l &r)
{
basic_block bb = gimple_bb (stmt);
return bb && bb_in_sese_p (bb, r);
@@ -175,7 +175,7 @@ stmt_in_sese_p (gimple *stmt, sese_l &r)
/* Returns true when NAME is defined in REGION. */
static inline bool
-defined_in_sese_p (tree name, sese_l &r)
+defined_in_sese_p (tree name, const sese_l &r)
{
return stmt_in_sese_p (SSA_NAME_DEF_STMT (name), r);
}
@@ -183,7 +183,7 @@ defined_in_sese_p (tree name, sese_l &r)
/* Returns true when LOOP is in REGION. */
static inline bool
-loop_in_sese_p (struct loop *loop, sese_l &region)
+loop_in_sese_p (struct loop *loop, const sese_l &region)
{
return (bb_in_sese_p (loop->header, region)
&& bb_in_sese_p (loop->latch, region));