diff options
author | Jakub Jelinek <jakub@redhat.com> | 2024-03-20 11:46:07 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2024-03-20 11:46:07 +0100 |
commit | 59067ddf66e71bd1bab92a9f581d01657286382c (patch) | |
tree | 3307fb3b323461d9a6b9b17baad2f499763c069a /gcc/objc | |
parent | 456e10f28b36aa417e0db145556831c4f979fbd7 (diff) | |
download | gcc-59067ddf66e71bd1bab92a9f581d01657286382c.zip gcc-59067ddf66e71bd1bab92a9f581d01657286382c.tar.gz gcc-59067ddf66e71bd1bab92a9f581d01657286382c.tar.bz2 |
Use integer_{zero,one}_node some more
When looking at the analyzer MEM_REF invalid second arg issue, I've noticed
tons of build_int_cst (integer_type_node, {0,1}) or build_zero_cst
(integer_type_node) cases.
That just wastes compile time (albeit not very much).
The following patch fixes what my sed script found.
2024-03-20 Jakub Jelinek <jakub@redhat.com>
gcc/analyzer/
* constraint-manager.cc (test_range, test_constraint_conditions,
test_constant_comparisons, test_constraint_impl, test_purging,
test_bits): Use integer_zero_node instead of
build_zero_cst (integer_type_node) or
build_int_cst (integer_type_node, 0) and integer_one_node instead of
build_int_cst (integer_type_node, 1).
* region-model.cc (region_model::get_store_value,
append_interesting_constants, test_array_1,
test_get_representative_tree, test_unique_constants, test_assignment,
test_stack_frames, test_constraint_merging, test_widening_constraints,
test_iteration_1, test_array_2): Likewise.
gcc/cp/
* coroutines.cc (expand_one_await_expression): Use
integer_zero_node instead of build_int_cst (integer_type_node, 0)
and integer_one_node instead of build_int_cst (integer_type_node, 1).
gcc/fortran/
* trans-array.cc (structure_alloc_comps): Use integer_zero_node
instead of build_zero_cst (integer_type_node) or
build_int_cst (integer_type_node, 0) and integer_one_node instead of
build_int_cst (integer_type_node, 1).
* trans-expr.cc (conv_scalar_char_value): Likewise.
* trans-stmt.cc (gfc_trans_form_team, gfc_trans_change_team,
gfc_trans_sync_team, gfc_trans_sync): Likewise.
* trans-decl.cc (create_main_function): Likewise.
* trans-intrinsic.cc (trans_this_image, conv_intrinsic_move_alloc):
Likewise.
* trans.cc (gfc_allocate_using_caf_lib, gfc_deallocate_with_status):
Likewise.
gcc/objc/
* objc-next-runtime-abi-02.cc (build_v2_class_ro_t_initializer): Use
integer_zero_node instead of build_int_cst (integer_type_node, 0).
Diffstat (limited to 'gcc/objc')
-rw-r--r-- | gcc/objc/objc-next-runtime-abi-02.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/objc/objc-next-runtime-abi-02.cc b/gcc/objc/objc-next-runtime-abi-02.cc index b3de6d7..cdf559b 100644 --- a/gcc/objc/objc-next-runtime-abi-02.cc +++ b/gcc/objc/objc-next-runtime-abi-02.cc @@ -3244,7 +3244,7 @@ build_v2_class_ro_t_initializer (tree type, tree name, explicitly declare the alignment padding. */ /* reserved, pads alignment. */ CONSTRUCTOR_APPEND_ELT (initlist, NULL_TREE, - build_int_cst (integer_type_node, 0)); + integer_zero_node); /* ivarLayout */ unsigned_char_star = build_pointer_type (unsigned_char_type_node); |