diff options
author | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-26 10:33:36 +0000 |
---|---|---|
committer | dnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2013-03-26 10:33:36 +0000 |
commit | a63f89638edc7c3120e52faf6815bfe3e9b270e2 (patch) | |
tree | 61b7552b10852929b89f1cb93878fadffc1885c2 /gcc/tree-data-ref.c | |
parent | 9402409a6bd0d7d1f7358793f768bda3ec8a9574 (diff) | |
parent | 087a99ba8749638f86c111f776ed326b3fbd97c0 (diff) | |
download | gcc-cxx-conversion.tar.gz |
Merged revisions 196607-196608,196611-196614,196625,196629-196634,196636,196639,196645-196647,196649-196650,196654-196659,196666,196669,196671-196675,196682-196683,196694-196695,196697-196698,196700-196701,196704-196706,196709,196721-196748,196750-196751,196753,196755-196758,196762,196764-196765,196767-196771,196773-196779,196781-196784,196788-196792,196795-196797,196799-196800,196804-196807,196810-196814,196821,196823-196825,196828-196829,196831-196832,196834,196841-196842,196847-196853,196855-196856,196858,196860-196861,196864-196866,196868,196870-196872,196874,196876,196878-196879,196882,196884-196890,196896-196897,196899-196902,196954,196956-196961,196964-196965,196970,196977-196978,196981-196983,196989,197002-197005,197007,197011-197012,197016-197019,197021,197023-197025,197029-197034,197036-197042 via svnmerge from cxx-conversion
svn+ssh://gcc.gnu.org/svn/gcc/trunk
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/cxx-conversion@197098 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/tree-data-ref.c')
-rw-r--r-- | gcc/tree-data-ref.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/gcc/tree-data-ref.c b/gcc/tree-data-ref.c index ebb7f306f7f..a387d8202e6 100644 --- a/gcc/tree-data-ref.c +++ b/gcc/tree-data-ref.c @@ -4257,11 +4257,11 @@ compute_all_dependences (vec<data_reference_p> datarefs, typedef struct data_ref_loc_d { - /* Position of the memory reference. */ - tree *pos; + /* Position of the memory reference. */ + tree *pos; - /* True if the memory reference is read. */ - bool is_read; + /* True if the memory reference is read. */ + bool is_read; } data_ref_loc; @@ -4269,15 +4269,13 @@ typedef struct data_ref_loc_d true if STMT clobbers memory, false otherwise. */ static bool -get_references_in_stmt (gimple stmt, vec<data_ref_loc> *references) +get_references_in_stmt (gimple stmt, vec<data_ref_loc, va_stack> *references) { bool clobbers_memory = false; data_ref_loc ref; tree *op0, *op1; enum gimple_code stmt_code = gimple_code (stmt); - references->create (0); - /* ASM_EXPR and CALL_EXPR may embed arbitrary side effects. As we cannot model data-references to not spelled out accesses give up if they may occur. */ @@ -4348,11 +4346,12 @@ find_data_references_in_stmt (struct loop *nest, gimple stmt, vec<data_reference_p> *datarefs) { unsigned i; - vec<data_ref_loc> references; + vec<data_ref_loc, va_stack> references; data_ref_loc *ref; bool ret = true; data_reference_p dr; + vec_stack_alloc (data_ref_loc, references, 2); if (get_references_in_stmt (stmt, &references)) { references.release (); @@ -4381,11 +4380,12 @@ graphite_find_data_references_in_stmt (loop_p nest, loop_p loop, gimple stmt, vec<data_reference_p> *datarefs) { unsigned i; - vec<data_ref_loc> references; + vec<data_ref_loc, va_stack> references; data_ref_loc *ref; bool ret = true; data_reference_p dr; + vec_stack_alloc (data_ref_loc, references, 2); if (get_references_in_stmt (stmt, &references)) { references.release (); @@ -4437,7 +4437,7 @@ find_data_references_in_bb (struct loop *loop, basic_block bb, TODO: This function should be made smarter so that it can handle address arithmetic as if they were array accesses, etc. */ -static tree +tree find_data_references_in_loop (struct loop *loop, vec<data_reference_p> *datarefs) { @@ -5005,7 +5005,7 @@ create_rdg_vertices (struct graph *rdg, vec<gimple> stmts, loop_p loop) FOR_EACH_VEC_ELT (stmts, i, stmt) { - vec<data_ref_loc> references; + vec<data_ref_loc, va_stack> references; data_ref_loc *ref; struct vertex *v = &(rdg->vertices[i]); @@ -5020,6 +5020,7 @@ create_rdg_vertices (struct graph *rdg, vec<gimple> stmts, loop_p loop) if (gimple_code (stmt) == GIMPLE_PHI) continue; + vec_stack_alloc (data_ref_loc, references, 2); get_references_in_stmt (stmt, &references); FOR_EACH_VEC_ELT (references, j, ref) { |