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
This commit is contained in:
parent
402cab17fd
commit
1cb287721a
@ -1,3 +1,14 @@
|
||||
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
|
||||
|
@ -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);
|
||||
|
@ -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 ®ion, bool *has_vdefs)
|
||||
invariant_in_sese_p_rec (tree t, const sese_l ®ion, bool *has_vdefs)
|
||||
{
|
||||
if (!defined_in_sese_p (t, region))
|
||||
return true;
|
||||
@ -596,7 +596,7 @@ scev_analyzable_p (tree def, sese_l ®ion)
|
||||
is not defined in the REGION is considered a parameter. */
|
||||
|
||||
tree
|
||||
scalar_evolution_in_region (sese_l ®ion, loop_p loop, tree t)
|
||||
scalar_evolution_in_region (const sese_l ®ion, loop_p loop, tree t)
|
||||
{
|
||||
gimple *def;
|
||||
struct loop *def_loop;
|
||||
|
14
gcc/sese.h
14
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 ®ion)
|
||||
loop_in_sese_p (struct loop *loop, const sese_l ®ion)
|
||||
{
|
||||
return (bb_in_sese_p (loop->header, region)
|
||||
&& bb_in_sese_p (loop->latch, region));
|
||||
|
Loading…
Reference in New Issue
Block a user