Age | Commit message (Collapse) | Author | Files | Lines |
|
supported vector types)
2005-08-23 Paolo Bonzini <bonzini@gnu.org>
PR middle-end/23517
* fold-const.c (fold_convert): Use VIEW_CONVERT_EXPR to convert
between vectors.
* convert.c (convert_to_integer, convert_to_vector): Likewise.
* tree-vect-generic.c (tree_vec_extract, expand_vector_operations_1):
Likewise.
From-SVN: r103406
|
|
converting an integer to an integer.
2005-08-03 Andrew Pinski <pinskia@physics.uc.edu>
* convert.c (convert_to_integer): Use fold_build1 instead of
build1 when converting an integer to an integer.
From-SVN: r102680
|
|
* builtins.c, c-common.c, c-convert.c, c-decl.c, c-typeck.c,
convert.c, lambda-code.c, predict.c, tree-cfg.c,
tree-complex.c, tree-data-ref.c, tree-if-conv.c,
tree-mudflap.c, tree-scalar-evolution.c, tree-ssa-ccp.c,
tree-ssa-loop-ivcanon.c, tree-ssa-loop-ivopts.c,
tree-ssa-loop-manip.c, tree-ssa-phiopt.c, tree-ssa-pre.c,
tree-vect-analyze.c, tree-vect-transform.c, tree-vectorizer.c,
tree.c: Use fold_buildN instead of fold (buildN (...)).
From-SVN: r101338
|
|
From-SVN: r101317
|
|
* convert.c (convert_to_pointer): Avoid recursion if no conversion
is needed.
From-SVN: r100518
|
|
by building the NOP_EXPR directly.
* convert.c (convert_to_integer) <POINTER_TYPE>: Avoid recursive
call to convert_to_integer by building the NOP_EXPR directly.
From-SVN: r100184
|
|
PR middle-end/21282
* convert.c (convert_to_integer): Convert ceil and floor in
c99 mode only.
testsuite:
PR middle-end/21282
* gcc.dg/pr21282.c: New.
From-SVN: r99144
|
|
PR tree-optimization/21004
* convert.c (convert_to_integer): Convert ceilf, ceill, floorf
and floorl in c99 mode only.
* builtins.c (expand_builtin_int_roundingfn): Assert that
fallback_fndecl is not NULL_TREE.
testsuite:
PR tree-optimization/21004
* gcc.dg/builtins-53.c: Include builtins-config.h.
Check floorf, ceilf, floorl and ceill transformations
only when HAVE_C99_RUNTIME is defined.
From-SVN: r98174
|
|
long int)ceil{,f,l} into FIX_TRUNC_EXPR.
* convert.c (convert_to_integer): Convert (long int)trunc{,f,l},
and (long long int)ceil{,f,l} into FIX_TRUNC_EXPR.
testsuite:
* gcc.dg/builtins-53.c: Also check (int)trunc* and
(long long int)trunc*.
From-SVN: r98131
|
|
(BUILT_IN_LLCEIL, BUILT_IN_LLCEILF, BUILT_IN_LLCEILL): New.
* optabs.h (enum optab_index): Add new OTI_lceil.
(lceil_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize lceil_optab.
* genopinit.c (optabs): Implement lceil_optab using lceilsi2
and lceildi2 patterns.
* builtins.c (expand_builtin_int_roundingfn): Handle
BUILT_IN_LCEIL{,F,L} and BUILT_IN_LLCEIL{,F,L}.
(fold_builtin_int_roundingfn): Handle BUILT_IN_LCEIL{,F,L} and
BUILT_IN_LLCEIL{,F,L}.
(fold_builtin_1): Fold BUILT_IN_LCEIL{,F,L} and
BUILT_IN_LLCEIL{,F,L} using fold_builtin_int_roundingfn.
(mathfn_built_in): Handle BUILT_IN LCEIL and BUILT_IN_LLCEIL.
(expand_builtin): Expand BUILT_IN_LCEIL{,F,L} and
BUILT_IN_LLCEIL{,F,L} using expand_builtin_int_roundingfn.
* convert.c (convert_to_integer): Convert (long int)ceil{,f,l},
into lceil built-in function and (long long int)ceil{,f,l} into
llceil built-in function.
* fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LCEIL and
BUILT_IN_LLCEIL.
testsuite:
* gcc.dg/builtins-53.c: Also check (int)ceil* and
(long long int)ceil*.
From-SVN: r97964
|
|
(BUILT_IN_LLFLOOR, BUILT_IN_LLFLOORF, BUILT_IN_LLFLOORL): New.
* optabs.h (enum optab_index): Add new OTI_lfloor.
(lfloor_optab): Define corresponding macro.
* optabs.c (init_optabs): Initialize lfloor_optab.
* genopinit.c (optabs): Implement lfloor_optab using lfloorsi2
and lfloordi2 patterns.
* builtins.c (expand_builtin_int_roundingfn): New prototype.
(expand_builtin_int_roundingfn): New function.
(fold_builtin_int_roundingfn): New prototype.
(fold_builtin_int_roundingfn): New function, renamed from
fold_builtin_lround.
Handle BUILT_IN_LROUND{,F,L}, BUILT_IN_LLROUND{,F,L} and
BUILT_IN_LFLOOR{,F,L}, BUILT_IN_LLFLOOR{,F,L}.
(fold_builtin_1): Fold BUILT_IN_LFLOOR{,F,L} and
BUILT_IN_LLFLOOR{,F,L} using fold_builtin_int_roundingfn.
(mathfn_built_in): Handle BUILT_IN LFLOOR and BUILT_IN_LLFLOOR.
(expand_builtin): Expand BUILT_IN_LFLOOR{,F,L} and
BUILT_IN_LLFLOOR{,F,L} using expand_builtin_int_roundingfn.
* convert.c (convert_to_integer): Convert (long int)floor{,f,l},
into lfloor built-in function and (long long int)floor{,f,l} into
llfloor built-in function.
* fold-const.c (tree_expr_nonnegative_p): Add BUILT_IN_LFLOOR and
BUILT_IN_LLFLOOR.
testsuite:
* gcc.dg/builtins-53.c: New test.
From-SVN: r97886
|
|
PR c++/20023
PR tree-optimization/20009
* convert.c (convert_to_integer): Revert 2005-02-16 change.
* gcc.c-torture/compile/20050217-1.c: New test.
* g++.dg/opt/switch3.C: New test.
From-SVN: r95208
|
|
* bt-load.c, cfgloop.c, convert.c, dominance.c, global.c,
loop-invariant.c, stmt.c, tree-ssa-forwprop.c,
tree-ssa-live.c, tree-ssanames.c, tree-vn.c,
config/host-linux.c, config/arm/fpa.md, config/avr/avr.h:
Update copyright.
From-SVN: r95202
|
|
program)
PR middle-end/19857
* fold-const.c (fold): Don't optimize (T)(x & cst) to
(T)x & (T)cst if (T)cst overflows.
* convert.c (convert_to_integer) <case POINTER_TYPE>: Pass
TYPE_UNSIGNED (type) as type_for_size's UNSIGNEDP argument.
* gcc.dg/tree-ssa/20050215-1.c: New test.
* gcc.c-torture/execute/20050215-1.c: New test.
From-SVN: r95106
|
|
PR tree-optimization/17512
* convert.c (convert_to_integer): Don't handle TRUTH_*_EXPR as
special cases.
* testsuite/gcc.c-torture/compile/20040916-1.c.
From-SVN: r87870
|
|
2004-09-17 Jeffrey D. Oldham <oldham@codesourcery.com>
Zack Weinberg <zack@codesourcery.com>
* alias.c (find_base_decl): Remove unreachable case '3' block.
* expr.c (safe_from_p): Abort if passed a type.
* tree-gimple.c (recalculate_side_effects): Abort if passed
anything other than an expression.
* tree-ssa-pre.c (phi_translate): Return expr immediately if
is_gimple_min_invariant is true for it. Reorder cases for clarity.
Abort on un-handled tree classes.
(valid_in_set): Likewise.
* tree.c (tree_code_class_strings): New static data.
* tree.h (enum tree_code_class): New.
(tree_code_class_strings): Declare.
(TREE_CODE_CLASS_STRING, EXCEPTIONAL_CLASS_P, CONSTANT_CLASS_P)
(REFERENCE_CLASS_P, COMPARISON_CLASS_P, UNARY_CLASS_P, BINARY_CLASS_P)
(STATEMENT_CLASS_P, EXPRESSION_CLASS_P, IS_TYPE_OR_DECL_P): New macros.
(TYPE_P, DECL_P, IS_NON_TYPE_CODE_CLASS, IS_EXPR_CODE_CLASS)
(checking macros, EXPR_LOCATION, SET_EXPR_LOCATION, EXPR_LOCUS): Update.
* tree.def, c-common.def, objc/objc-tree.def: Use
tree_code_class enumeration constants instead of code letters.
* alias.c, builtins.c, c-common.c, c-format.c, c-lang.c, c-pragma.c
* c-typeck.c, cgraphunit.c, convert.c, dbxout.c, dwarf2out.c
* emit-rtl.c expr.c, fold-const.c, gimplify.c, lambda-code.c
* langhooks.c, langhooks.h, predict.c, print-tree.c, reload1.c, stmt.c
* tree-browser.c, tree-cfg.c, tree-chrec.c, tree-complex.c, tree-dfa.c
* tree-dump.c, tree-eh.c, tree-gimple.c, tree-inline.c, tree-nested.c
* tree-outof-ssa.c, tree-pretty-print.c, tree-sra.c, tree-ssa-ccp.c
* tree-ssa-dce.c, tree-ssa-dom.c, tree-ssa-forwprop.c, tree-ssa-live.c
* tree-ssa-loop-im.c, tree-ssa-loop-ivopts.c, tree-ssa-operands.c
* tree-ssa-phiopt.c, tree-ssa-pre.c, tree-ssa-propagate.c
* tree-ssa.c, tree-ssanames.c, tree-tailcall.c, tree.c, varasm.c
* config/sol2-c.c, config/arm/arm.c, config/i386/winnt.c
* config/pa/pa.c, config/pa/pa.h, config/sh/sh.c, objc/objc-lang.c
Update to match.
* LANGUAGES: Add note about change.
ada:
* ada-tree.def: Use tree_code_class enumeration constants
instead of code letters.
* ada-tree.h, decl.c, misc.c, trans.c, utils.c, utils2.c:
Update for new tree-class enumeration constants.
cp:
* cp-tree.def: Use tree_code_class enumeration constants
instead of code letters.
* call.c, class.c, cp-gimplify.c, cp-lang.c, cxx-pretty-print.c
* mangle.c, pt.c, semantics.c, tree.c, typeck.c:
Update for new tree-class enumeration constants.
fortran:
* f95-lang.c, trans-expr.c, trans.c: Update for new tree-class
enumeration constants.
java:
* java-tree.def: Use tree_code_class enumeration constants
instead of code letters.
* java-gimplify.c, jcf-write.c, lang.c, parse.y: Update for
new tree-class enumeration constants.
treelang:
* treetree.c: Update for new tree-class enumeration constants.
From-SVN: r87675
|
|
* convert.c (convert_to_vector): Replace recursive call with
error_mark_node.
* gcc.dg/convert-vec-1.c: New test.
From-SVN: r87340
|
|
* tree.h (build_int_cst): New, sign extended constant.
(build_int_cstu): New, zero extended constant.
(build_int_cst_wide): Renamed from build_int_cst.
* tree.c (build_int_cst, build_int_cstu): New.
(build_int_cst_wide): Renamed from build_int_cst.
(make_vector_type, build_common_tree_nodes,
build_common_tree_nodes_2): Adjust build_int_cst calls.
* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
expand_builtin_strpbrk, expand_builtin_fputs,
build_string_literal, expand_builtin_printf,
expand_builtin_sprintf, fold_builtin_classify_type,
fold_builtin_lround, fold_builtin_bitop, fold_builtin_isascii,
fold_builtin_toascii, fold_builtin_isdigit,
simplify_builtin_strstr, simplify_builtin_strpbrk,
fold_builtin_fputs, simplify_builtin_sprintf): Likewise.
* c-common.c (start_fname_decls, fix_string_type, shorten_compare,
DEF_ATTR_INT): Likewise.
* c-decl.c (complete_array_type, check_bitfield_type_and_width):
Likewise.
* c-lex.c (interpret_integer, lex_charconst): Likewise.
* c-parse.in (primary) <TYPES_COMPATIBLE_P> Likewise.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
* c-typeck.c (really_start_incremental_init, push_init_level,
set_nonincremental_init_from_string): Likewise.
* calls.c (load_register_parameters): Likewise.
convert.c (convert_to_pointer): Likewise.
coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
build_fn_info_type, build_fn_info_value, build_ctr_info_value,
build_gcov_info): Likewise.
* except.c (init_eh, assign_filter_values): Likewise.
* expmed.c (store_fixed_bit_field, extract_bit_field,
extract_fixed_bit_field, extract_split_bit_field, expand_shift,
expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
* expr.c (convert_move, emit_group_load, emit_group_store,
expand_assignment, store_constructor, store_field,
expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
invert_truthvalue, optimize_bit_field_compare,
decode_field_reference, all_ones_mask_p, constant_boolean_node,
fold_div_compare, fold, fold_read_from_constant_string,
fold_negate_const, fold_abs_const, fold_not_const, round_up,
round_down): Likewise.
* function.c (assign_parm_setup_block): Likewise.
* stmt.c (shift_return_value, expand_case, estimate_case_costs):
Likewise.
* stor-layout.c (layout_type, initialize_sizetypes,
set_min_and_max_values_for_integral_type): Likewise.
* tree-chrec.c (chrec_fold_multiply_poly_poly,
reset_evolution_in_loop): Likewise.
* tree-chrec.h (build_polynomial_chrec): Likewise.
* tree-complex.c (build_replicated_const): Likewise.
* tree-eh.c (honor_protect_cleanup_actions,
lower_try_finally_onedest, lower_try_finally_copy,
lower_try_finally_switch): Likewise.
* tree-mudflap.c (mf_build_string, mx_register_decls,
mudflap_register_call, mudflap_enqueue_constant): Likewise.
* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
Likewise.
* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
* tree-ssa-loop-niter.c (number_of_iterations_cond,
loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
Likewise.
* tree-ssa-loop-ivcanon.c (create_canonical_iv,
canonicalize_loop_induction_variables): Likewise.
* tree-vectorizer.c (vect_create_index_for_array_ref,
vect_transform_loop_bound, vect_compute_data_ref_alignment):
Likewise.
* config/alpha/alpha.c (alpha_initialize_trampoline, alpha_va_start,
alpha_gimplify_va_arg_1): Likewise.
* config/arm/arm.c (arm_get_cookie_size): Likewise.
* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
mips_gimplify_va_arg_expr): Likewise.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
add_compiler_branch_island): Likewise.
* config/s390/s390.c (s390_va_start): Likewise.
* config/sh/sh.c (sh_va_start): Likewise.
* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
Likewise.
* config/xtensa/xtensa.c (xtensa_va_start,
xtensa_gimplify_va_arg_expr): Likewise.
* objc/objc-act.c (build_objc_string_object,
build_objc_symtab_template, init_def_list, init_objc_symtab,
init_module_descriptor, generate_static_references,
build_selector_translation_table, get_proto_encoding,
build_typed_selector_reference, build_selector_reference,
build_next_objc_exception_stuff,
build_method_prototype_list_template, generate_descriptor_table,
generate_protocols, build_protocol_initializer,
build_ivar_list_template, build_method_list_template,
build_ivar_list_initializer, generate_ivars_list,
generate_dispatch_table, generate_protocol_list,
build_category_initializer, build_shared_structure_initializer,
generate_shared_structures, handle_impent,
generate_objc_image_info): Likewise.
2004-04-25 Paolo Bonzini <bonzini@gnu.org>
* cfglayout.c (duplicate_insn_chain): Remove references to
NOTE_INSN_LOOP_VTOP and NOTE_INSN_LOOP_CONT.
* cfgloop.h (struct loop): Remove fields vtop, cont and cont_dominator.
* cfgrtl.c (rtl_delete_block): Remove handling of NOTE_INSN_LOOP_CONT.
* final.c (final_scan_insn): Remove references to NOTE_INSN_LOOP_VTOP
and NOTE_INSN_LOOP_CONT.
* insn-notes.def (NOTE_INSN_LOOP_VTOP, NOTE_INSN_LOOP_CONT): Remove.
* jump.c (squeeze_notes): Remove references to NOTE_INSN_LOOP_VTOP
and NOTE_INSN_LOOP_CONT.
* loop.c (scan_loops, find_and_verify_loops, for_each_insn_in_loop,
check_dbra_loop, loop_dump_aux): Remove references to removed notes
and fields.
* reorg.c (mostly_true_jump): Do not rely on NOTE_INSN_LOOP_VTOPs.
* unroll.c (unroll_loop, copy_loop_body, loop_iterations): Remove
references to removed notes and fields.
(subtract_reg_term, ujump_to_loop_cont): Remove.
From-SVN: r86544
|
|
.: * tree.h (build_int_cst): New.
(build_int_2): Remove.
* tree.c (build_int_2): Remove.
(build_int_cst): New.
(make_vector_type, build_common_tree_nodes,
build_common_tree_nodes_2): Use build_int_cst.
* builtins.c (expand_builtin_prefetch, expand_builtin_strstr,
expand_builtin_strpbrk, expand_builtin_fputs,
build_string_literal, expand_builtin_printf,
expand_builtin_sprintf, fold_builtin_lround, fold_builtin_bitop,
fold_builtin_bitop, fold_builtin_isascii, fold_builtin_toascii,
fold_builtin_isdigit, simplify_builtin_strstr,
simplify_builtin_strpbrk, fold_builtin_fputs,
simplify_builtin_sprintf): Use build_int_cst.
* c-common.c (start_fname_decls, fix_string_type,
c_common_nodes_and_builtins, c_init_attributes,
shorten_compare): Likewise.
* c-decl.c (complete_array_type,
check_bitfield_type_and_width): Likewise.
* c-lex.c (interpret_integer, lex_charconst): Likewise.
* c-parse.in (primary): <TYPES_COMPATIBLE_P> Likewise.
* c-pretty-print.c (pp_c_integer_constant): Likewise.
* c-typeck.c (really_start_incremental_init, push_init_level,
set_nonincremental_init_from_string): Likewise.
* calls.c (load_register_parameters): Likewise.
* convert.c (convert_to_pointer): Likewise.
* coverage.c (coverage_counter_alloc, tree_coverage_counter_ref,
build_fn_info_type, build_ctr_info_value, build_gcov_info):
Likewise.
* except.c (init_eh, assign_filter_values, assign_filter_values):
Likewise.
* expmed.c (store_fixed_bit_field, extract_bit_field,
extract_fixed_bit_field, extract_split_bit_field, expand_shift,
expand_mult_const, expand_mult_highpart_adjust, extract_high_half,
expand_sdiv_pow2, expand_divmod, make_tree): Likewise.
* expr.c (convert_move, emit_group_load, emit_group_store,
expand_assignment, store_constructor, store_field,
expand_expr_real_1, reduce_to_bit_field_precision): Likewise.
* fold-const.c (force_fit_type, int_const_binop, fold_convert_const,
invert_truthvalue, optimize_bit_field_compare,
decode_field_reference, all_ones_mask_p, constant_boolean_node,
fold_div_compare, fold, fold_read_from_constant_string,
fold_negate_const, fold_abs_const, fold_not_const): Likewise.
* function.c (assign_parm_setup_block): Likewise.
* stmt.c (shift_return_value, expand_end_case_type,
estimate_case_costs): Likewise.
* stor-layout.c (layout_type, initialize_sizetypes,
set_min_and_max_values_for_integral_type): Likewise.
* tree-chrec.c (chrec_fold_multiply_poly_poly,
reset_evolution_in_loop): Likewise.
* tree-chrec.h (build_polynomial_chrec): Likewise.
* tree-complex.c (build_replicated_const): Likewise.
* tree-eh.c (honor_protect_cleanup_actions,
lower_try_finally_onedest, lower_try_finally_copy,
lower_try_finally_switch): Likewise.
* tree-mudflap.c (mf_build_string, mx_register_decls,
mudflap_register_call, mudflap_enqueue_constant): Likewise.
* tree-nested.c (get_trampoline_type, get_nl_goto_field): Likewise.
* tree-pretty-print.c (dump_generic_node): Likewise.
* tree-ssa-ccp.c (widen_bitfield, maybe_fold_offset_to_array_ref):
Likewise.
* tree-ssa-dom.c (simplify_rhs_and_lookup_avail_expr): Likewise.
* tree-ssa-loop-niter.c (number_of_iterations_cond,
loop_niter_by_eval, upper_bound_in_type, lower_bound_in_type):
Likewise.
* config/alpha/alpha.c (alpha_initialize_trampoline,
alpha_va_start, alpha_gimplify_va_arg_1): Use build_int_cst.
* config/arm/arm.c (arm_get_cookie_size): Likewise.
* config/c4x/c4x.c (c4x_gimplify_va_arg_expr): Likewise.
* config/i386/i386.c (ix86_va_start, ix86_gimplify_va_arg): Likewise.
* config/i860/i860.c (i860_va_start): Likewise.
* config/ia64/ia64.c (ia64_gimplify_va_arg): Likewise.
* config/mips/mips.c (mips_build_builtin_va_list, mips_va_start,
mips_gimplify_va_arg_expr): Likewise.
* config/pa/pa.c (hppa_gimplify_va_arg_expr): Likewise.
* config/rs6000/rs6000.c (rs6000_va_start, rs6000_gimplify_va_arg,
add_compiler_branch_island): Likewise.
* config/s390/s390.c (s390_va_start): Likewise.
* config/sh/sh.c (sh_va_start): Likewise.
* config/stormy16/stormy16.c (xstormy16_expand_builtin_va_start):
Likewise.
* config/xtensa/xtensa.c (xtensa_va_start,
xtensa_gimplify_va_arg_expr): Likewise.
* objc/objc-act.c (build_objc_string_object,
build_objc_symtab_template, init_def_list, init_objc_symtab,
init_module_descriptor, generate_static_references,
build_selector_translation_table, get_proto_encoding,
build_typed_selector_reference, build_selector_reference,
build_next_objc_exception_stuff,
build_method_prototype_list_template, generate_descriptor_table,
generate_protocols, build_protocol_initializer,
build_ivar_list_template, build_method_list_template,
build_ivar_list_initializer, generate_ivars_list,
generate_dispatch_table, generate_protocol_list,
build_category_initializer, build_shared_structure_initializer,
generate_shared_structures, handle_impent,
generate_objc_image_info): Use build_int_cst.
ada:
* cuintp.c (UI_To_gnu): Use build_int_cst..
* trans.c (Exception_Handler_to_gnu_sjlj, gnat_to_gnu): Likewise.
* utils.c (init_gigi_decls): Likewise.
* utils2.c (build_call_raise): Likewise.
cp:
* call.c (convert_class_to_reference,
build_user_type_conversion_1, convert_like_real,
build_java_interface_fn_ref, build_special_member_call): Use
build_int_cst.
* class.c (build_vtbl_initializer): Likewise.
* cp-gimplify.c (cp_gimplify_expr): Likewise.
* cvt.c (cp_convert_to_pointer): Likewise.
* decl.c (cxx_init_decl_processing, complete_array_type): Likewise.
* decl2.c (start_static_initialization_or_destruction,
generate_ctor_or_dtor_function): Likewise.
* except.c (build_throw): Likewise.
* lex.c (cxx_init): Likewise.
* mangle.c (write_integer_cst): Likewise.
* rtti.c (build_headof, get_tinfo_decl_dynamic,
build_dynamic_cast_1, ptr_initializer, ptm_initializer,
get_pseudo_ti_init): Likewise.
* search.c (get_dynamic_cast_base_type): Likewise.
* tree.c (build_shared_int_cst): Likewise.
fortran:
* trans-array.c (gfc_trans_array_constructor_value): Use
build_int_cst.
* trans-const.c (gfc_build_string_const,
gfc_init_constants, gfc_conv_mpz_to_tree,
gfc_conv_constant_to_tree): Likewise.
* trans-decl.c (gfc_get_symbol_decl): Likewise.
* trans-intrinsic.c (gfc_conv_intrinsic_ibits,
gfc_conv_intrinsic_len, prepare_arg_info): Likewise.
* trans-io.c (add_case, set_error_locus, build_dt,
transfer_expr): Likewise.
* trans-stmt.c (gfc_trans_label_assign, gfc_trans_pause,
gfc_trans_stop, gfc_trans_character_select): Likewise.
* trans-types.c (gfc_init_types, gfc_get_dtype): Likewise.
* trans.c (gfc_trans_runtime_check): Likewise.
java:
* boehm.c (get_boehm_type_descriptor): Use build_int_cst.
* class.c (build_utf8_ref, build_static_field_ref,
make_field_value, make_method_value, get_dispatch_table,
make_class_data, emit_symbol_table, emit_catch_table): Likewise.
* constants.c (get_tag_node, build_ref_from_constant_pool,
build_constants_constructor): Likewise.
* decl.c (java_init_decl_processing): Likewise.
* expr.c (build_java_array_length_access, build_newarray,
expand_java_multianewarray, expand_java_pushc, expand_iinc,
build_java_binop, build_field_ref, expand_java_add_case,
expand_java_call, build_known_method_ref, build_invokevirtual,
build_invokeinterface, build_jni_stub): Likewise.
* java-gimplify.c (java_gimplify_new_array_init): Likewise.
* jcf-parse.c (get_constant): Likewise.
* lex.c (do_java_lex): Likewise.
* parse.y (patch_binop, patch_unaryop, patch_cast,
build_null_of_type, patch_newarray): Likewise.
* resource.c (compile_resource_data): Likewise.
* typeck.c (build_prim_array_type): Likewise.
From-SVN: r86022
|
|
* convert.c (convert_to_real, convert_to_integer,
convert_to_complex): Replace calls to build with calls to buildN.
* coverage.c (tree_coverage_counter_ref): Likewise.
* dojump.c (do_jump): Likewise.
* dwarf2out.c (loc_descriptor_from_tree): Likewise.
* emit-rtl.c (component_ref_for_mem_expr,
set_mem_attributes_minus_bitpos): Likewise.
* explow.c (update_nonlocal_goto_save_area): Likewise.
* expmed.c (expand_shift, make_tree, const_mult_add_overflow_p,
expand_mult_add): Likewise.
* expr.c (emit_block_move_via_libcall, clear_storage_via_libcall,
store_constructor, get_inner_reference, expand_expr_real_1,
try_casesi, try_tablejump): Likewise.
* function.c (expand_function_start): Likewise.
* stmt.c (emit_case_bit_tests, expand_end_case_type,
node_has_low_bound, node_has_high_bound, emit_case_nodes): Likewise.
* stor-layout.c (place_union_field, layout_type): Likewise.
* tree.c (substitute_in_expr, tree_fold_gcd): Likewise.
* varasm.c (copy_constant): Likewise.
From-SVN: r85160
|
|
TREE_TYPE instead of their mode.
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* c-common.c (vector_types_convertible_p): Use vector types'
TYPE_SIZE and TREE_TYPE instead of their mode.
* convert.c (convert_to_integer): Likewise.
(convert_to_vector): Likewise.
* fold-const.c (fold_convert): Likewise.
* varasm.c (output_constant): Likewise.
* expr.c (store_constructor): Split ARRAY_TYPE and VECTOR_TYPE.
Allow a VECTOR_TYPE initializer to be made of several vectors.
For ARRAY_TYPEs and VECTOR_TYPES, simplify a bit the handling
of cleared and need_to_clear, and use fold_convert.
* c-typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
cp/ChangeLog:
2004-07-21 Paolo Bonzini <bonzini@gnu.org>
* c-typeck.c (build_binary_op): Do not use RDIV_EXPR for
integer vectors.
From-SVN: r85002
|
|
floating point extensions.
* convert.c (strip_float_extension): Skip both NOP_EXPR and
CONVERT_EXPR floating point extensions.
From-SVN: r83565
|
|
generate code instead of a NOP_EXPR.
2004-05-13 Andrew Pinski <pinskia@physics.uc.edu>
* convert.c (convert_to_integer): Make a CONVERT_EXPR when there is a
need to generate code instead of a NOP_EXPR.
From-SVN: r81787
|
|
before using it.
* convert.c (convert_to_integer): Ensure `long_integer_type_node'
isn't NULL before using it.
From-SVN: r81305
|
|
* convert.c (convert_to_integer): Convert (long)round -> lround,
etc.
testsuite:
* gcc.dg/torture/builtin-convert-2.c: New test.
From-SVN: r81269
|
|
* builtins.c, c-aux-info.c, c-common.c, c-cppbuiltin.c, c-decl.c:
Change most occurrences of TREE_UNSIGNED to TYPE_UNSIGNED.
* c-format.c, c-opts.c, c-pretty-print.c, c-typeck.c: Likewise.
* calls.c, convert.c, dbxout.c, dojump.c, dwarf2out.c: Likewise.
* expmed.c, expr.c, fold-const.c, function.c, integrate.c: Likewise.
* optabs.c, sdbout.c, stmt.c, stor-layout.c, tree-dump.c: Likewise.
* tree.c, config/iq2000/iq2000.c, config/m32r/m32r.c: Likewise.
* config/mips/mips.c, config/rs6000/rs6000.c: Likewise.
* config/s390/s390.c, config/sparc/sparc.c, objc/objc-act.c: Likewise.
* stor-layout.c (layout_type, case COMPLEX_TYPE): Test for
REAL_TYPE, not INTEGER_TYPE.
(layout_type, case VECTOR_TYPE): Simplify code.
* tree.c (build_vector_type_for_mode): Remove dup unsigned setting.
* tree.h: Update comments.
(STRIP_NOPS): Use TYPE_UNSIGNED.
(TYPE_UNSIGNED): New macro.
(TYPE_TRAP_SIGNED): Remove now redundant check.
(SAVE_EXPR_NOPLACEHOLDER): Don't use TREE_UNSIGNED.
* cp/call.c (joust): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* cp/class.c (check_bitfield_decl): Likewise.
* cp/cvt.c (type_promotes_to): Likewise.
* cp/decl.c (finish_enum): Likewise.
* cp/mangle.c (write_builtin_type): Likewise.
* cp/semantics.c (finish_switch_cond, finish_unary_op_expr): Likewise.
* cp/typeck.c (type_after_usual_arithmetic_conversions): Likewise.
(build_binary_op): Likewise.
* f/com.c (ffecom_arrayref_): Use TYPE_UNSIGNED, not TREE_UNSIGNED.
(ffecom_expr_): Likewise.
* java/jcf-write.c (generate_bytecode_insns): Use TYPE_UNSIGNED.
* treelang/treetree.c (tree_lang_signed_or_unsigned_type):
Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* ada/decl.c (gnat_to_gnu_entity, make_type_from_size):
Use TYPE_UNSIGNED, not TREE_UNSIGNED.
* ada/trans.c (tree_transform, convert_with_check): Likewise.
* ada/utils.c (gnat_signed_or_unsigned_type): Likewise.
(build_vms_descriptor, unchecked_convert): Likewise.
* ada/utils2.c (nonbinary_modular_operation): Likewise.
From-SVN: r80287
|
|
* convert.c (convert_to_real): Add more math builtins.
testsuite:
* gcc.dg/torture/builtin-convert-1.c: Test more math builtins.
From-SVN: r79668
|
|
From-SVN: r79667
|
|
* builtins.c (integer_valued_real_p): Add builtin rint.
(fold_builtin): Likewise.
* convert.c (convert_to_real): Likewise.
testsuite:
* gcc.dg/torture/builtin-integral-1.c: Also check for `rint'.
From-SVN: r79572
|
|
* convert.c (convert_to_real): Fix typos in `long double'
builtins.
From-SVN: r79571
|
|
lang_hooks.foo ().
* alias.c (get_alias_set): Replace calls via (*lang_hooks.foo) ()
with lang_hooks.foo ().
* builtins.c (expand_builtin_va_arg): Likewise.
* c-common.c (fname_as_string, c_common_truthvalue_conversion,
c_common_type_for_mode, c_common_nodes_and_builtins,
handle_mode_attribute, handle_vector_size_attribute): Likewise.
* c-convert.c (convert): Likewise.
* c-format.c (check_format_types): Likewise.
* c-objc-common.c (c_tree_printer): Likewise.
* c-typeck.c (build_unary_op, build_conditional_expr,
build_binary_op): Likewise.
* calls.c (try_to_integrate, expand_call,
emit_library_call_value_1): Likewise.
* cgraph.c (cgraph_node_name, cgraph_function_possibly_inlined_p):
Likewise.
* cgraphunit.c (record_call_1, cgraph_analyze_function,
cgraph_expand_function): Likewise.
* convert.c (convert_to_pointer, convert_to_integer): Likewise.
* coverage.c (build_fn_info_type, build_ctr_info_type,
build_gcov_info, create_coverage): Likewise.
* dbxout.c (dbxout_init): Likewise.
* diagnostic.c (diagnostic_report_current_function): Likewise.
* dojump.c (do_jump): Likewise.
* dwarf2out.c (dwarf2_name): Likewise.
* except.c (init_eh): Likewise.
* explow.c (expr_size, int_expr_size): Likewise.
* expmed.c (make_tree, const_mult_add_overflow_p, expand_mult_add):
Likewise.
* expr.c (store_expr, store_constructor, safe_from_p,
expand_expr_real, do_store_flag, try_casesi): Likewise.
* function.c (push_function_context_to, pop_function_context_from,
free_after_parsing, assign_stack_local_1, assign_stack_temp_for_type,
put_var_into_stack, allocate_struct_function, current_function_name):
Likewise.
* integrate.c (copy_decl_for_inlining, expand_inline_function):
Likewise.
* langhooks.c (lhd_clear_binding_stack, write_global_declarations,
lhd_print_error_function): Likewise.
* opts.c (handle_option, decode_options): Likewise.
* passes.c (open_dump_file): Likewise.
* print-tree.c (print_node): Likewise.
* stmt.c (expand_fixup, fixup_gotos, expand_asm_operands,
expand_decl_cleanup, emit_case_nodes): Likewise.
* stor-layout.c (variable_size): Likewise.
* toplev.c (announce_function, wrapup_global_declarations,
check_global_declarations, compile_file, default_tree_printer,
process_options, lang_dependent_init, finalize): Likewise.
* tree-dump.c (dequeue_and_dump): Likewise.
* tree-inline.c (remap_decl, remap_block, copy_body_r,
initialize_inlined_parameters, declare_return_variable,
inlinable_function_p, expand_call_inline, optimize_inline_calls,
walk_tree, copy_tree_r): Likewise.
* tree-optimize.c (tree_rest_of_compilation): Likewise.
* tree.c (decl_assembler_name, tree_size, size_in_bytes, staticp,
unsafe_for_reeval, get_unwidened, get_narrower, get_callee_fndecl,
variably_modified_type_p, dump_tree_statistics): Likewise.
* varasm.c (assemble_variable, compare_constant, copy_constant,
force_const_mem, compute_reloc_for_constant, output_constant,
output_addressed_constants, initializer_constant_valid_p): Likewise.
From-SVN: r79481
|
|
* convert.c, gcov-io.c, libgcov.c, sched-int.h, sibcall.c,
config/rs6000/linux.h, config/rs6000/rs6000-c.c: Update
copyright.
From-SVN: r78318
|
|
* Makefile.in (STRICT2_WARN): Add -Wno-variadic-macros.
* tree.c (build0, build1, build2, build3, build4): Split out from...
(build): ... here. Call them.
* tree.h (build, _buildN1, _buildN2, _buildC1, _buildC2): New.
* convert.c (convert_to_integer): Remove extra build argument.
* tree-inline.c (expand_call_inline): Likewise.
ada/
* misc.c (record_code_position): Add third build arg for RTL_EXPR.
java/
* parse.y (switch_label): Use make_node for DEFAULT_EXPR.
From-SVN: r78126
|
|
* c-typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
* convert.c (convert_to_integer): Kill BIT_ANDTC_EXPR.
* fold-const.c (int_const_binop): Kill BIT_ANDTC_EXPR.
(fold): Kill BIT_ANDTC_EXPR and label bit_and.
* tree.def (BIT_ANDTC_EXPR): Kill.
* error.c (dump_expr): Kill BIT_ANDTC_EXPR.
* lex.c (init_operators): Kill BIT_ANDTC_EXPR.
* pt.c (tsubst_copy): Kill BIT_ANDTC_EXPR.
* typeck.c (build_binary_op): Kill BIT_ANDTC_EXPR.
(tsubst_copy_and_build): Kill BIT_ANDTC_EXPR.
* com.c (ffecom_overlap_): Kill BIT_ANDTC_EXPR.
(ffecom_tree_canonize_ref_): Kill BIT_ANDTC_EXPR.
From-SVN: r70972
|
|
* c-decl.c: Fix comment formatting.
* cfgrtl.c: Likewise.
* combine.c: Likewise.
* convert.c: Likewise.
* dominance.c: Likewise.
* dwarf2out.c: Likewise.
* dwarfout.c: Likewise.
* expmed.c: Likewise.
* fold-const.c: Likewise.
* gcov.c: Likewise.
* genattrtab.c: Likewise.
* ggc-common.c: Likewise.
* mips-tfile.c: Likewise.
* regmove.c: Likewise.
From-SVN: r70677
|
|
PR c++/11946
* convert.c (convert_to_integer): Use CONVERT_EXPR (instead of
NOP_EXPR) when necessary.
* c-common.c (c_common_signed_or_unsigned_type): Correctly handle
types with precisions other than those given by native machine
modes.
PR c++/11684
* cp-tree.h (grok_op_properties): Change prototype.
* decl.c (grok_op_properties): Add complain parameter.
(grokfndecl): Pass it.
* pt.c (tsubst_decl): Adjust accordingly.
PR c++/10926
* decl.c (start_method): Return immediately if push_template_decl
does not like the declaration.
* pt.c (push_template_decl_real): Disallow member template
destructors.
PR c++/11036.C
* cp-tree.h (add_binding): Add prototype.
* class.c (add_method): Set TYPE_HAS_DESTRUCTOR if appropriate.
(maybe_warn_about_overly_private_class): Use
CLASSTYPE_DESTRUCTORS.
(pushclass): Adjust call to set_identifier_type_value.
* decl.c (add_binding): Give it external linkage.
(push_local_binding): Adjust call to add_binding.
(push_class_binding): Likewise.
(set_identifier_type_value_with_scope): Change prototype. Use
add_binding for global bindings.
(set_identifier_type_value): Adjust accordingly.
(pushtag): Likewise.
(pushdecl): Use set_identifier_type_value, not
set_identifier_type_value_with_scope.
(pushdecl_namespace_level): Adjust calls to
SET_IDENTIFIER_TYPE_VALUE to pass a DECL.
(pushdecl_class_level): Likewise.
(lookup_tag): Use select_decl.
(select_decl): Improve comment.
(record_builtin_type): Do not call pushdecl.
(cxx_init_decl_processing): Do not call xref_tag for bad_alloc.
(cp_finish_decl): Adjust call to set_identifier_type_value.
(check_elaborated_type_specifier): Improve checks for invalid uses
of typedefs.
(xref_tag): Adjust call to check_elaborated_type_specifier.
* decl2.c (grokclassfn): Do not set TYPE_HAS_DESTRUCTOR.
* name-lookup.c (set_namespace_binding): Use add_binding.
* parser.c (cp_parser_simple_type_specifier): Return a TYPE_DECL,
rather than an IDENTIFIER_NODE, to represent built-in types, if
requested by the caller.
(cp_parser_postfix_expression): Adjust call.
(cp_parser_type_specifier): Likewise.
(cp_parser_elaborated_type_specifier): Adjust call to
check_elaborated_type_specifier.
* typeck2.c (build_functional_cast): Do not perform name lookups.
PR c++/10717
* decl.c (expand_static_init): Remove unncessary code.
PR c++/10926
* g++.dg/template/dtor2.C: New test.
PR c++/11684
* g++.dg/template/operator1.C: New test.
* g++.dg/parse/operator4.C: New test.
PR c++/11946.C
* g++.dg/expr/enum1.C: New test.
* gcc.dg/c99-bool-1.c: Remove bogus warning.
PR c++/11036.C
* g++.dg/parse/elab2.C: New test.
* g++.dg/parse/typedef4.C: Change error message.
* g++.old-deja/g++.robertl/eb133.C: Remove bogus error markers.
* g++.old-deja/g++.robertl/eb133a.C: Remove bogus error markers.
* g++.old-deja/g++.robertl/eb133b.C: Remove bogus error markers.
From-SVN: r70593
|
|
* configure.in (--enable-checking): Add fold category.
(ENABLE_FOLD_CHECKING): Define if requested.
* configure: Rebuilt.
* config.in: Rebuilt.
* doc/install.texi: Document it.
* fold-const.c: Include md5.h.
[ENABLE_FOLD_CHECKING] (fold): Define to fold_1.
[ENABLE_FOLD_CHECKING] (fold, fold_checksum_tree, fold_check_failed,
print_fold_checksum): New functions.
* fold-const.c (fold): Never modify argument passed to fold, instead
change a copy and return it.
* convert.c (convert_to_integer): Likewise.
testsuite/
* gcc.c-torture/compile/20030725-1.c: New test.
From-SVN: r69886
|
|
* basic-block.h: Fix comment typos.
* bb-reorder.c: Likewise.
* c-format.c: Likewise.
* cfgcleanup.c: Likewise.
* cfghooks.h: Likewise.
* cfgloop.c: Likewise.
* cfgloopmanip.c: Likewise.
* cfgrtl.c: Likewise.
* cgraph.h: Likewise.
* cgraphunit.c: Likewise.
* combine.c: Likewise.
* convert.c: Likewise.
* dbxout.c: Likewise.
* df.c: Likewise.
* df.h: Likewise.
* diagnostic.c: Likewise.
* dwarf2out.c: Likewise.
* et-forest.h: Likewise.
* flow.c: Likewise.
* fold-const.c: Likewise.
* function.h: Likewise.
* gcov-io.h: Likewise.
* gcov.c: Likewise.
* gcse.c: Likewise.
* genautomata.c: Likewise.
* ggc-common.c: Likewise.
* ggc-page.c: Likewise.
* loop-unroll.c: Likewise.
* loop-unswitch.c: Likewise.
* loop.c: Likewise.
* mips-tfile.c: Likewise.
* optabs.c: Likewise.
* ra-build.c: Likewise.
* ra-colorize.c: Likewise.
* ra-rewrite.c: Likewise.
* ra.h: Likewise.
* regmove.c: Likewise.
* reload.c: Likewise.
* rtlanal.c: Likewise.
* sched-ebb.c: Likewise.
* sched-int.h: Likewise.
* sched-vis.c: Likewise.
* sreal.c: Likewise.
* ssa-ccp.c: Likewise.
* ssa.c: Likewise.
* toplev.c: Likewise.
* tree-inline.c: Likewise.
* value-prof.c: Likewise.
* value-prof.h: Likewise.
From-SVN: r68770
|
|
* collect2.h: Convert prototypes to ISO C90.
* collect2.c: Likewise.
* conflict.c: Likewise.
* coverage.c: Likewise.
* convert.h: Likewise.
* convert.c: Likewise.
From-SVN: r68669
|
|
Compiler" with...
* convert.c, dwarf2out.c, dwarfout.c, emit-rtl.c, function.c,
lists.c, print-rtl.c, print-tree.c, read-rtl.c, rtl-error.c,
stmt.c, toplev.c, integrate.h, loop.h, machmode.h, rtl.h,
ssa.h, tree.def: Replace overly specific references to "GNU C"
and "GNU C Compiler" with references to "GCC".
From-SVN: r68004
|
|
x is a float, i.e.
* convert.c (convert_to_real): Also optimize (float)log(x) into
logf(x) where x is a float, i.e. also handle BUILT_IN_LOG{,L}.
From-SVN: r63087
|
|
* builtins.c (fold_trunc_transparent_mathfn): New function.
(fold_builtin): Use it.
* convert.c (convert_to_real): Re-enable code to convert
math functions; add support for floor familly functions.
From-SVN: r61764
|
|
* basic-block.h: Fix comment formatting.
* calls.c: Likewise.
* combine.c: Likewise.
* convert.c: Likewise.
* gcov.c: Likewise.
* haifa-sched.c: Likewise.
* libgcc2.c: Likewise.
* loop.c: Likewise.
* profile.c: Likewise.
* system.h: Likewise.
From-SVN: r61478
|
|
* alias.c: Fix comment typos.
* basic-block.h: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-decl.c: Likewise.
* c-opts.c: Likewise.
* c-pragma.c: Likewise.
* c-pretty-print.h: Likewise.
* cfg.c: Likewise.
* cfganal.c: Likewise.
* cfgbuild.c: Likewise.
* cfgcleanup.c: Likewise.
* cfglayout.c: Likewise.
* cfgrtl.c: Likewise.
* convert.c: Likewise.
* cpphash.h: Likewise.
* cpplex.c: Likewise.
* cpplib.h: Likewise.
* df.h: Likewise.
* diagnostic.c: Likewise.
* diagnostic.h: Likewise.
* dwarf2.h: Likewise.
From-SVN: r61462
|
|
PR f/9258
* global.c (struct allocno): Add no_stack_reg.
(global_conflicts): Set no_stack_reg.
(find_reg): Use it.
* convert.c (convert_to_real): Fold - and abs only when profitable.
* fold-const.c (fold): Fold truncates in - and abs.
* gcc.c-torture/compile/20030115-1.c: New test.
* gcc.dg/i386-fpcvt-1.c: New test.
* gcc.dg/i386-fpcvt-2.c: New test.
From-SVN: r61329
|
|
constants.
* convert.c (strip_float_extensions): Look for narrowest type handling
FP constants.
* fold-const.c (fold): Fold (double)float1 CMP (double)float2 into
float1 CMP float2.
* convert.c (strip_float_extensions): Make global.
* tree.h (strip_float_extensions): Declare.
* gcc.dg/i386-fpcvt-1.c: New test.
* gcc.dg/i386-fpcvt-2.c: New test.
From-SVN: r61279
|
|
* alloc-pool.c: Don't include "libiberty.h".
* config/sparc/gmon-sol2.c: Include <fcntl.h>.
* convert.c (convert_to_real): Hide unused variable.
java:
* lang.c (dump_compound_expr): Prototype.
From-SVN: r60900
|
|
* convert.c (convert_to_real): Disable function transformation for
now.
From-SVN: r60206
|
|
From-SVN: r60174
|
|
subregs of constants to finding integer...
gcc:
* simplify-rtx.c (simplify_subreg): Reduce problem of finding
vector mode subregs of constants to finding integer mode
subregs of constants.
* cse.c (cse_insn): Use simplify_gen_subreg.
* convert.c (convert_to_integer): Don't strip a NOP_EXPR
From a vector mode expression of different size than the
target mode.
gcc/testsuite:
* gcc.c-torture/compile/simd-3.c: New test.
From-SVN: r55234
|