diff options
author | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-08 04:35:43 +0000 |
---|---|---|
committer | spop <spop@138bc75d-0d04-0410-961f-82ee72b054a4> | 2010-01-08 04:35:43 +0000 |
commit | b33d4eb4b7266604ebd053ccce1158a96ae946fa (patch) | |
tree | 68af4bfdf48fe4b2e9486fc57eab043165cd3dd5 /gcc/graphite-poly.h | |
parent | a16e83461fb77a1c53937c84c334426732d74317 (diff) | |
download | gcc-b33d4eb4b7266604ebd053ccce1158a96ae946fa.tar.gz |
Memoize memory strides per loop.
2010-01-07 Sebastian Pop <sebastian.pop@amd.com>
* graphite-interchange.c (memory_stride_in_loop): Renamed
pdr_stride_in_loop.
(memory_strides_in_loop): Renamed memory_strides_in_loop_1.
(memory_strides_in_loop): Memoize the memory strides per loop.
(lst_interchange_profitable_p): Do not initialize to zero the memory
strides.
* graphite-poly.h (struct lst): Add a field memory_strides.
(LST_LOOP_MEMORY_STRIDES): New.
(new_lst_loop): Initialize LST_LOOP_MEMORY_STRIDES to -1.
(free_lst): Clear LST_LOOP_MEMORY_STRIDES.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@155725 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/graphite-poly.h')
-rw-r--r-- | gcc/graphite-poly.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/gcc/graphite-poly.h b/gcc/graphite-poly.h index 4912801c7a1..a2969c77216 100644 --- a/gcc/graphite-poly.h +++ b/gcc/graphite-poly.h @@ -632,6 +632,9 @@ struct lst { /* A pointer to the loop that contains this node. */ lst_p loop_father; + /* The sum of all the memory strides for an LST loop. */ + Value memory_strides; + /* Loop nodes contain a sequence SEQ of LST nodes, statements contain a pointer to their polyhedral representation PBB. */ union { @@ -644,6 +647,7 @@ struct lst { #define LST_LOOP_FATHER(LST) ((LST)->loop_father) #define LST_PBB(LST) ((LST)->node.pbb) #define LST_SEQ(LST) ((LST)->node.seq) +#define LST_LOOP_MEMORY_STRIDES(LST) ((LST)->memory_strides) void scop_to_lst (scop_p); void print_lst (FILE *, lst_p, int); @@ -662,6 +666,8 @@ new_lst_loop (VEC (lst_p, heap) *seq) LST_LOOP_P (lst) = true; LST_SEQ (lst) = seq; LST_LOOP_FATHER (lst) = NULL; + value_init (LST_LOOP_MEMORY_STRIDES (lst)); + value_set_si (LST_LOOP_MEMORY_STRIDES (lst), -1); for (i = 0; VEC_iterate (lst_p, seq, i, l); i++) LST_LOOP_FATHER (l) = lst; @@ -698,6 +704,7 @@ free_lst (lst_p lst) for (i = 0; VEC_iterate (lst_p, LST_SEQ (lst), i, l); i++) free_lst (l); + value_clear (LST_LOOP_MEMORY_STRIDES (lst)); VEC_free (lst_p, heap, LST_SEQ (lst)); } |