From 899ca90e6defb9d63e03764ceb9afe0fc94fbdb1 Mon Sep 17 00:00:00 2001 From: Richard Sandiford Date: Fri, 18 Nov 2016 10:03:12 +0000 Subject: Add SET_DECL_MODE This may no longer be necessary with the current version of the SVE patches, but it does at least make things consistent with the TYPE_MODE/SET_TYPE_MODE split. gcc/ada/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * gcc-interface/utils.c (create_label_decl): Use SET_DECL_MODE. gcc/c/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * c-decl.c (merge_decls): Use SET_DECL_MODE. (make_label, finish_struct): Likewise. gcc/cp/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * class.c (finish_struct_bits): Use SET_DECL_MODE. (build_base_field_1, layout_class_type, finish_struct_1): Likewise. * decl.c (make_label_decl): Likewise. * pt.c (tsubst_decl): Likewise. gcc/fortran/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * trans-common.c (build_common_decl): Use SET_DECL_MODE. * trans-decl.c (gfc_build_label_decl): Likewise. * trans-types.c (gfc_get_array_descr_info): Likewise. gcc/lto/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * lto.c (offload_handle_link_vars): Use SET_DECL_MODE. gcc/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * tree.h (SET_DECL_MODE): New macro. * cfgexpand.c (avoid_deep_ter_for_debug): Use SET_DECL_MODE. (expand_gimple_basic_block): Likewise. * function.c (split_complex_args): Likeise. * ipa-prop.c (ipa_modify_call_arguments): Likewise. * omp-simd-clone.c (ipa_simd_modify_stmt_ops): Likewise. * stor-layout.c (layout_decl, relayout_decl): Likewise. (finish_bitfield_representative): Likewise. * tree.c (make_node_stat): Likewise. * tree-inline.c (remap_ssa_name): Likewise. (tree_function_versioning): Likewise. * tree-into-ssa.c (rewrite_debug_stmt_uses): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Likewise. * tree-ssa-ccp.c (optimize_atomic_bit_test_and): Likewise. * tree-ssa-loop-ivopts.c (remove_unused_ivs): Likewise. * tree-ssa.c (insert_debug_temp_for_var_def): Likewise. * tree-streamer-in.c (unpack_ts_decl_common_value_fields): Likewise. * varasm.c (make_debug_expr_from_rtl): Likewise. libcc1/ 2016-11-16 Richard Sandiford Alan Hayward David Sherwood * plugin.cc (plugin_build_add_field): Use SET_DECL_MODE. Co-Authored-By: Alan Hayward Co-Authored-By: David Sherwood From-SVN: r242585 --- gcc/stor-layout.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'gcc/stor-layout.c') diff --git a/gcc/stor-layout.c b/gcc/stor-layout.c index f904d75..9f8efcb 100644 --- a/gcc/stor-layout.c +++ b/gcc/stor-layout.c @@ -616,7 +616,7 @@ layout_decl (tree decl, unsigned int known_align) DECL_UNSIGNED (decl) = TYPE_UNSIGNED (type); if (DECL_MODE (decl) == VOIDmode) - DECL_MODE (decl) = TYPE_MODE (type); + SET_DECL_MODE (decl, TYPE_MODE (type)); if (DECL_SIZE (decl) == 0) { @@ -682,7 +682,7 @@ layout_decl (tree decl, unsigned int known_align) && (known_align == 0 || known_align >= xalign)) { SET_DECL_ALIGN (decl, MAX (xalign, DECL_ALIGN (decl))); - DECL_MODE (decl) = xmode; + SET_DECL_MODE (decl, xmode); DECL_BIT_FIELD (decl) = 0; } } @@ -776,7 +776,7 @@ void relayout_decl (tree decl) { DECL_SIZE (decl) = DECL_SIZE_UNIT (decl) = 0; - DECL_MODE (decl) = VOIDmode; + SET_DECL_MODE (decl, VOIDmode); if (!DECL_USER_ALIGN (decl)) SET_DECL_ALIGN (decl, 0); if (DECL_RTL_SET_P (decl)) @@ -1906,7 +1906,7 @@ finish_bitfield_representative (tree repr, tree field) [0, 15] HImode for a and b, [8, 23] HImode for c. */ DECL_SIZE (repr) = bitsize_int (bitsize); DECL_SIZE_UNIT (repr) = size_int (bitsize / BITS_PER_UNIT); - DECL_MODE (repr) = BLKmode; + SET_DECL_MODE (repr, BLKmode); TREE_TYPE (repr) = build_array_type_nelts (unsigned_char_type_node, bitsize / BITS_PER_UNIT); } @@ -1915,7 +1915,7 @@ finish_bitfield_representative (tree repr, tree field) unsigned HOST_WIDE_INT modesize = GET_MODE_BITSIZE (mode); DECL_SIZE (repr) = bitsize_int (modesize); DECL_SIZE_UNIT (repr) = size_int (modesize / BITS_PER_UNIT); - DECL_MODE (repr) = mode; + SET_DECL_MODE (repr, mode); TREE_TYPE (repr) = lang_hooks.types.type_for_mode (mode, 1); } -- cgit v1.1