diff options
author | Eric Botcazou <ebotcazou@adacore.com> | 2018-12-11 11:08:45 +0000 |
---|---|---|
committer | Pierre-Marie de Rodat <pmderodat@gcc.gnu.org> | 2018-12-11 11:08:45 +0000 |
commit | 13a6dfe3a1268265006628e58ec94d7d4222328d (patch) | |
tree | e7a7cc44e293595fed209fd469dc146c46db4b6b /gcc/ada/gcc-interface/trans.c | |
parent | d6a73cc353b90dbb253985aa6aba95c0d98680e6 (diff) | |
download | gcc-13a6dfe3a1268265006628e58ec94d7d4222328d.zip gcc-13a6dfe3a1268265006628e58ec94d7d4222328d.tar.gz gcc-13a6dfe3a1268265006628e58ec94d7d4222328d.tar.bz2 |
[Ada] Almost always inline init. procedure of small and simple records
2018-12-11 Eric Botcazou <ebotcazou@adacore.com>
gcc/ada/
* fe.h (Debug_Generated_Code): Declare.
* gcc-interface/gigi.h (enum inline_status_t): Rename
is_disabled to is_default, is_enabled to is_requested and add
is_prescribed.
* gcc-interface/decl.c (inline_status_for_subprog): New function.
(gnat_to_gnu_entity) <E_Subprogram_Type>: Use it to get the
inlining status of the subprogram.
* gcc-interface/trans.c (gigi): Adjust to above renaming.
(build_raise_check): Likewise.
(Compilation_Unit_to_gnu): Likewise.
(gnat_to_gnu): Likewise.
* gcc-interface/utils.c (create_subprog_decl): Likewise. Deal
with is_prescribed status by setting
DECL_DISREGARD_INLINE_LIMITS. Do not set the
DECL_NO_INLINE_WARNING_P flag if Debug_Generated_Code is true.
From-SVN: r266976
Diffstat (limited to 'gcc/ada/gcc-interface/trans.c')
-rw-r--r-- | gcc/ada/gcc-interface/trans.c | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/gcc/ada/gcc-interface/trans.c b/gcc/ada/gcc-interface/trans.c index 4c066c0..db9223e 100644 --- a/gcc/ada/gcc-interface/trans.c +++ b/gcc/ada/gcc-interface/trans.c @@ -412,7 +412,7 @@ gigi (Node_Id gnat_root, = create_subprog_decl (get_identifier ("__gnat_malloc"), NULL_TREE, build_function_type_list (ptr_type_node, sizetype, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); DECL_IS_MALLOC (malloc_decl) = 1; @@ -420,7 +420,7 @@ gigi (Node_Id gnat_root, = create_subprog_decl (get_identifier ("__gnat_free"), NULL_TREE, build_function_type_list (void_type_node, ptr_type_node, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); realloc_decl @@ -428,7 +428,7 @@ gigi (Node_Id gnat_root, build_function_type_list (ptr_type_node, ptr_type_node, sizetype, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); /* This is used for 64-bit multiplication with overflow checking. */ @@ -437,7 +437,7 @@ gigi (Node_Id gnat_root, = create_subprog_decl (get_identifier ("__gnat_mulv64"), NULL_TREE, build_function_type_list (int64_type, int64_type, int64_type, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); /* Name of the _Parent field in tagged record types. */ @@ -461,21 +461,21 @@ gigi (Node_Id gnat_root, = create_subprog_decl (get_identifier ("system__soft_links__get_jmpbuf_address_soft"), NULL_TREE, build_function_type_list (jmpbuf_ptr_type, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); set_jmpbuf_decl = create_subprog_decl (get_identifier ("system__soft_links__set_jmpbuf_address_soft"), NULL_TREE, build_function_type_list (void_type_node, jmpbuf_ptr_type, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); get_excptr_decl = create_subprog_decl (get_identifier ("system__soft_links__get_gnat_exception"), NULL_TREE, build_function_type_list (build_pointer_type (except_type_node), NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); not_handled_by_others_decl = get_identifier ("not_handled_by_others"); for (t = TYPE_FIELDS (except_type_node); t; t = DECL_CHAIN (t)) @@ -493,7 +493,7 @@ gigi (Node_Id gnat_root, (get_identifier ("__builtin_setjmp"), NULL_TREE, build_function_type_list (integer_type_node, jmpbuf_ptr_type, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); DECL_BUILT_IN_CLASS (setjmp_decl) = BUILT_IN_NORMAL; DECL_FUNCTION_CODE (setjmp_decl) = BUILT_IN_SETJMP; @@ -503,7 +503,7 @@ gigi (Node_Id gnat_root, = create_subprog_decl (get_identifier ("__builtin_update_setjmp_buf"), NULL_TREE, build_function_type_list (void_type_node, jmpbuf_ptr_type, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); DECL_BUILT_IN_CLASS (update_setjmp_buf_decl) = BUILT_IN_NORMAL; DECL_FUNCTION_CODE (update_setjmp_buf_decl) = BUILT_IN_UPDATE_SETJMP_BUF; @@ -515,14 +515,14 @@ gigi (Node_Id gnat_root, raise_nodefer_decl = create_subprog_decl (get_identifier ("__gnat_raise_nodefer_with_msg"), NULL_TREE, ftype, - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); set_exception_parameter_decl = create_subprog_decl (get_identifier ("__gnat_set_exception_parameter"), NULL_TREE, build_function_type_list (void_type_node, ptr_type_node, ptr_type_node, NULL_TREE), - NULL_TREE, is_disabled, true, true, true, false, false, NULL, Empty); + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); /* Hooks to call when entering/leaving an exception handler. */ ftype = build_function_type_list (void_type_node, ptr_type_node, NULL_TREE); @@ -530,7 +530,7 @@ gigi (Node_Id gnat_root, begin_handler_decl = create_subprog_decl (get_identifier ("__gnat_begin_handler"), NULL_TREE, ftype, NULL_TREE, - is_disabled, true, true, true, false, false, NULL, + is_default, true, true, true, false, false, NULL, Empty); /* __gnat_begin_handler is a dummy procedure. */ TREE_NOTHROW (begin_handler_decl) = 1; @@ -538,13 +538,13 @@ gigi (Node_Id gnat_root, end_handler_decl = create_subprog_decl (get_identifier ("__gnat_end_handler"), NULL_TREE, ftype, NULL_TREE, - is_disabled, true, true, true, false, false, NULL, + is_default, true, true, true, false, false, NULL, Empty); unhandled_except_decl = create_subprog_decl (get_identifier ("__gnat_unhandled_except_handler"), NULL_TREE, ftype, NULL_TREE, - is_disabled, true, true, true, false, false, NULL, + is_default, true, true, true, false, false, NULL, Empty); /* Indicate that it never returns. */ @@ -552,7 +552,7 @@ gigi (Node_Id gnat_root, reraise_zcx_decl = create_subprog_decl (get_identifier ("__gnat_reraise_zcx"), NULL_TREE, ftype, NULL_TREE, - is_disabled, true, true, true, false, false, NULL, + is_default, true, true, true, false, false, NULL, Empty); /* Dummy objects to materialize "others" and "all others" in the exception @@ -592,7 +592,7 @@ gigi (Node_Id gnat_root, tree decl = create_subprog_decl (get_identifier ("__gnat_last_chance_handler"), NULL_TREE, ftype, - NULL_TREE, is_disabled, true, true, true, false, false, NULL, + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); for (i = 0; i < (int) ARRAY_SIZE (gnat_raise_decls); i++) gnat_raise_decls[i] = decl; @@ -756,7 +756,7 @@ build_raise_check (int check, enum exception_info_kind kind) ftype = build_qualified_type (ftype, TYPE_QUAL_VOLATILE); result = create_subprog_decl (get_identifier (Name_Buffer), NULL_TREE, ftype, - NULL_TREE, is_disabled, true, true, true, false, + NULL_TREE, is_default, true, true, true, false, false, NULL, Empty); return result; @@ -6134,7 +6134,7 @@ Compilation_Unit_to_gnu (Node_Id gnat_node) = create_subprog_decl (create_concat_name (gnat_unit_entity, body_p ? "elabb" : "elabs"), NULL_TREE, void_ftype, NULL_TREE, - is_disabled, true, false, true, true, false, NULL, gnat_unit); + is_default, true, false, true, true, false, NULL, gnat_unit); struct elab_info *info; vec_safe_push (gnu_elab_proc_stack, gnu_elab_proc_decl); @@ -7144,7 +7144,7 @@ gnat_to_gnu (Node_Id gnat_node) create_subprog_decl (create_concat_name (Entity (Prefix (gnat_node)), attr == Attr_Elab_Body ? "elabb" : "elabs"), - NULL_TREE, void_ftype, NULL_TREE, is_disabled, + NULL_TREE, void_ftype, NULL_TREE, is_default, true, true, true, true, false, NULL, gnat_node); |