diff options
author | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2023-05-14 01:03:40 +0200 |
---|---|---|
committer | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2023-05-18 21:50:47 +0200 |
commit | ca2007a9bb3074146780fc1e1382c7f73eb6d71b (patch) | |
tree | 61fae5f3ff499088462bad758984eb9fcaba8aaf /gcc/tree.cc | |
parent | a64c2b0d92295d2e9041f41b8425fd0d0ae04324 (diff) | |
download | gcc-ca2007a9bb3074146780fc1e1382c7f73eb6d71b.zip gcc-ca2007a9bb3074146780fc1e1382c7f73eb6d71b.tar.gz gcc-ca2007a9bb3074146780fc1e1382c7f73eb6d71b.tar.bz2 |
gcc: use _P() defines from tree.h
gcc/ChangeLog:
* alias.cc (ref_all_alias_ptr_type_p): Use _P() defines from tree.h.
* attribs.cc (diag_attr_exclusions): Ditto.
(decl_attributes): Ditto.
(build_type_attribute_qual_variant): Ditto.
* builtins.cc (fold_builtin_carg): Ditto.
(fold_builtin_next_arg): Ditto.
(do_mpc_arg2): Ditto.
* cfgexpand.cc (expand_return): Ditto.
* cgraph.h (decl_in_symtab_p): Ditto.
(symtab_node::get_create): Ditto.
* dwarf2out.cc (base_type_die): Ditto.
(implicit_ptr_descriptor): Ditto.
(gen_array_type_die): Ditto.
(gen_type_die_with_usage): Ditto.
(optimize_location_into_implicit_ptr): Ditto.
* expr.cc (do_store_flag): Ditto.
* fold-const.cc (negate_expr_p): Ditto.
(fold_negate_expr_1): Ditto.
(fold_convert_const): Ditto.
(fold_convert_loc): Ditto.
(constant_boolean_node): Ditto.
(fold_binary_op_with_conditional_arg): Ditto.
(build_fold_addr_expr_with_type_loc): Ditto.
(fold_comparison): Ditto.
(fold_checksum_tree): Ditto.
(tree_unary_nonnegative_warnv_p): Ditto.
(integer_valued_real_unary_p): Ditto.
(fold_read_from_constant_string): Ditto.
* gcc-rich-location.cc (maybe_range_label_for_tree_type_mismatch::get_text): Ditto.
* gimple-expr.cc (useless_type_conversion_p): Ditto.
(is_gimple_reg): Ditto.
(is_gimple_asm_val): Ditto.
(mark_addressable): Ditto.
* gimple-expr.h (is_gimple_variable): Ditto.
(virtual_operand_p): Ditto.
* gimple-ssa-warn-access.cc (pass_waccess::check_dangling_stores): Ditto.
* gimplify.cc (gimplify_bind_expr): Ditto.
(gimplify_return_expr): Ditto.
(gimple_add_padding_init_for_auto_var): Ditto.
(gimplify_addr_expr): Ditto.
(omp_add_variable): Ditto.
(omp_notice_variable): Ditto.
(omp_get_base_pointer): Ditto.
(omp_strip_components_and_deref): Ditto.
(omp_strip_indirections): Ditto.
(omp_accumulate_sibling_list): Ditto.
(omp_build_struct_sibling_lists): Ditto.
(gimplify_adjust_omp_clauses_1): Ditto.
(gimplify_adjust_omp_clauses): Ditto.
(gimplify_omp_for): Ditto.
(goa_lhs_expr_p): Ditto.
(gimplify_one_sizepos): Ditto.
* graphite-scop-detection.cc (scop_detection::graphite_can_represent_scev): Ditto.
* ipa-devirt.cc (odr_types_equivalent_p): Ditto.
* ipa-prop.cc (ipa_set_jf_constant): Ditto.
(propagate_controlled_uses): Ditto.
* ipa-sra.cc (type_prevails_p): Ditto.
(scan_expr_access): Ditto.
* optabs-tree.cc (optab_for_tree_code): Ditto.
* toplev.cc (wrapup_global_declaration_1): Ditto.
* trans-mem.cc (transaction_invariant_address_p): Ditto.
* tree-cfg.cc (verify_types_in_gimple_reference): Ditto.
(verify_gimple_comparison): Ditto.
(verify_gimple_assign_binary): Ditto.
(verify_gimple_assign_single): Ditto.
* tree-complex.cc (get_component_ssa_name): Ditto.
* tree-emutls.cc (lower_emutls_2): Ditto.
* tree-inline.cc (copy_tree_body_r): Ditto.
(estimate_move_cost): Ditto.
(copy_decl_for_dup_finish): Ditto.
* tree-nested.cc (convert_nonlocal_omp_clauses): Ditto.
(note_nonlocal_vla_type): Ditto.
(convert_local_omp_clauses): Ditto.
(remap_vla_decls): Ditto.
(fixup_vla_decls): Ditto.
* tree-parloops.cc (loop_has_vector_phi_nodes): Ditto.
* tree-pretty-print.cc (print_declaration): Ditto.
(print_call_name): Ditto.
* tree-sra.cc (compare_access_positions): Ditto.
* tree-ssa-alias.cc (compare_type_sizes): Ditto.
* tree-ssa-ccp.cc (get_default_value): Ditto.
* tree-ssa-coalesce.cc (populate_coalesce_list_for_outofssa): Ditto.
* tree-ssa-dom.cc (reduce_vector_comparison_to_scalar_comparison): Ditto.
* tree-ssa-forwprop.cc (can_propagate_from): Ditto.
* tree-ssa-propagate.cc (may_propagate_copy): Ditto.
* tree-ssa-sccvn.cc (fully_constant_vn_reference_p): Ditto.
* tree-ssa-sink.cc (statement_sink_location): Ditto.
* tree-ssa-structalias.cc (type_must_have_pointers): Ditto.
* tree-ssa-ter.cc (find_replaceable_in_bb): Ditto.
* tree-ssa-uninit.cc (warn_uninit): Ditto.
* tree-ssa.cc (maybe_rewrite_mem_ref_base): Ditto.
(non_rewritable_mem_ref_base): Ditto.
* tree-streamer-in.cc (lto_input_ts_type_non_common_tree_pointers): Ditto.
* tree-streamer-out.cc (write_ts_type_non_common_tree_pointers): Ditto.
* tree-vect-generic.cc (do_binop): Ditto.
(do_cond): Ditto.
* tree-vect-stmts.cc (vect_init_vector): Ditto.
* tree-vector-builder.h (tree_vector_builder::note_representative): Ditto.
* tree.cc (sign_mask_for): Ditto.
(verify_type_variant): Ditto.
(gimple_canonical_types_compatible_p): Ditto.
(verify_type): Ditto.
* ubsan.cc (get_ubsan_type_info_for_type): Ditto.
* var-tracking.cc (prepare_call_arguments): Ditto.
(vt_add_function_parameters): Ditto.
* varasm.cc (decode_addr_const): Ditto.
Diffstat (limited to 'gcc/tree.cc')
-rw-r--r-- | gcc/tree.cc | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/tree.cc b/gcc/tree.cc index 7e6de28..8e144bc 100644 --- a/gcc/tree.cc +++ b/gcc/tree.cc @@ -2719,7 +2719,7 @@ sign_mask_for (tree type) return NULL_TREE; auto mask = wi::set_bit_in_zero (bits - 1, bits); - if (TREE_CODE (inttype) == VECTOR_TYPE) + if (VECTOR_TYPE_P (inttype)) { tree elt = wide_int_to_tree (TREE_TYPE (inttype), mask); return build_vector_from_val (inttype, elt); @@ -4959,7 +4959,7 @@ do { tree _node = (NODE); \ address is constant too. If it's a decl, its address is constant if the decl is static. Everything else is not constant and, furthermore, taking the address of a volatile variable is not volatile. */ - if (TREE_CODE (node) == INDIRECT_REF + if (INDIRECT_REF_P (node) || TREE_CODE (node) == MEM_REF) UPDATE_FLAGS (TREE_OPERAND (node, 0)); else if (CONSTANT_CLASS_P (node)) @@ -13462,8 +13462,8 @@ verify_type_variant (const_tree t, tree tv) if ((TREE_CODE (t) == ENUMERAL_TYPE && COMPLETE_TYPE_P (t)) || TREE_CODE (t) == INTEGER_TYPE || TREE_CODE (t) == BOOLEAN_TYPE - || TREE_CODE (t) == REAL_TYPE - || TREE_CODE (t) == FIXED_POINT_TYPE) + || SCALAR_FLOAT_TYPE_P (t) + || FIXED_POINT_TYPE_P (t)) { verify_variant_match (TYPE_MAX_VALUE); verify_variant_match (TYPE_MIN_VALUE); @@ -13543,7 +13543,7 @@ verify_type_variant (const_tree t, tree tv) return false; } } - else if ((TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE)) + else if (FUNC_OR_METHOD_TYPE_P (t)) verify_variant_match (TYPE_ARG_TYPES); /* For C++ the qualified variant of array type is really an array type of qualified TREE_TYPE. @@ -13684,7 +13684,7 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2, /* Qualifiers do not matter for canonical type comparison purposes. */ /* Void types and nullptr types are always the same. */ - if (TREE_CODE (t1) == VOID_TYPE + if (VOID_TYPE_P (t1) || TREE_CODE (t1) == NULLPTR_TYPE) return true; @@ -13696,7 +13696,7 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2, if (INTEGRAL_TYPE_P (t1) || SCALAR_FLOAT_TYPE_P (t1) || FIXED_POINT_TYPE_P (t1) - || TREE_CODE (t1) == VECTOR_TYPE + || VECTOR_TYPE_P (t1) || TREE_CODE (t1) == COMPLEX_TYPE || TREE_CODE (t1) == OFFSET_TYPE || POINTER_TYPE_P (t1)) @@ -13726,7 +13726,7 @@ gimple_canonical_types_compatible_p (const_tree t1, const_tree t2, } /* Tail-recurse to components. */ - if (TREE_CODE (t1) == VECTOR_TYPE + if (VECTOR_TYPE_P (t1) || TREE_CODE (t1) == COMPLEX_TYPE) return gimple_canonical_types_compatible_p (TREE_TYPE (t1), TREE_TYPE (t2), @@ -14043,8 +14043,8 @@ verify_type (const_tree t) error_found = true; } } - else if (INTEGRAL_TYPE_P (t) || TREE_CODE (t) == REAL_TYPE - || TREE_CODE (t) == FIXED_POINT_TYPE) + else if (INTEGRAL_TYPE_P (t) || SCALAR_FLOAT_TYPE_P (t) + || FIXED_POINT_TYPE_P (t)) { /* FIXME: The following check should pass: useless_type_conversion_p (const_cast <tree> (t), @@ -14070,7 +14070,7 @@ verify_type (const_tree t) error_found = true; } } - else if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE) + else if (FUNC_OR_METHOD_TYPE_P (t)) { if (TYPE_METHOD_BASETYPE (t) && TREE_CODE (TYPE_METHOD_BASETYPE (t)) != RECORD_TYPE @@ -14092,8 +14092,8 @@ verify_type (const_tree t) error_found = true; } } - else if (INTEGRAL_TYPE_P (t) || TREE_CODE (t) == REAL_TYPE - || TREE_CODE (t) == FIXED_POINT_TYPE) + else if (INTEGRAL_TYPE_P (t) || SCALAR_FLOAT_TYPE_P (t) + || FIXED_POINT_TYPE_P (t)) { /* FIXME: The following check should pass: useless_type_conversion_p (const_cast <tree> (t), @@ -14235,7 +14235,7 @@ verify_type (const_tree t) } } } - else if (TREE_CODE (t) == FUNCTION_TYPE || TREE_CODE (t) == METHOD_TYPE) + else if (FUNC_OR_METHOD_TYPE_P (t)) for (tree l = TYPE_ARG_TYPES (t); l; l = TREE_CHAIN (l)) { /* C++ FE uses TREE_PURPOSE to store initial values. */ |