]> gcc.gnu.org Git - gcc.git/commitdiff
gcc/config/*: use _P() defines from tree.h
authorBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Sat, 13 May 2023 22:38:33 +0000 (00:38 +0200)
committerBernhard Reutner-Fischer <aldot@gcc.gnu.org>
Thu, 18 May 2023 19:49:02 +0000 (21:49 +0200)
gcc/ChangeLog:

* config/aarch64/aarch64.cc (aarch64_short_vector_p): Use _P
defines from tree.h.
(aarch64_mangle_type): Ditto.
* config/alpha/alpha.cc (alpha_in_small_data_p): Ditto.
(alpha_gimplify_va_arg_1): Ditto.
* config/arc/arc.cc (arc_encode_section_info): Ditto.
(arc_is_aux_reg_p): Ditto.
(arc_is_uncached_mem_p): Ditto.
(arc_handle_aux_attribute): Ditto.
* config/arm/arm.cc (arm_handle_isr_attribute): Ditto.
(arm_handle_cmse_nonsecure_call): Ditto.
(arm_set_default_type_attributes): Ditto.
(arm_is_segment_info_known): Ditto.
(arm_mangle_type): Ditto.
* config/arm/unknown-elf.h (IN_NAMED_SECTION_P): Ditto.
* config/avr/avr.cc (avr_lookup_function_attribute1): Ditto.
(avr_decl_absdata_p): Ditto.
(avr_insert_attributes): Ditto.
(avr_section_type_flags): Ditto.
(avr_encode_section_info): Ditto.
* config/bfin/bfin.cc (bfin_handle_l2_attribute): Ditto.
* config/bpf/bpf.cc (bpf_core_compute): Ditto.
* config/c6x/c6x.cc (c6x_in_small_data_p): Ditto.
* config/csky/csky.cc (csky_handle_isr_attribute): Ditto.
(csky_mangle_type): Ditto.
* config/darwin-c.cc (darwin_pragma_unused): Ditto.
* config/darwin.cc (is_objc_metadata): Ditto.
* config/epiphany/epiphany.cc (epiphany_function_ok_for_sibcall): Ditto.
* config/epiphany/epiphany.h (ROUND_TYPE_ALIGN): Ditto.
* config/frv/frv.cc (frv_emit_movsi): Ditto.
* config/gcn/gcn-tree.cc (gcn_lockless_update): Ditto.
* config/gcn/gcn.cc (gcn_asm_output_symbol_ref): Ditto.
* config/h8300/h8300.cc (h8300_encode_section_info): Ditto.
* config/i386/i386-expand.cc: Ditto.
* config/i386/i386.cc (type_natural_mode): Ditto.
(ix86_function_arg): Ditto.
(ix86_data_alignment): Ditto.
(ix86_local_alignment): Ditto.
(ix86_simd_clone_compute_vecsize_and_simdlen): Ditto.
* config/i386/winnt-cxx.cc (i386_pe_type_dllimport_p): Ditto.
(i386_pe_type_dllexport_p): Ditto.
(i386_pe_adjust_class_at_definition): Ditto.
* config/i386/winnt.cc (i386_pe_determine_dllimport_p): Ditto.
(i386_pe_binds_local_p): Ditto.
(i386_pe_section_type_flags): Ditto.
* config/ia64/ia64.cc (ia64_encode_section_info): Ditto.
(ia64_gimplify_va_arg): Ditto.
(ia64_in_small_data_p): Ditto.
* config/iq2000/iq2000.cc (iq2000_function_arg): Ditto.
* config/lm32/lm32.cc (lm32_in_small_data_p): Ditto.
* config/loongarch/loongarch.cc (loongarch_handle_model_attribute): Ditto.
* config/m32c/m32c.cc (m32c_insert_attributes): Ditto.
* config/mcore/mcore.cc (mcore_mark_dllimport): Ditto.
(mcore_encode_section_info): Ditto.
* config/microblaze/microblaze.cc (microblaze_elf_in_small_data_p): Ditto.
* config/mips/mips.cc (mips_output_aligned_decl_common): Ditto.
* config/mmix/mmix.cc (mmix_encode_section_info): Ditto.
* config/nvptx/nvptx.cc (nvptx_encode_section_info): Ditto.
(pass_in_memory): Ditto.
(nvptx_generate_vector_shuffle): Ditto.
(nvptx_lockless_update): Ditto.
* config/pa/pa.cc (pa_function_arg_padding): Ditto.
(pa_function_value): Ditto.
(pa_function_arg): Ditto.
* config/pa/pa.h (IN_NAMED_SECTION_P): Ditto.
(TEXT_SPACE_P): Ditto.
* config/pa/som.h (MAKE_DECL_ONE_ONLY): Ditto.
* config/pdp11/pdp11.cc (pdp11_return_in_memory): Ditto.
* config/riscv/riscv.cc (riscv_in_small_data_p): Ditto.
(riscv_mangle_type): Ditto.
* config/rl78/rl78.cc (rl78_insert_attributes): Ditto.
(rl78_addsi3_internal): Ditto.
* config/rs6000/aix.h (ROUND_TYPE_ALIGN): Ditto.
* config/rs6000/darwin.h (ROUND_TYPE_ALIGN): Ditto.
* config/rs6000/freebsd64.h (ROUND_TYPE_ALIGN): Ditto.
* config/rs6000/linux64.h (ROUND_TYPE_ALIGN): Ditto.
* config/rs6000/rs6000-call.cc (rs6000_function_arg_boundary): Ditto.
(rs6000_function_arg_advance_1): Ditto.
(rs6000_function_arg): Ditto.
(rs6000_pass_by_reference): Ditto.
* config/rs6000/rs6000-logue.cc (rs6000_function_ok_for_sibcall): Ditto.
* config/rs6000/rs6000.cc (rs6000_data_alignment): Ditto.
(rs6000_set_default_type_attributes): Ditto.
(rs6000_elf_in_small_data_p): Ditto.
(IN_NAMED_SECTION): Ditto.
(rs6000_xcoff_encode_section_info): Ditto.
(rs6000_function_value): Ditto.
(invalid_arg_for_unprototyped_fn): Ditto.
* config/s390/s390-c.cc (s390_fn_types_compatible): Ditto.
(s390_vec_n_elem): Ditto.
* config/s390/s390.cc (s390_check_type_for_vector_abi): Ditto.
(s390_function_arg_integer): Ditto.
(s390_return_in_memory): Ditto.
(s390_encode_section_info): Ditto.
* config/sh/sh.cc (sh_gimplify_va_arg_expr): Ditto.
(sh_function_value): Ditto.
* config/sol2.cc (solaris_insert_attributes): Ditto.
* config/sparc/sparc.cc (function_arg_slotno): Ditto.
* config/sparc/sparc.h (ROUND_TYPE_ALIGN): Ditto.
* config/stormy16/stormy16.cc (xstormy16_encode_section_info): Ditto.
(xstormy16_handle_below100_attribute): Ditto.
* config/v850/v850.cc (v850_encode_section_info): Ditto.
(v850_insert_attributes): Ditto.
* config/visium/visium.cc (visium_pass_by_reference): Ditto.
(visium_return_in_memory): Ditto.
* config/xtensa/xtensa.cc (xtensa_multibss_section_type_flags): Ditto.

55 files changed:
gcc/config/aarch64/aarch64.cc
gcc/config/alpha/alpha.cc
gcc/config/arc/arc.cc
gcc/config/arm/arm.cc
gcc/config/arm/unknown-elf.h
gcc/config/avr/avr.cc
gcc/config/bfin/bfin.cc
gcc/config/bpf/bpf.cc
gcc/config/c6x/c6x.cc
gcc/config/csky/csky.cc
gcc/config/darwin-c.cc
gcc/config/darwin.cc
gcc/config/epiphany/epiphany.cc
gcc/config/epiphany/epiphany.h
gcc/config/frv/frv.cc
gcc/config/gcn/gcn-tree.cc
gcc/config/gcn/gcn.cc
gcc/config/h8300/h8300.cc
gcc/config/i386/i386-expand.cc
gcc/config/i386/i386.cc
gcc/config/i386/winnt-cxx.cc
gcc/config/i386/winnt.cc
gcc/config/ia64/ia64.cc
gcc/config/iq2000/iq2000.cc
gcc/config/lm32/lm32.cc
gcc/config/loongarch/loongarch.cc
gcc/config/m32c/m32c.cc
gcc/config/mcore/mcore.cc
gcc/config/microblaze/microblaze.cc
gcc/config/mips/mips.cc
gcc/config/mmix/mmix.cc
gcc/config/nvptx/nvptx.cc
gcc/config/pa/pa.cc
gcc/config/pa/pa.h
gcc/config/pa/som.h
gcc/config/pdp11/pdp11.cc
gcc/config/riscv/riscv.cc
gcc/config/rl78/rl78.cc
gcc/config/rs6000/aix.h
gcc/config/rs6000/darwin.h
gcc/config/rs6000/freebsd64.h
gcc/config/rs6000/linux64.h
gcc/config/rs6000/rs6000-call.cc
gcc/config/rs6000/rs6000-logue.cc
gcc/config/rs6000/rs6000.cc
gcc/config/s390/s390-c.cc
gcc/config/s390/s390.cc
gcc/config/sh/sh.cc
gcc/config/sol2.cc
gcc/config/sparc/sparc.cc
gcc/config/sparc/sparc.h
gcc/config/stormy16/stormy16.cc
gcc/config/v850/v850.cc
gcc/config/visium/visium.cc
gcc/config/xtensa/xtensa.cc

index 29dbacfa9171dbfaf2a8d6395239934d75233ce4..d6fc94015fa927890888065d98a1930a978058f3 100644 (file)
@@ -20474,7 +20474,7 @@ aarch64_short_vector_p (const_tree type,
 {
   poly_int64 size = -1;
 
-  if (type && TREE_CODE (type) == VECTOR_TYPE)
+  if (type && VECTOR_TYPE_P (type))
     {
       if (aarch64_sve::builtin_type_p (type))
        return false;
@@ -20914,7 +20914,7 @@ aarch64_mangle_type (const_tree type)
     return "St9__va_list";
 
   /* Half-precision floating point types.  */
-  if (TREE_CODE (type) == REAL_TYPE && TYPE_PRECISION (type) == 16)
+  if (SCALAR_FLOAT_TYPE_P (type) && TYPE_PRECISION (type) == 16)
     {
       if (TYPE_MAIN_VARIANT (type) == float16_type_node)
        return NULL;
index 1d826085198e34adff95b589f65fab6fd594f788..360b50e20d4e6117c3a10c48a4bc57c21754c71b 100644 (file)
@@ -784,10 +784,10 @@ alpha_in_small_data_p (const_tree exp)
     return false;
 
   /* COMMON symbols are never small data.  */
-  if (TREE_CODE (exp) == VAR_DECL && DECL_COMMON (exp))
+  if (VAR_P (exp) && DECL_COMMON (exp))
     return false;
 
-  if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
+  if (VAR_P (exp) && DECL_SECTION_NAME (exp))
     {
       const char *section = DECL_SECTION_NAME (exp);
       if (strcmp (section, ".sdata") == 0
@@ -6253,7 +6253,7 @@ alpha_gimplify_va_arg_1 (tree type, tree base, tree offset,
 
       return build2 (COMPLEX_EXPR, type, real_temp, imag_part);
     }
-  else if (TREE_CODE (type) == REAL_TYPE)
+  else if (SCALAR_FLOAT_TYPE_P (type))
     {
       tree fpaddend, cond, fourtyeight;
 
index b47935a9214ddf7011382f5f4f057106b60b9979..dd012ffa975318f6be026f462ce638f4d4ec05df 100644 (file)
@@ -5784,7 +5784,7 @@ arc_encode_section_info (tree decl, rtx rtl, int first)
 
       SYMBOL_REF_FLAGS (symbol) = flags;
     }
-  else if (TREE_CODE (decl) == VAR_DECL)
+  else if (VAR_P (decl))
     {
       rtx symbol = XEXP (rtl, 0);
 
@@ -8935,7 +8935,7 @@ arc_is_aux_reg_p (rtx pat)
     return false;
 
   /* Get the attributes.  */
-  if (TREE_CODE (addr) == VAR_DECL)
+  if (VAR_P (addr))
     attrs = DECL_ATTRIBUTES (addr);
   else if (TREE_CODE (addr) == MEM_REF)
     attrs = TYPE_ATTRIBUTES (TREE_TYPE (TREE_OPERAND (addr, 0)));
@@ -11247,7 +11247,7 @@ arc_is_uncached_mem_p (rtx pat)
 
   /* Get the attributes.  */
   if (TREE_CODE (addr) == MEM_REF
-      || TREE_CODE (addr) == VAR_DECL)
+      || VAR_P (addr))
     {
       attrs = TYPE_ATTRIBUTES (TREE_TYPE (addr));
       if (lookup_attribute ("uncached", attrs))
@@ -11315,7 +11315,7 @@ arc_handle_aux_attribute (tree *node,
          /* FIXME! add range check.  TREE_INT_CST_LOW (arg) */
        }
 
-      if (TREE_CODE (*node) == VAR_DECL)
+      if (VAR_P (*node))
        {
          tree fntype = TREE_TYPE (*node);
          if (fntype && TREE_CODE (fntype) == POINTER_TYPE)
index da7e9c814653e02a3d262b3d5904e5e2ed55b8e8..c3e731b89823d2c907fc866c83287092251f5bde 100644 (file)
@@ -7463,8 +7463,7 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
     }
   else
     {
-      if (TREE_CODE (*node) == FUNCTION_TYPE
-         || TREE_CODE (*node) == METHOD_TYPE)
+      if (FUNC_OR_METHOD_TYPE_P (*node))
        {
          if (arm_isr_value (args) == ARM_FT_UNKNOWN)
            {
@@ -7474,8 +7473,7 @@ arm_handle_isr_attribute (tree *node, tree name, tree args, int flags,
            }
        }
       else if (TREE_CODE (*node) == POINTER_TYPE
-              && (TREE_CODE (TREE_TYPE (*node)) == FUNCTION_TYPE
-                  || TREE_CODE (TREE_TYPE (*node)) == METHOD_TYPE)
+              && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (*node))
               && arm_isr_value (args) != ARM_FT_UNKNOWN)
        {
          *node = build_variant_type_copy (*node);
@@ -7683,7 +7681,7 @@ arm_handle_cmse_nonsecure_call (tree *node, tree name,
     {
       fntype = TREE_TYPE (*node);
 
-      if (TREE_CODE (*node) == VAR_DECL || TREE_CODE (*node) == TYPE_DECL)
+      if (VAR_P (*node) || TREE_CODE (*node) == TYPE_DECL)
        decl = *node;
     }
   else
@@ -7804,7 +7802,7 @@ arm_set_default_type_attributes (tree type)
   /* Add __attribute__ ((long_call)) to all functions, when
      inside #pragma long_calls or __attribute__ ((short_call)),
      when inside #pragma no_long_calls.  */
-  if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE)
+  if (FUNC_OR_METHOD_TYPE_P (type))
     {
       tree type_attr_list, attr_name;
       type_attr_list = TYPE_ATTRIBUTES (type);
@@ -8452,7 +8450,7 @@ arm_is_segment_info_known (rtx orig, bool *is_readonly)
              || !DECL_COMMON (SYMBOL_REF_DECL (orig))))
        {
          tree decl = SYMBOL_REF_DECL (orig);
-         tree init = (TREE_CODE (decl) == VAR_DECL)
+         tree init = VAR_P (decl)
            ? DECL_INITIAL (decl) : (TREE_CODE (decl) == CONSTRUCTOR)
            ? decl : 0;
          int reloc = 0;
@@ -8461,7 +8459,7 @@ arm_is_segment_info_known (rtx orig, bool *is_readonly)
          if (init && init != error_mark_node)
            reloc = compute_reloc_for_constant (init);
 
-         named_section = TREE_CODE (decl) == VAR_DECL
+         named_section = VAR_P (decl)
            && lookup_attribute ("section", DECL_ATTRIBUTES (decl));
          readonly = decl_readonly_section (decl, reloc);
 
@@ -30575,7 +30573,7 @@ arm_mangle_type (const_tree type)
     return "St9__va_list";
 
   /* Half-precision floating point types.  */
-  if (TREE_CODE (type) == REAL_TYPE && TYPE_PRECISION (type) == 16)
+  if (SCALAR_FLOAT_TYPE_P (type) && TYPE_PRECISION (type) == 16)
     {
       if (TYPE_MAIN_VARIANT (type) == float16_type_node)
        return NULL;
index 397ac3f68b91849725db0ceb20f1859f5c2e0a55..42b97ce9458bd81f110559b0ae4669e9a5d204af 100644 (file)
@@ -51,7 +51,7 @@
 
 /* Return a nonzero value if DECL has a section attribute.  */
 #define IN_NAMED_SECTION_P(DECL)                                       \
-  ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \
+  ((TREE_CODE (DECL) == FUNCTION_DECL || VAR_P (DECL)) \
    && DECL_SECTION_NAME (DECL) != NULL)
 
 #undef  ASM_OUTPUT_ALIGNED_BSS
index c193430cf073b00238c250f9a690b1a97c62f87a..d5af40f709174d7f77c92a58af5cd200dcf60e9a 100644 (file)
@@ -961,8 +961,7 @@ avr_lookup_function_attribute1 (const_tree func, const char *name)
       func = TREE_TYPE (func);
     }
 
-  gcc_assert (TREE_CODE (func) == FUNCTION_TYPE
-              || TREE_CODE (func) == METHOD_TYPE);
+  gcc_assert (FUNC_OR_METHOD_TYPE_P (func));
 
   return NULL_TREE != lookup_attribute (name, TYPE_ATTRIBUTES (func));
 }
@@ -9839,7 +9838,7 @@ avr_progmem_p (tree decl, tree attributes)
 static bool
 avr_decl_absdata_p (tree decl, tree attributes)
 {
-  return (TREE_CODE (decl) == VAR_DECL
+  return (VAR_P (decl)
           && NULL_TREE != lookup_attribute ("absdata", attributes));
 }
 
@@ -9976,7 +9975,7 @@ avr_insert_attributes (tree node, tree *attributes)
 
   /* Add the section attribute if the variable is in progmem.  */
 
-  if (TREE_CODE (node) == VAR_DECL
+  if (VAR_P (node)
       && (TREE_STATIC (node) || DECL_EXTERNAL (node))
       && avr_progmem_p (node, *attributes))
     {
@@ -10190,7 +10189,7 @@ avr_section_type_flags (tree decl, const char *name, int reloc)
 
   if (startswith (name, ".noinit"))
     {
-      if (decl && TREE_CODE (decl) == VAR_DECL
+      if (decl && VAR_P (decl)
          && DECL_INITIAL (decl) == NULL_TREE)
        flags |= SECTION_BSS;  /* @nobits */
       else
@@ -10338,7 +10337,7 @@ avr_encode_section_info (tree decl, rtx rtl, int new_decl_p)
 
   if (AVR_TINY
       && decl
-      && VAR_DECL == TREE_CODE (decl)
+      && VAR_P (decl)
       && MEM_P (rtl)
       && SYMBOL_REF_P (XEXP (rtl, 0)))
     {
index c70d2281f06866a7cab5e33cc45865395f568fc4..4320ec267226a8dd3f57e5c000c21d74fa6783da 100644 (file)
@@ -4877,7 +4877,7 @@ bfin_handle_l2_attribute (tree *node, tree ARG_UNUSED (name),
       else
        set_decl_section_name (decl, ".l2.text");
     }
-  else if (TREE_CODE (decl) == VAR_DECL)
+  else if (VAR_P (decl))
     {
       if (DECL_SECTION_NAME (decl) != NULL
          && strcmp (DECL_SECTION_NAME (decl),
index d8693f8cfbec7fed3963df51950640cf05b73bb7..e0324e1e0e08846e247c294b0f1cc8477502ef52 100644 (file)
@@ -1406,7 +1406,7 @@ bpf_core_compute (tree node, vec<unsigned int> *accessors)
   if (TREE_CODE (node) == ADDR_EXPR)
     node = TREE_OPERAND (node, 0);
 
-  else if (TREE_CODE (node) == INDIRECT_REF
+  else if (INDIRECT_REF_P (node)
           || TREE_CODE (node) == POINTER_PLUS_EXPR)
     {
       accessors->safe_push (0);
index 15be3b23716ba9fd805e85c90b09b0e0be5093a3..0c9cb821f28c82855d9796d4595b4ff26c4d8357 100644 (file)
@@ -855,10 +855,10 @@ c6x_in_small_data_p (const_tree exp)
   if (TREE_CODE (exp) == FUNCTION_DECL)
     return false;
 
-  if (TREE_CODE (exp) == VAR_DECL && DECL_WEAK (exp))
+  if (VAR_P (exp) && DECL_WEAK (exp))
     return false;
 
-  if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
+  if (VAR_P (exp) && DECL_SECTION_NAME (exp))
     {
       const char *section = DECL_SECTION_NAME (exp);
 
index ddc6954dad11be4979406e2f9e1cdd0b6b3212a6..b4ee3b273a45ea7eebea2d60762c196605d4f87c 100644 (file)
@@ -6490,8 +6490,7 @@ csky_handle_isr_attribute (tree *node, tree name, tree args, int flags,
     }
   else
     {
-      if (TREE_CODE (*node) == FUNCTION_TYPE
-         || TREE_CODE (*node) == METHOD_TYPE)
+      if (FUNC_OR_METHOD_TYPE_P (*node))
        {
          if (csky_isr_value (args) == CSKY_FT_UNKNOWN)
            {
@@ -6500,8 +6499,7 @@ csky_handle_isr_attribute (tree *node, tree name, tree args, int flags,
            }
        }
       else if (TREE_CODE (*node) == POINTER_TYPE
-              && (TREE_CODE (TREE_TYPE (*node)) == FUNCTION_TYPE
-                  || TREE_CODE (TREE_TYPE (*node)) == METHOD_TYPE)
+              && FUNC_OR_METHOD_TYPE_P (TREE_TYPE (*node))
               && csky_isr_value (args) != CSKY_FT_UNKNOWN)
        {
          *node = build_variant_type_copy (*node);
@@ -7319,7 +7317,7 @@ csky_init_builtins (void)
 static const char *
 csky_mangle_type (const_tree type)
 {
-  if (TREE_CODE (type) == REAL_TYPE
+  if (SCALAR_FLOAT_TYPE_P (type)
       && TYPE_PRECISION (type) == 16
       && TYPE_MAIN_VARIANT (type) != float16_type_node)
     return "Dh";
index 579b9fa9317945d7179662c3a4174b9f1ac8316d..ded0cd46c76253478f7e608d5b7ba98298fadb47 100644 (file)
@@ -139,7 +139,7 @@ darwin_pragma_unused (cpp_reader *pfile ATTRIBUTE_UNUSED)
        {
          tree local = lookup_name (decl);
          if (local && (TREE_CODE (local) == PARM_DECL
-                       || TREE_CODE (local) == VAR_DECL))
+                       || VAR_P (local)))
            {
              TREE_USED (local) = 1;
              DECL_READ_P (local) = 1;
index ced2f7e40a64ac628beb6dfc91026f7b6c3ed594..efbcb3856ca6ac35639e006f7f5c22ac8b5ffb22 100644 (file)
@@ -1415,7 +1415,7 @@ static tree
 is_objc_metadata (tree decl)
 {
   if (DECL_P (decl)
-      && (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == CONST_DECL)
+      && (VAR_P (decl) || TREE_CODE (decl) == CONST_DECL)
       && DECL_ATTRIBUTES (decl))
     {
       tree meta = lookup_attribute ("OBJC2META", DECL_ATTRIBUTES (decl));
index 20c20e18ea0ff1ddfe178ed8bcffbfa3fba77c69..60a2845d6d15e4216e5961100f6bba078f0d5885 100644 (file)
@@ -2159,8 +2159,7 @@ epiphany_function_ok_for_sibcall (tree decl, tree exp)
 
       gcc_assert (POINTER_TYPE_P (fn_type));
       fn_type = TREE_TYPE (fn_type);
-      gcc_assert (TREE_CODE (fn_type) == FUNCTION_TYPE
-                 || TREE_CODE (fn_type) == METHOD_TYPE);
+      gcc_assert (FUNC_OR_METHOD_TYPE_P (fn_type));
       call_interrupt_p
        = lookup_attribute ("interrupt", TYPE_ATTRIBUTES (fn_type)) != NULL;
     }
index c742709309e33fcbc65ec969b7ac1f454465cd39..0baeb29854092564f38aa3325642abf67fa3aa7a 100644 (file)
@@ -170,12 +170,10 @@ along with GCC; see the file COPYING3.  If not see
 /* layout_type overrides our ADJUST_ALIGNMENT settings from epiphany-modes.def
    for vector modes, so we have to override it back.  */
 #define ROUND_TYPE_ALIGN(TYPE, MANGLED_ALIGN, SPECIFIED_ALIGN) \
- (TREE_CODE (TYPE) == VECTOR_TYPE && !TYPE_USER_ALIGN (TYPE) \
+ (VECTOR_TYPE_P (TYPE) && !TYPE_USER_ALIGN (TYPE) \
   && SPECIFIED_ALIGN <= GET_MODE_ALIGNMENT (TYPE_MODE (TYPE)) \
   ? GET_MODE_ALIGNMENT (TYPE_MODE (TYPE)) \
-  : ((TREE_CODE (TYPE) == RECORD_TYPE \
-      || TREE_CODE (TYPE) == UNION_TYPE \
-      || TREE_CODE (TYPE) == QUAL_UNION_TYPE) \
+  : (RECORD_OR_UNION_TYPE_P (TYPE) \
      && !TYPE_PACKED (TYPE)) \
   ? epiphany_special_round_type_align ((TYPE), (MANGLED_ALIGN), \
                                       (SPECIFIED_ALIGN)) \
index 99f79325cd6f4b5f4f0d3bb71f26b5f168dcdb38..2dbaa75f3dc58a7b85fb0256860fac25f688f35a 100644 (file)
@@ -4061,7 +4061,7 @@ frv_emit_movsi (rtx dest, rtx src)
                           || !DECL_COMMON (SYMBOL_REF_DECL (sym))))
                {
                  tree decl = SYMBOL_REF_DECL (sym);
-                 tree init = TREE_CODE (decl) == VAR_DECL
+                 tree init = VAR_P (decl)
                    ? DECL_INITIAL (decl)
                    : TREE_CODE (decl) == CONSTRUCTOR
                    ? decl : 0;
@@ -4071,7 +4071,7 @@ frv_emit_movsi (rtx dest, rtx src)
                  if (init && init != error_mark_node)
                    reloc = compute_reloc_for_constant (init);
 
-                 named_section = TREE_CODE (decl) == VAR_DECL
+                 named_section = VAR_P (decl)
                    && lookup_attribute ("section", DECL_ATTRIBUTES (decl));
                  readonly = decl_readonly_section (decl, reloc);
 
index 3c3bf377dd69365e9ceefbf76885d1c44cce0ec2..c99c1767659435b8450c300ee077a464d61b45a2 100644 (file)
@@ -104,7 +104,7 @@ gcn_lockless_update (location_t loc, gimple_stmt_iterator *gsi,
   tree var_type = TREE_TYPE (var);
 
   if (TREE_CODE (var_type) == COMPLEX_TYPE
-      || TREE_CODE (var_type) == REAL_TYPE)
+      || SCALAR_FLOAT_TYPE_P (var_type))
     code = VIEW_CONVERT_EXPR;
 
   if (TYPE_SIZE (var_type) == TYPE_SIZE (long_long_unsigned_type_node))
index 7bb71392c4c2ab65d5d5f4fbca3fa3de9347f5d4..007730da2f9b51e9e8f62f8f6bce08d870773a08 100644 (file)
@@ -6523,7 +6523,7 @@ gcn_asm_output_symbol_ref (FILE *file, rtx x)
   tree decl;
   if (cfun
       && (decl = SYMBOL_REF_DECL (x)) != 0
-      && TREE_CODE (decl) == VAR_DECL
+      && VAR_P (decl)
       && AS_LDS_P (TYPE_ADDR_SPACE (TREE_TYPE (decl))))
     {
       /* LDS symbols (emitted using this hook) are only used at present
@@ -6539,7 +6539,7 @@ gcn_asm_output_symbol_ref (FILE *file, rtx x)
       /* FIXME: See above -- this condition is unreachable.  */
       if (cfun
          && (decl = SYMBOL_REF_DECL (x)) != 0
-         && TREE_CODE (decl) == VAR_DECL
+         && VAR_P (decl)
          && AS_LDS_P (TYPE_ADDR_SPACE (TREE_TYPE (decl))))
        fputs ("@abs32", file);
     }
index c3674933f900b8aaefb10193d94645fe161b5b15..7412c0535fce3d0d49a577e5f89d9b2413eacfd8 100644 (file)
@@ -5009,7 +5009,7 @@ h8300_encode_section_info (tree decl, rtx rtl, int first)
   if (TREE_CODE (decl) == FUNCTION_DECL
       && h8300_funcvec_function_p (decl))
     extra_flags = SYMBOL_FLAG_FUNCVEC_FUNCTION;
-  else if (TREE_CODE (decl) == VAR_DECL
+  else if (VAR_P (decl)
           && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
     {
       if (h8300_eightbit_data_p (decl))
index d5116801498fc1ca9d39f1a3c9679a3632dd78d5..50d9d34ebcb68168dcf81d66e94069abaf637282 100644 (file)
@@ -14571,7 +14571,7 @@ rdseed_step:
                op0 = pc_rtx;
            }
          else if (TREE_CODE (arg3) == SSA_NAME
-                  && TREE_CODE (TREE_TYPE (arg3)) == VECTOR_TYPE)
+                  && VECTOR_TYPE_P (TREE_TYPE (arg3)))
            {
              /* Recognize also when mask is like:
                 __v2df src = _mm_setzero_pd ();
index 369a718c880befaf5be3d36ba962b924757a6fc8..6a4b33262191cd2eca1d4eb58985a4de4b9b0098 100644 (file)
@@ -1887,7 +1887,7 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum,
 {
   machine_mode mode = TYPE_MODE (type);
 
-  if (TREE_CODE (type) == VECTOR_TYPE && !VECTOR_MODE_P (mode))
+  if (VECTOR_TYPE_P (type) && !VECTOR_MODE_P (mode))
     {
       HOST_WIDE_INT size = int_size_in_bytes (type);
       if ((size == 8 || size == 16 || size == 32 || size == 64)
@@ -1904,7 +1904,7 @@ type_natural_mode (const_tree type, const CUMULATIVE_ARGS *cum,
          if (DECIMAL_FLOAT_MODE_P (innermode))
            return mode;
 
-         if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
+         if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (type)))
            mode = MIN_MODE_VECTOR_FLOAT;
          else
            mode = MIN_MODE_VECTOR_INT;
@@ -3412,7 +3412,7 @@ ix86_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
 
   /* To simplify the code below, represent vector types with a vector mode
      even if MMX/SSE are not active.  */
-  if (arg.type && TREE_CODE (arg.type) == VECTOR_TYPE)
+  if (arg.type && VECTOR_TYPE_P (arg.type))
     mode = type_natural_mode (arg.type, cum, false);
 
   if (TARGET_64BIT)
@@ -17470,9 +17470,7 @@ ix86_data_alignment (tree type, unsigned int align, bool opt)
           || TYPE_MODE (type) == TCmode) && align < 128)
        return 128;
     }
-  else if ((TREE_CODE (type) == RECORD_TYPE
-           || TREE_CODE (type) == UNION_TYPE
-           || TREE_CODE (type) == QUAL_UNION_TYPE)
+  else if (RECORD_OR_UNION_TYPE_P (type)
           && TYPE_FIELDS (type))
     {
       if (DECL_MODE (TYPE_FIELDS (type)) == DFmode && align < 64)
@@ -17480,7 +17478,7 @@ ix86_data_alignment (tree type, unsigned int align, bool opt)
       if (ALIGN_MODE_128 (DECL_MODE (TYPE_FIELDS (type))) && align < 128)
        return 128;
     }
-  else if (TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == VECTOR_TYPE
+  else if (SCALAR_FLOAT_TYPE_P (type) || VECTOR_TYPE_P (type)
           || TREE_CODE (type) == INTEGER_TYPE)
     {
       if (TYPE_MODE (type) == DFmode && align < 64)
@@ -17596,9 +17594,7 @@ ix86_local_alignment (tree exp, machine_mode mode,
           || TYPE_MODE (type) == TCmode) && align < 128)
        return 128;
     }
-  else if ((TREE_CODE (type) == RECORD_TYPE
-           || TREE_CODE (type) == UNION_TYPE
-           || TREE_CODE (type) == QUAL_UNION_TYPE)
+  else if (RECORD_OR_UNION_TYPE_P (type)
           && TYPE_FIELDS (type))
     {
       if (DECL_MODE (TYPE_FIELDS (type)) == DFmode && align < 64)
@@ -17606,7 +17602,7 @@ ix86_local_alignment (tree exp, machine_mode mode,
       if (ALIGN_MODE_128 (DECL_MODE (TYPE_FIELDS (type))) && align < 128)
        return 128;
     }
-  else if (TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == VECTOR_TYPE
+  else if (SCALAR_FLOAT_TYPE_P (type) || VECTOR_TYPE_P (type)
           || TREE_CODE (type) == INTEGER_TYPE)
     {
 
@@ -23860,7 +23856,7 @@ ix86_simd_clone_compute_vecsize_and_simdlen (struct cgraph_node *node,
         for 64-bit code), accept that SIMDLEN, otherwise warn and don't
         emit corresponding clone.  */
       tree ctype = ret_type;
-      if (TREE_CODE (ret_type) == VOID_TYPE)
+      if (VOID_TYPE_P (ret_type))
        ctype = base_type;
       int cnt = GET_MODE_BITSIZE (TYPE_MODE (ctype)) * clonei->simdlen;
       if (SCALAR_INT_MODE_P (TYPE_MODE (ctype)))
index 9982d9865010d0e2507ba4863efc7edff1cfc1c7..6306d830fcfa13602557ff75157970802b118882 100644 (file)
@@ -30,7 +30,7 @@ along with GCC; see the file COPYING3.  If not see
 bool
 i386_pe_type_dllimport_p (tree decl)
 {
-  gcc_assert (TREE_CODE (decl) == VAR_DECL 
+  gcc_assert (VAR_P (decl)
              || TREE_CODE (decl) == FUNCTION_DECL);
 
   if (TARGET_NOP_FUN_DLLIMPORT && TREE_CODE (decl) == FUNCTION_DECL)
@@ -54,7 +54,7 @@ i386_pe_type_dllimport_p (tree decl)
 bool
 i386_pe_type_dllexport_p (tree decl)
 {
-  gcc_assert (TREE_CODE (decl) == VAR_DECL 
+  gcc_assert (VAR_P (decl)
               || TREE_CODE (decl) == FUNCTION_DECL);
 
   /* Avoid exporting compiler-generated default dtors and copy ctors.
@@ -118,7 +118,7 @@ i386_pe_adjust_class_at_definition (tree t)
 
       /* Check FUNCTION_DECL's and static VAR_DECL's.  */
       for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member))
-       if (TREE_CODE (member) == VAR_DECL)     
+       if (VAR_P (member))
          maybe_add_dllexport (member);
        else if (TREE_CODE (member) == FUNCTION_DECL)
          {
@@ -134,7 +134,7 @@ i386_pe_adjust_class_at_definition (tree t)
       /* Check vtables  */
       for (member = CLASSTYPE_VTABLES (t);
           member; member = DECL_CHAIN (member))
-       if (TREE_CODE (member) == VAR_DECL) 
+       if (VAR_P (member))
          maybe_add_dllexport (member);
     }
 
@@ -150,7 +150,7 @@ i386_pe_adjust_class_at_definition (tree t)
 
       /* Check FUNCTION_DECL's and static VAR_DECL's.  */
       for (member = TYPE_FIELDS (t); member; member = DECL_CHAIN (member))
-       if (TREE_CODE (member) == VAR_DECL)     
+       if (VAR_P (member))
          maybe_add_dllimport (member);
        else if (TREE_CODE (member) == FUNCTION_DECL)
          {
@@ -166,7 +166,7 @@ i386_pe_adjust_class_at_definition (tree t)
       /* Check vtables  */
       for (member = CLASSTYPE_VTABLES (t);
           member;  member = DECL_CHAIN (member))
-       if (TREE_CODE (member) == VAR_DECL) 
+       if (VAR_P (member))
          maybe_add_dllimport (member);
 
       /* We leave typeinfo tables alone.  We can't mark TI objects as
index 6b64eca3316ca4d4a089947d08cc5043446a1083..83a21c677048b7067e7b3339a2e210be921e069a 100644 (file)
@@ -147,7 +147,7 @@ i386_pe_determine_dllimport_p (tree decl)
      out-of-class definition of static data.  */
   assoc = associated_type (decl);
   if (assoc && lookup_attribute ("dllimport", TYPE_ATTRIBUTES (assoc))
-      && TREE_CODE (decl) == VAR_DECL
+      && VAR_P (decl)
       && TREE_STATIC (decl) && TREE_PUBLIC (decl)
       && !DECL_EXTERNAL (decl)
       /* vtable's are linkonce constants, so defining a vtable is not
@@ -335,7 +335,7 @@ i386_pe_encode_section_info (tree decl, rtx rtl, int first)
 bool
 i386_pe_binds_local_p (const_tree exp)
 {
-  if ((TREE_CODE (exp) == VAR_DECL || TREE_CODE (exp) == FUNCTION_DECL)
+  if ((VAR_P (exp) || TREE_CODE (exp) == FUNCTION_DECL)
       && DECL_DLLIMPORT_P (exp))
     return false;
 
@@ -459,7 +459,7 @@ i386_pe_section_type_flags (tree decl, const char *, int reloc)
     {
       flags = SECTION_WRITE;
 
-      if (decl && TREE_CODE (decl) == VAR_DECL
+      if (decl && VAR_P (decl)
          && lookup_attribute ("shared", DECL_ATTRIBUTES (decl)))
        flags |= SECTION_PE_SHARED;
     }
index f32efb3bd8036770803fb4e5a6143628990ed20a..92f34dd1ee7be0ed4514901bc74392278ff53df1 100644 (file)
@@ -873,7 +873,7 @@ ia64_encode_section_info (tree decl, rtx rtl, int first)
   default_encode_section_info (decl, rtl, first);
 
   /* Careful not to prod global register variables.  */
-  if (TREE_CODE (decl) == VAR_DECL
+  if (VAR_P (decl)
       && GET_CODE (DECL_RTL (decl)) == MEM
       && GET_CODE (XEXP (DECL_RTL (decl), 0)) == SYMBOL_REF
       && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
@@ -5156,7 +5156,7 @@ ia64_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p,
      the next even boundary.  Integer and floating point arguments
      do so if they are larger than 8 bytes, whether or not they are
      also aligned larger than 8 bytes.  */
-  if ((TREE_CODE (type) == REAL_TYPE || TREE_CODE (type) == INTEGER_TYPE)
+  if ((SCALAR_FLOAT_TYPE_P (type) || TREE_CODE (type) == INTEGER_TYPE)
       ? int_size_in_bytes (type) > 8 : TYPE_ALIGN (type) > 8 * BITS_PER_UNIT)
     {
       tree t = fold_build_pointer_plus_hwi (valist, 2 * UNITS_PER_WORD - 1);
@@ -10003,7 +10003,7 @@ ia64_in_small_data_p (const_tree exp)
   if (TREE_CODE (exp) == FUNCTION_DECL)
     return false;
 
-  if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
+  if (VAR_P (exp) && DECL_SECTION_NAME (exp))
     {
       const char *section = DECL_SECTION_NAME (exp);
 
index 067154a0a0d93db11271a726cf7018e850879927..733fecac2b72e6464d452ae247c735a671b5c379 100644 (file)
@@ -1226,9 +1226,7 @@ iq2000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
   int bias = 0;
   unsigned int *arg_words = &cum->arg_words;
   int struct_p = (type != 0
-                 && (TREE_CODE (type) == RECORD_TYPE
-                     || TREE_CODE (type) == UNION_TYPE
-                     || TREE_CODE (type) == QUAL_UNION_TYPE));
+                 && RECORD_OR_UNION_TYPE_P (type));
 
   if (TARGET_DEBUG_D_MODE)
     {
@@ -1304,7 +1302,7 @@ iq2000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
 
          for (field = TYPE_FIELDS (type); field; field = DECL_CHAIN (field))
            if (TREE_CODE (field) == FIELD_DECL
-               && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
+               && SCALAR_FLOAT_TYPE_P (TREE_TYPE (field))
                && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD
                && tree_fits_shwi_p (bit_position (field))
                && int_bit_position (field) % BITS_PER_WORD == 0)
@@ -1346,7 +1344,7 @@ iq2000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
 
                  if (field
                      && int_bit_position (field) == bitpos
-                     && TREE_CODE (TREE_TYPE (field)) == REAL_TYPE
+                     && SCALAR_FLOAT_TYPE_P (TREE_TYPE (field))
                      && TYPE_PRECISION (TREE_TYPE (field)) == BITS_PER_WORD)
                    reg = gen_rtx_REG (DFmode, regno++);
                  else
index 37a6eb86da056b9ab1320ac900e4efc97540d7d8..6528358009d402985ab54e06fc18819dd3c2d53a 100644 (file)
@@ -787,7 +787,7 @@ lm32_in_small_data_p (const_tree exp)
   if (TREE_CODE (exp) == FUNCTION_DECL)
     return false;
 
-  if (TREE_CODE (exp) == VAR_DECL && DECL_SECTION_NAME (exp))
+  if (VAR_P (exp) && DECL_SECTION_NAME (exp))
     {
       const char *section = DECL_SECTION_NAME (exp);
       if (strcmp (section, ".sdata") == 0 || strcmp (section, ".sbss") == 0)
index 7f4e0e5957354de55a0e5ccb27c4ecb9aedc7c1f..eb73d11b869dcee70cf74b321554dafef4c80ef0 100644 (file)
@@ -6535,7 +6535,7 @@ loongarch_handle_model_attribute (tree *node, tree name, tree arg, int,
                                  bool *no_add_attrs)
 {
   tree decl = *node;
-  if (TREE_CODE (decl) == VAR_DECL)
+  if (VAR_P (decl))
     {
       if (DECL_THREAD_LOCAL_P (decl))
        {
index e0d06f833d3d5d4963f225aef896860c5313fb0c..65971d6299029f65c1ade1b18126003c4eaf47f0 100644 (file)
@@ -3027,7 +3027,7 @@ m32c_insert_attributes (tree node ATTRIBUTE_UNUSED,
   unsigned addr;
   /* See if we need to make #pragma address variables volatile.  */
 
-  if (TREE_CODE (node) == VAR_DECL)
+  if (VAR_P (node))
     {
       const char *name = IDENTIFIER_POINTER (DECL_NAME (node));
       if (m32c_get_pragma_address  (name, &addr))
index e800af78e14b762f3aff610cb9d907b831b37ac1..92e7f960f75c550aa3319c17a69375a27f3f1c17 100644 (file)
@@ -2953,7 +2953,7 @@ mcore_mark_dllimport (tree decl)
      and that would be a good question.  */
 
   /* Imported variables can't be initialized.  */
-  if (TREE_CODE (decl) == VAR_DECL
+  if (VAR_P (decl)
       && !DECL_VIRTUAL_P (decl)
       && DECL_INITIAL (decl))
     {
@@ -2963,7 +2963,7 @@ mcore_mark_dllimport (tree decl)
   
   /* `extern' needn't be specified with dllimport.
      Specify `extern' now and hope for the best.  Sigh.  */
-  if (TREE_CODE (decl) == VAR_DECL
+  if (VAR_P (decl)
       /* ??? Is this test for vtables needed?  */
       && !DECL_VIRTUAL_P (decl))
     {
@@ -3024,7 +3024,7 @@ mcore_encode_section_info (tree decl, rtx rtl ATTRIBUTE_UNUSED, int first ATTRIB
      a subsequent definition nullified that.  The attribute is gone
      but DECL_RTL still has @i.__imp_foo.  We need to remove that.  */
   else if ((TREE_CODE (decl) == FUNCTION_DECL
-           || TREE_CODE (decl) == VAR_DECL)
+           || VAR_P (decl))
           && DECL_RTL (decl) != NULL_RTX
           && GET_CODE (DECL_RTL (decl)) == MEM
           && GET_CODE (XEXP (DECL_RTL (decl), 0)) == MEM
index ebe78304f8989ed1c50c59005041390e2b48d0f0..cbabf1af7120903befcca305948b40f2052eae29 100644 (file)
@@ -3232,7 +3232,7 @@ microblaze_elf_in_small_data_p (const_tree decl)
   if (TREE_CODE (decl) == FUNCTION_DECL)
     return false;
 
-  if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl))
+  if (VAR_P (decl) && DECL_SECTION_NAME (decl))
     {
       const char *section = DECL_SECTION_NAME (decl);
       if (strcmp (section, ".sdata") == 0
index ca822758b41cac46cc3f01fd2200c69bfd35f479..ca491b981a332c4e0c73106c9d9f77de3e86a43f 100644 (file)
@@ -9838,7 +9838,7 @@ mips_output_aligned_decl_common (FILE *stream, tree decl, const char *name,
      .rdata then don't put them in .comm.  */
   if (TARGET_EMBEDDED_DATA
       && TARGET_UNINIT_CONST_IN_RODATA
-      && TREE_CODE (decl) == VAR_DECL
+      && VAR_P (decl)
       && TREE_READONLY (decl)
       && (DECL_INITIAL (decl) == 0 || DECL_INITIAL (decl) == error_mark_node))
     {
index eda2959adb9643583d154238c1df1c5a1bf1bfd7..1d36306fdb6910ff6f3729d69a2dd4a276dfd882 100644 (file)
@@ -1262,7 +1262,7 @@ static void
 mmix_encode_section_info (tree decl, rtx rtl, int first)
 {
   /* Test for an external declaration, and do nothing if it is one.  */
-  if ((TREE_CODE (decl) == VAR_DECL
+  if ((VAR_P (decl)
        && (DECL_EXTERNAL (decl) || TREE_PUBLIC (decl)))
       || (TREE_CODE (decl) == FUNCTION_DECL && TREE_PUBLIC (decl)))
     ;
@@ -1291,7 +1291,7 @@ mmix_encode_section_info (tree decl, rtx rtl, int first)
      For now, functions and things we know or have been told are constant.  */
   if (TREE_CODE (decl) == FUNCTION_DECL
       || TREE_CONSTANT (decl)
-      || (TREE_CODE (decl) == VAR_DECL
+      || (VAR_P (decl)
          && TREE_READONLY (decl)
          && !TREE_SIDE_EFFECTS (decl)
          && (!DECL_INITIAL (decl)
index 89349dae9e62100dbcc2bff922f254489da7b481..d76c0bbce2f3f4c51b2782980624d108bf7089e4 100644 (file)
@@ -452,7 +452,7 @@ nvptx_encode_section_info (tree decl, rtx rtl, int first)
 
       if (TREE_CONSTANT (decl))
        area = DATA_AREA_CONST;
-      else if (TREE_CODE (decl) == VAR_DECL)
+      else if (VAR_P (decl))
        {
          if (lookup_attribute ("shared", DECL_ATTRIBUTES (decl)))
            {
@@ -635,7 +635,7 @@ pass_in_memory (machine_mode mode, const_tree type, bool for_return)
     {
       if (AGGREGATE_TYPE_P (type))
        return true;
-      if (TREE_CODE (type) == VECTOR_TYPE)
+      if (VECTOR_TYPE_P (type))
        return true;
     }
 
@@ -6699,7 +6699,7 @@ nvptx_generate_vector_shuffle (location_t loc,
   if (TREE_CODE (var_type) == COMPLEX_TYPE)
     var_type = TREE_TYPE (var_type);
 
-  if (TREE_CODE (var_type) == REAL_TYPE)
+  if (SCALAR_FLOAT_TYPE_P (var_type))
     code = VIEW_CONVERT_EXPR;
 
   if (TYPE_SIZE (var_type)
@@ -6789,7 +6789,7 @@ nvptx_lockless_update (location_t loc, gimple_stmt_iterator *gsi,
   tree var_type = TREE_TYPE (var);
 
   if (TREE_CODE (var_type) == COMPLEX_TYPE
-      || TREE_CODE (var_type) == REAL_TYPE)
+      || SCALAR_FLOAT_TYPE_P (var_type))
     code = VIEW_CONVERT_EXPR;
 
   if (TYPE_SIZE (var_type) == TYPE_SIZE (long_long_unsigned_type_node))
index db633b275e5ebf50ee5b6fc65283908fd9bb2421..0fa9e5fd632fe9ebf9dc107e20ba1e9af39eda31 100644 (file)
@@ -6387,7 +6387,7 @@ pa_function_arg_padding (machine_mode mode, const_tree type)
          && type
          && (AGGREGATE_TYPE_P (type)
              || TREE_CODE (type) == COMPLEX_TYPE
-             || TREE_CODE (type) == VECTOR_TYPE)))
+             || VECTOR_TYPE_P (type))))
     {
       /* Return PAD_NONE if justification is not required.  */
       if (type
@@ -9660,7 +9660,7 @@ pa_function_value (const_tree valtype,
 
   if (AGGREGATE_TYPE_P (valtype)
       || TREE_CODE (valtype) == COMPLEX_TYPE
-      || TREE_CODE (valtype) == VECTOR_TYPE)
+      || VECTOR_TYPE_P (valtype))
     {
       HOST_WIDE_INT valsize = int_size_in_bytes (valtype);
 
@@ -9709,7 +9709,7 @@ pa_function_value (const_tree valtype,
   else
     valmode = TYPE_MODE (valtype);
 
-  if (TREE_CODE (valtype) == REAL_TYPE
+  if (SCALAR_FLOAT_TYPE_P (valtype)
       && !AGGREGATE_TYPE_P (valtype)
       && TYPE_MODE (valtype) != TFmode
       && !TARGET_SOFT_FLOAT)
@@ -9828,7 +9828,7 @@ pa_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
          || mode == BLKmode
          || (type && (AGGREGATE_TYPE_P (type)
                       || TREE_CODE (type) == COMPLEX_TYPE
-                      || TREE_CODE (type) == VECTOR_TYPE)))
+                      || VECTOR_TYPE_P (type))))
        {
          /* Double-extended precision (80-bit), quad-precision (128-bit)
             and aggregates including complex numbers are aligned on
@@ -9888,7 +9888,7 @@ pa_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
          if (mode == BLKmode
              || (type && (AGGREGATE_TYPE_P (type)
                           || TREE_CODE (type) == COMPLEX_TYPE
-                          || TREE_CODE (type) == VECTOR_TYPE)))
+                          || VECTOR_TYPE_P (type))))
            {
              rtx loc = gen_rtx_EXPR_LIST (VOIDmode,
                                           gen_rtx_REG (DImode, gpr_reg_base),
index 6e29be282ad9a90db4cebd03bea383ecff4c0555..e65af52296634cbb728ed2a15dbbbbd1ac7908da 100644 (file)
@@ -930,7 +930,7 @@ do {                                                                             \
 
 /* Return a nonzero value if DECL has a section attribute.  */
 #define IN_NAMED_SECTION_P(DECL) \
-  ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \
+  ((TREE_CODE (DECL) == FUNCTION_DECL || VAR_P (DECL)) \
    && DECL_SECTION_NAME (DECL) != NULL)
 
 /* Define this macro if references to a symbol must be treated
@@ -952,7 +952,7 @@ do {                                                                             \
 
 #define TEXT_SPACE_P(DECL)\
   (TREE_CODE (DECL) == FUNCTION_DECL                                   \
-   || (TREE_CODE (DECL) == VAR_DECL                                    \
+   || (VAR_P (DECL)                                    \
        && TREE_READONLY (DECL) && ! TREE_SIDE_EFFECTS (DECL)           \
        && (! DECL_INITIAL (DECL) || ! pa_reloc_needed (DECL_INITIAL (DECL))) \
        && !flag_pic)                                                   \
index eaa0ee311055a805164605b7767cf490d6b7b6f0..5999aa37b2a6512f261fb495f042e41a586dba63 100644 (file)
@@ -287,7 +287,7 @@ do {                                                \
    initialized variables and functions.  */
 #define MAKE_DECL_ONE_ONLY(DECL) \
   do {                                                                 \
-    if (TREE_CODE (DECL) == VAR_DECL                                   \
+    if (VAR_P (DECL)                                   \
         && (DECL_INITIAL (DECL) == 0                                   \
             || DECL_INITIAL (DECL) == error_mark_node))                        \
       DECL_COMMON (DECL) = 1;                                          \
index 4af26f8cd709da50d0dfe2a3256f5e94789adb10..f6dd841f1847d158c3e331c61cce33cdb0524eae 100644 (file)
@@ -1881,7 +1881,7 @@ pdp11_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
      in registers.  The rest go into memory.  */
   return (TYPE_MODE (type) == DImode
          || (FLOAT_MODE_P (TYPE_MODE (type)) && ! TARGET_AC0)
-         || TREE_CODE (type) == VECTOR_TYPE
+         || VECTOR_TYPE_P (type)
          || COMPLEX_MODE_P (TYPE_MODE (type)));
 }
 
index 79122699b6f52bc0ac9079868cbb539d2a69d91c..235be758c03cb44a09a1cf27945058b25c745722 100644 (file)
@@ -4736,7 +4736,7 @@ riscv_in_small_data_p (const_tree x)
   if (TREE_CODE (x) == STRING_CST || TREE_CODE (x) == FUNCTION_DECL)
     return false;
 
-  if (TREE_CODE (x) == VAR_DECL && DECL_SECTION_NAME (x))
+  if (VAR_P (x) && DECL_SECTION_NAME (x))
     {
       const char *sec = DECL_SECTION_NAME (x);
       return strcmp (sec, ".sdata") == 0 || strcmp (sec, ".sbss") == 0;
@@ -7050,7 +7050,7 @@ static const char *
 riscv_mangle_type (const_tree type)
 {
   /* Half-precision float, _Float16 is "DF16_".  */
-  if (TREE_CODE (type) == REAL_TYPE && TYPE_PRECISION (type) == 16)
+  if (SCALAR_FLOAT_TYPE_P (type) && TYPE_PRECISION (type) == 16)
     return "DF16_";
 
   /* Mangle all vector type for vector extension.  */
index 7ed28d35883ac78c3b7ba78a7e330cf4541c9adc..9083096c4ae928aebe9ff93cf052edb5de73374a 100644 (file)
@@ -4724,7 +4724,7 @@ static void
 rl78_insert_attributes (tree decl, tree *attributes ATTRIBUTE_UNUSED)
 {
   if (TARGET_ES0
-      && TREE_CODE (decl) == VAR_DECL
+      && VAR_P (decl)
       && TREE_READONLY (decl)
       && TREE_ADDRESSABLE (decl)
       && TYPE_ADDR_SPACE (TREE_TYPE (decl)) == ADDR_SPACE_GENERIC)
@@ -4880,7 +4880,7 @@ rl78_addsi3_internal (rtx * operands, unsigned int alternative)
      this address.  So we can skip adding in the high bytes.  */
   if (TARGET_ES0
       && GET_CODE (operands[2]) == SYMBOL_REF
-      && TREE_CODE (SYMBOL_REF_DECL (operands[2])) == VAR_DECL
+      && VAR_P (SYMBOL_REF_DECL (operands[2]))
       && TREE_READONLY (SYMBOL_REF_DECL (operands[2]))
       && ! TREE_SIDE_EFFECTS (SYMBOL_REF_DECL (operands[2])))
     return "movw ax, %h1\n\taddw ax, %h2\n\tmovw %h0, ax";
index 69db93ef47b8be1fb7a1aa86b65010cb5d8d779a..7b01ba9dc5b2d2e863a6501fa8882ea00a5a11a7 100644 (file)
 /* AIX increases natural record alignment to doubleword if the first
    field is an FP double while the FP fields remain word aligned.  */
 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                  \
-  ((TREE_CODE (STRUCT) == RECORD_TYPE                                  \
-    || TREE_CODE (STRUCT) == UNION_TYPE                                        \
-    || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                          \
+  (RECORD_OR_UNION_TYPE_P (STRUCT)                             \
    && TARGET_ALIGN_NATURAL == 0                                                \
    ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED)     \
    : MAX ((COMPUTED), (SPECIFIED)))
index 4d5d6f6d5a8e1223bd19e7e4b1c69b5feea8b791..bf9dfaf2f34b531ad38733e479b25ff188ec20b3 100644 (file)
 /* Darwin increases natural record alignment to doubleword if the first
    field is an FP double while the FP fields remain word aligned.  */
 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                    \
-  ((TREE_CODE (STRUCT) == RECORD_TYPE                                    \
-    || TREE_CODE (STRUCT) == UNION_TYPE                                          \
-    || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                            \
+  (RECORD_OR_UNION_TYPE_P (STRUCT)                               \
    && TARGET_ALIGN_NATURAL == 0                                                  \
    ? darwin_rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED) \
-   : (TREE_CODE (STRUCT) == VECTOR_TYPE                                          \
+   : (VECTOR_TYPE_P (STRUCT)                                     \
       && ALTIVEC_VECTOR_MODE (TYPE_MODE (STRUCT)))                       \
    ? MAX (MAX ((COMPUTED), (SPECIFIED)), 128)                            \
    : MAX ((COMPUTED), (SPECIFIED)))
index 111aa14bf9d06d70834bb5bc5b628fc596de8129..918d6c2ce5a290fd1e4931c37095dda1dbc2b950 100644 (file)
@@ -140,9 +140,7 @@ extern int dot_symbols;
 #undef  ROUND_TYPE_ALIGN
 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                  \
   ((TARGET_64BIT                                                       \
-    && (TREE_CODE (STRUCT) == RECORD_TYPE                              \
-       || TREE_CODE (STRUCT) == UNION_TYPE                             \
-       || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                       \
+    && RECORD_OR_UNION_TYPE_P (STRUCT)                 \
     && TARGET_ALIGN_NATURAL == 0)                                      \
    ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED)     \
    : MAX ((COMPUTED), (SPECIFIED)))
index 6e4acaf00c20d0c2520ea70988e6cfb7b78fcb3a..98b7255c95f1b55ec5c97726cfcb9dc6fb9ebf56 100644 (file)
@@ -224,9 +224,7 @@ extern int dot_symbols;
 #undef  ROUND_TYPE_ALIGN
 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)                  \
   ((TARGET_64BIT                                                       \
-    && (TREE_CODE (STRUCT) == RECORD_TYPE                              \
-       || TREE_CODE (STRUCT) == UNION_TYPE                             \
-       || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)                       \
+    && RECORD_OR_UNION_TYPE_P (STRUCT)                 \
     && TARGET_ALIGN_NATURAL == 0)                                      \
    ? rs6000_special_round_type_align (STRUCT, COMPUTED, SPECIFIED)     \
    : MAX ((COMPUTED), (SPECIFIED)))
index 214613e083e0a8a16876f373a8b6ca8f7ede60c9..5384c10b9864c667f825d5591ed8a5df0a7ace46 100644 (file)
@@ -826,12 +826,12 @@ rs6000_function_arg_boundary (machine_mode mode, const_tree type)
     return 64;
   else if (FLOAT128_VECTOR_P (mode))
     return 128;
-  else if (type && TREE_CODE (type) == VECTOR_TYPE
+  else if (type && VECTOR_TYPE_P (type)
           && int_size_in_bytes (type) >= 8
           && int_size_in_bytes (type) < 16)
     return 64;
   else if (ALTIVEC_OR_VSX_VECTOR_MODE (elt_mode)
-          || (type && TREE_CODE (type) == VECTOR_TYPE
+          || (type && VECTOR_TYPE_P (type)
               && int_size_in_bytes (type) >= 16))
     return 128;
 
@@ -1094,7 +1094,7 @@ rs6000_function_arg_advance_1 (CUMULATIVE_ARGS *cum, machine_mode mode,
 
   if (TARGET_ALTIVEC_ABI
       && (ALTIVEC_OR_VSX_VECTOR_MODE (elt_mode)
-         || (type && TREE_CODE (type) == VECTOR_TYPE
+         || (type && VECTOR_TYPE_P (type)
              && int_size_in_bytes (type) == 16)))
     {
       bool stack = false;
@@ -1699,7 +1699,7 @@ rs6000_function_arg (cumulative_args_t cum_v, const function_arg_info &arg)
     }
   else if (TARGET_ALTIVEC_ABI
           && (ALTIVEC_OR_VSX_VECTOR_MODE (mode)
-              || (type && TREE_CODE (type) == VECTOR_TYPE
+              || (type && VECTOR_TYPE_P (type)
                   && int_size_in_bytes (type) == 16)))
     {
       if (named || abi == ABI_V4)
@@ -2017,7 +2017,7 @@ rs6000_pass_by_reference (cumulative_args_t, const function_arg_info &arg)
     }
 
   /* Pass synthetic vectors in memory.  */
-  if (TREE_CODE (arg.type) == VECTOR_TYPE
+  if (VECTOR_TYPE_P (arg.type)
       && int_size_in_bytes (arg.type) > (TARGET_ALTIVEC_ABI ? 16 : 8))
     {
       static bool warned_for_pass_big_vectors = false;
index d6c9c6e5b5283af07792a46df8d197c5c2cdc420..bc6b153b59f486face617b375bc136db57393415 100644 (file)
@@ -1171,12 +1171,12 @@ rs6000_function_ok_for_sibcall (tree decl, tree exp)
         prototype, so the argument type info must be available
         here.  */
       FOREACH_FUNCTION_ARGS(fntype, type, args_iter)
-       if (TREE_CODE (type) == VECTOR_TYPE
+       if (VECTOR_TYPE_P (type)
            && ALTIVEC_OR_VSX_VECTOR_MODE (TYPE_MODE (type)))
          nvreg++;
 
       FOREACH_FUNCTION_ARGS(TREE_TYPE (current_function_decl), type, args_iter)
-       if (TREE_CODE (type) == VECTOR_TYPE
+       if (VECTOR_TYPE_P (type)
            && ALTIVEC_OR_VSX_VECTOR_MODE (TYPE_MODE (type)))
          nvreg--;
 
index 275fb813c8066a6c1b37dc43bcf6a861eee9ecb0..5b3b8b52e7e8829f285a94d5b3cb156eb0200675 100644 (file)
@@ -8059,7 +8059,7 @@ rs6000_data_alignment (tree type, unsigned int align, enum data_align how)
 {
   if (how != align_opt)
     {
-      if (TREE_CODE (type) == VECTOR_TYPE && align < 128)
+      if (VECTOR_TYPE_P (type) && align < 128)
        align = 128;
     }
 
@@ -20404,8 +20404,7 @@ static void
 rs6000_set_default_type_attributes (tree type)
 {
   if (rs6000_default_long_calls
-      && (TREE_CODE (type) == FUNCTION_TYPE
-         || TREE_CODE (type) == METHOD_TYPE))
+      && FUNC_OR_METHOD_TYPE_P (type))
     TYPE_ATTRIBUTES (type) = tree_cons (get_identifier ("longcall"),
                                        NULL_TREE,
                                        TYPE_ATTRIBUTES (type));
@@ -20647,7 +20646,7 @@ rs6000_elf_in_small_data_p (const_tree decl)
   if (TREE_CODE (decl) == FUNCTION_DECL)
     return false;
 
-  if (TREE_CODE (decl) == VAR_DECL && DECL_SECTION_NAME (decl))
+  if (VAR_P (decl) && DECL_SECTION_NAME (decl))
     {
       const char *section = DECL_SECTION_NAME (decl);
       if (compare_section_name (section, ".sdata")
@@ -21371,7 +21370,7 @@ rs6000_xcoff_asm_named_section (const char *name, unsigned int flags,
 }
 
 #define IN_NAMED_SECTION(DECL) \
-  ((TREE_CODE (DECL) == FUNCTION_DECL || TREE_CODE (DECL) == VAR_DECL) \
+  ((TREE_CODE (DECL) == FUNCTION_DECL || VAR_P (DECL)) \
    && DECL_SECTION_NAME (DECL) != NULL)
 
 static section *
@@ -21862,7 +21861,7 @@ rs6000_xcoff_encode_section_info (tree decl, rtx rtl, int first)
 
   flags = SYMBOL_REF_FLAGS (symbol);
 
-  if (TREE_CODE (decl) == VAR_DECL && DECL_THREAD_LOCAL_P (decl))
+  if (VAR_P (decl) && DECL_THREAD_LOCAL_P (decl))
     flags &= ~SYMBOL_FLAG_HAS_BLOCK_INFO;
 
   SYMBOL_REF_FLAGS (symbol) = flags;
@@ -23743,7 +23742,7 @@ rs6000_function_value (const_tree valtype,
   /* VSX is a superset of Altivec and adds V2DImode/V2DFmode.  Since the same
      return register is used in both cases, and we won't see V2DImode/V2DFmode
      for pure altivec, combine the two cases.  */
-  else if ((TREE_CODE (valtype) == VECTOR_TYPE || VECTOR_ALIGNMENT_P (mode))
+  else if ((VECTOR_TYPE_P (valtype) || VECTOR_ALIGNMENT_P (mode))
           && TARGET_ALTIVEC && TARGET_ALTIVEC_ABI
           && ALTIVEC_OR_VSX_VECTOR_MODE (mode))
     regno = ALTIVEC_ARG_RETURN;
@@ -24123,7 +24122,7 @@ invalid_arg_for_unprototyped_fn (const_tree typelist, const_tree funcdecl, const
 {
   return (!rs6000_darwin64_abi
          && typelist == 0
-          && TREE_CODE (TREE_TYPE (val)) == VECTOR_TYPE
+         && VECTOR_TYPE_P (TREE_TYPE (val))
           && (funcdecl == NULL_TREE
               || (TREE_CODE (funcdecl) == FUNCTION_DECL
                   && DECL_BUILT_IN_CLASS (funcdecl) != BUILT_IN_MD)))
index 56e77b6999385d40b679a4c963f87c16c3b1ef24..269f4f8e978dbc2acd3ef329f8e34d83c643b95c 100644 (file)
@@ -781,7 +781,7 @@ s390_fn_types_compatible (enum s390_builtin_ov_type_index typeindex,
       tree in_arg = (*arglist)[i];
       tree in_type = TREE_TYPE (in_arg);
 
-      if (TREE_CODE (b_arg_type) == VECTOR_TYPE)
+      if (VECTOR_TYPE_P (b_arg_type))
        {
          /* Vector types have to match precisely.  */
          if (b_arg_type != in_type
@@ -854,7 +854,7 @@ s390_vec_n_elem (tree fndecl)
   tree b_arg_chain;
   int n_elem = -1;
 
-  if (TREE_CODE (TREE_TYPE (TREE_TYPE (fndecl))) == VECTOR_TYPE)
+  if (VECTOR_TYPE_P (TREE_TYPE (TREE_TYPE (fndecl))))
     n_elem = TYPE_VECTOR_SUBPARTS (TREE_TYPE (TREE_TYPE ((fndecl))));
 
   for (b_arg_chain = TYPE_ARG_TYPES (TREE_TYPE (fndecl));
index 54ee5fc86b0ffc5a5267c46bd4a0228559b2d38b..9284477396d8fb6c2aa673c58a7ca5ec74d110fd 100644 (file)
@@ -612,7 +612,7 @@ s390_check_type_for_vector_abi (const_tree type, bool arg_p, bool in_struct_p)
         true here.  */
       s390_check_type_for_vector_abi (TREE_TYPE (type), arg_p, in_struct_p);
     }
-  else if (TREE_CODE (type) == FUNCTION_TYPE || TREE_CODE (type) == METHOD_TYPE)
+  else if (FUNC_OR_METHOD_TYPE_P (type))
     {
       tree arg_chain;
 
@@ -12766,7 +12766,7 @@ s390_function_arg_integer (machine_mode mode, const_tree type)
       || POINTER_TYPE_P (type)
       || TREE_CODE (type) == NULLPTR_TYPE
       || TREE_CODE (type) == OFFSET_TYPE
-      || (TARGET_SOFT_FLOAT && TREE_CODE (type) == REAL_TYPE))
+      || (TARGET_SOFT_FLOAT && SCALAR_FLOAT_TYPE_P (type)))
     return true;
 
   /* We also accept structs of size 1, 2, 4, 8 that are not
@@ -12935,7 +12935,7 @@ s390_return_in_memory (const_tree type, const_tree fundecl ATTRIBUTE_UNUSED)
   if (INTEGRAL_TYPE_P (type)
       || POINTER_TYPE_P (type)
       || TREE_CODE (type) == OFFSET_TYPE
-      || TREE_CODE (type) == REAL_TYPE)
+      || SCALAR_FLOAT_TYPE_P (type))
     return int_size_in_bytes (type) > 8;
 
   /* vector types which fit into a VR.  */
@@ -13702,7 +13702,7 @@ s390_encode_section_info (tree decl, rtx rtl, int first)
 {
   default_encode_section_info (decl, rtl, first);
 
-  if (TREE_CODE (decl) == VAR_DECL)
+  if (VAR_P (decl))
     {
       /* Store the alignment to be able to check if we can use
         a larl/load-relative instruction.  We only handle the cases
index cf6188bd19db5b55afcb560df3e853d150e994f9..938f7aa62819029db14e3d61dbeb6c386a9b251d 100644 (file)
@@ -7697,7 +7697,7 @@ sh_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
       eff_type = type;
       while (TREE_CODE (eff_type) == RECORD_TYPE
             && (member = find_sole_member (eff_type))
-            && (TREE_CODE (TREE_TYPE (member)) == REAL_TYPE
+            && (SCALAR_FLOAT_TYPE_P (TREE_TYPE (member))
                 || TREE_CODE (TREE_TYPE (member)) == COMPLEX_TYPE
                 || TREE_CODE (TREE_TYPE (member)) == RECORD_TYPE))
        {
@@ -7718,14 +7718,14 @@ sh_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
       bool pass_as_float;
       if (TARGET_FPU_DOUBLE)
        {
-         pass_as_float = ((TREE_CODE (eff_type) == REAL_TYPE && size <= 8)
+         pass_as_float = ((SCALAR_FLOAT_TYPE_P (eff_type) && size <= 8)
                           || (TREE_CODE (eff_type) == COMPLEX_TYPE
-                              && TREE_CODE (TREE_TYPE (eff_type)) == REAL_TYPE
+                              && SCALAR_FLOAT_TYPE_P (TREE_TYPE (eff_type))
                               && size <= 16));
        }
       else
        {
-         pass_as_float = (TREE_CODE (eff_type) == REAL_TYPE && size == 4);
+         pass_as_float = (SCALAR_FLOAT_TYPE_P (eff_type) && size == 4);
        }
 
       addr = create_tmp_var (pptr_type_node);
@@ -7738,7 +7738,7 @@ sh_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p,
        {
          tree next_fp_tmp = create_tmp_var (TREE_TYPE (f_next_fp));
          tree cmp;
-         bool is_double = size == 8 && TREE_CODE (eff_type) == REAL_TYPE;
+         bool is_double = size == 8 && SCALAR_FLOAT_TYPE_P (eff_type);
 
          tmp = build1 (ADDR_EXPR, pptr_type_node, unshare_expr (next_fp));
          gimplify_assign (unshare_expr (addr), tmp, pre_p);
@@ -8139,7 +8139,7 @@ sh_function_value (const_tree valtype,
             && (TREE_CODE (valtype) == INTEGER_TYPE
                 || TREE_CODE (valtype) == ENUMERAL_TYPE
                 || TREE_CODE (valtype) == BOOLEAN_TYPE
-                || TREE_CODE (valtype) == REAL_TYPE
+                || SCALAR_FLOAT_TYPE_P (valtype)
                 || TREE_CODE (valtype) == OFFSET_TYPE))
            && sh_promote_prototypes (fn_decl_or_type)
            ? SImode : TYPE_MODE (valtype)),
index 78b780a41c08fd65e8eec70ee002e9bddceec68c..25f62beec13e8177064ec20df440a2d79d6366cd 100644 (file)
@@ -46,7 +46,7 @@ solaris_insert_attributes (tree decl, tree *attributes)
 {
   tree *x, next;
 
-  if (solaris_pending_aligns != NULL && TREE_CODE (decl) == VAR_DECL)
+  if (solaris_pending_aligns != NULL && VAR_P (decl))
     for (x = &solaris_pending_aligns; *x; x = &TREE_CHAIN (*x))
       {
        tree name = TREE_PURPOSE (*x);
index 8c0c9dce9714a30bf4c52ae6fd62d514c102268c..0aade05faf514dd91f8bd071571f20fd0452c56a 100644 (file)
@@ -6904,7 +6904,7 @@ function_arg_slotno (const struct sparc_args *cum, machine_mode mode,
      their mode, depending upon whether VIS instructions are enabled.  */
   if (type && VECTOR_TYPE_P (type))
     {
-      if (TREE_CODE (TREE_TYPE (type)) == REAL_TYPE)
+      if (SCALAR_FLOAT_TYPE_P (TREE_TYPE (type)))
        {
          /* The SPARC port defines no floating-point vector modes.  */
          gcc_assert (mode == BLKmode);
index c34f2f53b39c1bdde57391735c035dc07f90c962..2d45437f5a2686ec63931f6c525cb8ac47d7589a 100644 (file)
@@ -551,9 +551,7 @@ along with GCC; see the file COPYING3.  If not see
    the smaller of COMPUTED and `BIGGEST_ALIGNMENT' */
 #define ROUND_TYPE_ALIGN(STRUCT, COMPUTED, SPECIFIED)  \
  (TARGET_FASTER_STRUCTS ?                              \
-  ((TREE_CODE (STRUCT) == RECORD_TYPE                  \
-    || TREE_CODE (STRUCT) == UNION_TYPE                 \
-    || TREE_CODE (STRUCT) == QUAL_UNION_TYPE)           \
+  (RECORD_OR_UNION_TYPE_P (STRUCT)        \
    && TYPE_FIELDS (STRUCT) != 0                         \
      ? MAX (MAX ((COMPUTED), (SPECIFIED)), BIGGEST_ALIGNMENT) \
      : MAX ((COMPUTED), (SPECIFIED)))                  \
index 81b32dbc958cb1c97e30aba04b0784f8320be25f..cd453c2a2f709b8c8f7691c38e0e19690c2327ae 100644 (file)
@@ -1756,7 +1756,7 @@ xstormy16_encode_section_info (tree decl, rtx r, int first)
 {
   default_encode_section_info (decl, r, first);
 
-   if (TREE_CODE (decl) == VAR_DECL
+   if (VAR_P (decl)
       && (lookup_attribute ("below100", DECL_ATTRIBUTES (decl))
          || lookup_attribute ("BELOW100", DECL_ATTRIBUTES (decl))))
     {
@@ -2427,7 +2427,7 @@ xstormy16_handle_below100_attribute (tree *node,
               "%<__BELOW100__%> attribute only applies to variables");
       *no_add_attrs = true;
     }
-  else if (args == NULL_TREE && TREE_CODE (*node) == VAR_DECL)
+  else if (args == NULL_TREE && VAR_P (*node))
     {
       if (! (TREE_PUBLIC (*node) || TREE_STATIC (*node)))
        {
index 367ba033d66abc89a6eb682647161a6152f98282..0fb72716b17481c3135089192944a13d02a76b84 100644 (file)
@@ -2161,7 +2161,7 @@ v850_encode_section_info (tree decl, rtx rtl, int first)
 {
   default_encode_section_info (decl, rtl, first);
 
-  if (TREE_CODE (decl) == VAR_DECL
+  if (VAR_P (decl)
       && (TREE_STATIC (decl) || DECL_EXTERNAL (decl)))
     v850_encode_data_area (decl, XEXP (rtl, 0));
 }
@@ -2482,7 +2482,7 @@ v850_insert_attributes (tree decl, tree * attr_ptr ATTRIBUTE_UNUSED )
   if (data_area_stack
       && data_area_stack->data_area
       && current_function_decl == NULL_TREE
-      && (TREE_CODE (decl) == VAR_DECL || TREE_CODE (decl) == CONST_DECL)
+      && (VAR_P (decl) || TREE_CODE (decl) == CONST_DECL)
       && v850_get_data_area (decl) == DATA_AREA_NORMAL)
     v850_set_data_area (decl, data_area_stack->data_area);
 
@@ -2508,7 +2508,7 @@ v850_insert_attributes (tree decl, tree * attr_ptr ATTRIBUTE_UNUSED )
     }
   
   if (current_function_decl == NULL_TREE
-      && (TREE_CODE (decl) == VAR_DECL
+      && (VAR_P (decl)
          || TREE_CODE (decl) == CONST_DECL
          || TREE_CODE (decl) == FUNCTION_DECL)
       && (!DECL_EXTERNAL (decl) || DECL_INITIAL (decl))
index ec4c2e9ae5cb0b5322b731d6bd6ed65964c17b0b..48a61744db64314b4efe473a4879cd1226bbba63 100644 (file)
@@ -1313,7 +1313,7 @@ static bool
 visium_pass_by_reference (cumulative_args_t, const function_arg_info &arg)
 {
   tree type = arg.type;
-  return type && (AGGREGATE_TYPE_P (type) || TREE_CODE (type) == VECTOR_TYPE);
+  return type && (AGGREGATE_TYPE_P (type) || VECTOR_TYPE_P (type));
 }
 
 /* Define how arguments are passed.
@@ -1409,7 +1409,7 @@ visium_function_arg_advance (cumulative_args_t pcum_v,
 static bool
 visium_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED)
 {
-  return (AGGREGATE_TYPE_P (type) || TREE_CODE (type) == VECTOR_TYPE);
+  return (AGGREGATE_TYPE_P (type) || VECTOR_TYPE_P (type));
 }
 
 /* Define how scalar values are returned.  */
index 9e5d314e143ebf52f6a79ebba172994641647dad..bb1444c44b6a70f239c54631eb47b00f069859a5 100644 (file)
@@ -4287,7 +4287,7 @@ xtensa_multibss_section_type_flags (tree decl, const char *name, int reloc)
   suffix = strrchr (name, '.');
   if (suffix && strcmp (suffix, ".bss") == 0)
     {
-      if (!decl || (TREE_CODE (decl) == VAR_DECL
+      if (!decl || (VAR_P (decl)
                    && DECL_INITIAL (decl) == NULL_TREE))
        flags |= SECTION_BSS;  /* @nobits */
       else
This page took 0.322341 seconds and 5 git commands to generate.