summaryrefslogtreecommitdiff
path: root/gcc/graphite.h
diff options
context:
space:
mode:
authorgrosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-05 00:29:48 +0000
committergrosser <grosser@138bc75d-0d04-0410-961f-82ee72b054a4>2009-02-05 00:29:48 +0000
commit7f28086cba6019cf0da2f73ea1e2d28886adb7d9 (patch)
tree6683b37733710f6a5b7cdd25924143ec5da0c09d /gcc/graphite.h
parent031e0e7ff46dba8233201fae6ea80cfb66593af1 (diff)
downloadgcc-7f28086cba6019cf0da2f73ea1e2d28886adb7d9.tar.gz
2009-02-04 Tobias Grosser <grosser@fim.uni-passau.de>
* graphite.c (bb_in_sese_p, sese_build_livein_liveouts_use, sese_build_livein_liveouts_bb, sese_build_livein_liveouts, register_bb_in_sese, new_sese, free_sese): Moved. (dot_scop_1, build_scop_loop_nests, build_loop_iteration_domains, outermost_loop_in_scop, build_scop_iteration_domain, expand_scalar_variables_ssa_name, get_vdef_before_scop, limit_scops): Use bb_in_sese_p instead of bb_in_scop_p. Use loop_in_sese_p instead of loop_in_scop_p. (new_graphite_bb, gloog): Do not initialize SCOP_BBS_B. (new_scop, free_scop): Remove SCOP_LOOP2CLOOG_LOOP and SCOP_BBS_B. (scopdet_basic_block_info): Fix bug in scop detection. (new_loop_to_cloog_loop_str, hash_loop_to_cloog_loop, eq_loop_to_cloog_loop): Remove. (nb_loops_around_loop_in_scop, nb_loop ref_nb_loops): Moved here... * graphite.h (ref_nb_loops): ... from here. (struct scop): Remove bbs_b bitmap and loop2cloog_loop. (loop_domain_dim, loop_iteration_vector_dim): Remove. (SCOP_BBS_B, bb_in_scop_p, loop_in_scop_p): Removed. * testsuite/gcc.dg/graphite/scop-19.c: New git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@143947 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite.h')
-rw-r--r--gcc/graphite.h68
1 files changed, 7 insertions, 61 deletions
diff --git a/gcc/graphite.h b/gcc/graphite.h
index 76f26c8728a..1063a01110c 100644
--- a/gcc/graphite.h
+++ b/gcc/graphite.h
@@ -23,6 +23,8 @@ along with GCC; see the file COPYING3. If not see
#include "tree-data-ref.h"
+int ref_nb_loops (data_reference_p);
+
typedef struct graphite_bb *graphite_bb_p;
DEF_VEC_P(graphite_bb_p);
DEF_VEC_ALLOC_P (graphite_bb_p, heap);
@@ -216,6 +218,8 @@ gbb_loop (struct graphite_bb *gbb)
return GBB_BB (gbb)->loop_father;
}
+int nb_loops_around_gb (graphite_bb_p);
+
/* Calculate the number of loops around GB in the current SCOP. Only
works if GBB_DOMAIN is built. */
@@ -313,13 +317,11 @@ struct scop
/* A SCOP is defined as a SESE region. */
sese region;
- /* All the basic blocks in this scop. They have extra information
- attached to them, in the graphite_bb structure. */
+ /* All the basic blocks in this scop that contain memory references
+ and that will be represented as statements in the polyhedral
+ representation. */
VEC (graphite_bb_p, heap) *bbs;
- /* Set for a basic block index when it belongs to this SCOP. */
- bitmap bbs_b;
-
lambda_vector static_schedule;
/* Parameters used within the SCOP. */
@@ -349,7 +351,6 @@ struct scop
};
#define SCOP_BBS(S) S->bbs
-#define SCOP_BBS_B(S) S->bbs_b
#define SCOP_REGION(S) S->region
/* SCOP_ENTRY bb dominates all the bbs of the scop. SCOP_EXIT bb
post-dominates all the bbs of the scop. SCOP_EXIT potentially
@@ -572,59 +573,4 @@ scop_gimple_loop_depth (scop_p scop, loop_p loop)
return depth;
}
-/* Static inline function prototypes. */
-
-static inline unsigned scop_nb_params (scop_p scop);
-
-/* Returns true when BB is in SCOP. */
-
-static inline bool
-bb_in_scop_p (basic_block bb, scop_p scop)
-{
- return bitmap_bit_p (SCOP_BBS_B (scop), bb->index);
-}
-
-/* Returns true when LOOP is in SCOP. */
-
-static inline bool
-loop_in_scop_p (struct loop *loop, scop_p scop)
-{
- return (bb_in_scop_p (loop->header, scop)
- && bb_in_scop_p (loop->latch, scop));
-}
-
-/* Calculate the number of loops around LOOP in the SCOP. */
-
-static inline int
-nb_loops_around_loop_in_scop (struct loop *l, scop_p scop)
-{
- int d = 0;
-
- for (; loop_in_scop_p (l, scop); d++, l = loop_outer (l));
-
- return d;
-}
-
-/* Calculate the number of loops around GB in the current SCOP. */
-
-static inline int
-nb_loops_around_gb (graphite_bb_p gb)
-{
- return nb_loops_around_loop_in_scop (gbb_loop (gb), GBB_SCOP (gb));
-}
-
-/* Returns the dimensionality of an enclosing loop iteration domain
- with respect to enclosing SCoP for a given data reference REF. The
- returned dimensionality is homogeneous (depth of loop nest + number
- of SCoP parameters + const). */
-
-static inline int
-ref_nb_loops (data_reference_p ref)
-{
- loop_p loop = loop_containing_stmt (DR_STMT (ref));
- scop_p scop = DR_SCOP (ref);
-
- return nb_loops_around_loop_in_scop (loop, scop) + scop_nb_params (scop) + 2;
-}
-
#endif /* GCC_GRAPHITE_H */