aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/gcc-interface/utils.c
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2015-05-26 19:40:18 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2015-05-26 19:40:18 +0000
commit241125b2a1e4d1a694cd54c20ce2d7d5304448b3 (patch)
tree327efcc70b8f4f364b4effa1ab951f534b11e419 /gcc/ada/gcc-interface/utils.c
parent7194767cdf77212e8c736f41b426e3f636f52ca3 (diff)
downloadgcc-241125b2a1e4d1a694cd54c20ce2d7d5304448b3.zip
gcc-241125b2a1e4d1a694cd54c20ce2d7d5304448b3.tar.gz
gcc-241125b2a1e4d1a694cd54c20ce2d7d5304448b3.tar.bz2
ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete
* gcc-interface/ada-tree.h (DECL_GLOBAL_NONCONSTANT_RENAMING_P): Delete (DECL_RENAMED_OBJECT): Adjust comment. * gcc-interface/gigi.h (record_global_nonconstant_renaming): Delete. (invalidate_global_nonconstant_renamings): Likewise. (gnat_constant_reference_p): Likewise. (rewrite_fn): New function type. (gnat_rewrite_reference): Declare. (call_is_atomic_load): New inline predicate. * gcc-interface/decl.c (elaborate_reference_1): New function. (elaborate_reference): Likewise. (gnat_to_gnu_entity): Call elaborate_reference to elaborate renamings and simplify associated code. Set const_flag to true consistently in conjunction with used_by_ref. * gcc-interface/trans.c (Identifier_to_gnu): Always replace renaming pointers by renamed objects. (outer_atomic_access_required_p): Deal with renamings. (Compilation_Unit_to_gnu): Do not call invalidate_global_nonconstant_renamings. (gnat_to_gnu) <N_Object_Renaming_Declaration>: Adjust comment. (gnat_gimplify_expr): Deal with atomic loads. * gcc-interface/utils.c (global_nonconstant_renamings): Delete. (destroy_gnat_utils): Do not call invalidate_global_nonconstant_renamings. (record_global_nonconstant_renaming): Delete. (invalidate_global_nonconstant_renamings): Likewise. * gcc-interface/utils2.c (call_is_atomic_load): Move to gigi.h. (build_load_modify_store): Build a copy of the destination. (gnat_stabilize_reference_1): Adjust. (gnat_stabilize_reference): Call gnat_stabilize_reference_1 through gnat_rewrite_reference and move bulk of code to... (gnat_rewrite_reference): ...here. New global function. (gnat_constant_reference_p): Delete. From-SVN: r223709
Diffstat (limited to 'gcc/ada/gcc-interface/utils.c')
-rw-r--r--gcc/ada/gcc-interface/utils.c33
1 files changed, 0 insertions, 33 deletions
diff --git a/gcc/ada/gcc-interface/utils.c b/gcc/ada/gcc-interface/utils.c
index 291e824..f984098 100644
--- a/gcc/ada/gcc-interface/utils.c
+++ b/gcc/ada/gcc-interface/utils.c
@@ -233,9 +233,6 @@ static GTY(()) vec<tree, va_gc> *global_decls;
/* An array of builtin function declarations. */
static GTY(()) vec<tree, va_gc> *builtin_decls;
-/* An array of global non-constant renamings. */
-static GTY(()) vec<tree, va_gc> *global_nonconstant_renamings;
-
/* A chain of unused BLOCK nodes. */
static GTY((deletable)) tree free_block_chain;
@@ -322,9 +319,6 @@ destroy_gnat_utils (void)
/* Destroy the hash table of padded types. */
pad_type_hash_table->empty ();
pad_type_hash_table = NULL;
-
- /* Invalidate the global non-constant renamings. */
- invalidate_global_nonconstant_renamings ();
}
/* GNAT_ENTITY is a GNAT tree node for an entity. Associate GNU_DECL, a GCC
@@ -2717,33 +2711,6 @@ process_attributes (tree *node, struct attrib **attr_list, bool in_place,
*attr_list = NULL;
}
-
-/* Record DECL as a global non-constant renaming. */
-
-void
-record_global_nonconstant_renaming (tree decl)
-{
- gcc_assert (!DECL_LOOP_PARM_P (decl) && DECL_RENAMED_OBJECT (decl));
- vec_safe_push (global_nonconstant_renamings, decl);
-}
-
-/* Invalidate the global non-constant renamings, lest their renamed object
- contains SAVE_EXPRs tied to an elaboration routine. */
-
-void
-invalidate_global_nonconstant_renamings (void)
-{
- unsigned int i;
- tree iter;
-
- if (global_nonconstant_renamings == NULL)
- return;
-
- FOR_EACH_VEC_ELT (*global_nonconstant_renamings, i, iter)
- SET_DECL_RENAMED_OBJECT (iter, NULL_TREE);
-
- vec_free (global_nonconstant_renamings);
-}
/* Return true if VALUE is a known to be a multiple of FACTOR, which must be
a power of 2. */