summaryrefslogtreecommitdiff
path: root/gcc/gimple.c
Commit message (Collapse)AuthorAgeFilesLines
* PR tree-optimization/49948jakub2011-08-031-0/+14
| | | | | | | | | * gimple.c (walk_stmt_load_store_addr_ops): Walk CONSTRUCTOR elements. * gcc.dg/pr49948.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177291 138bc75d-0d04-0410-961f-82ee72b054a4
* * gimple.c (canonicalize_cond_expr_cond): Handle cast fromktietz2011-08-021-1/+3
| | | | | | | | | | | | | | boolean-type. (ssa_forward_propagate_and_combine): Interprete result of forward_propagate_comparison. * gcc/gimple-fold.c (fold_gimple_assign): Add canonicalization for boolean-typed operands for comparisons. * gcc.dg/tree-ssa/forwprop-15.c: New testcase. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@177170 138bc75d-0d04-0410-961f-82ee72b054a4
* PR debug/47858jakub2011-06-221-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * gimple.h (enum gimple_debug_subcode): Add GIMPLE_DEBUG_SOURCE_BIND. (gimple_build_debug_source_bind_stat): New prototype. (gimple_build_debug_source_bind): Define. (gimple_debug_source_bind_p, gimple_debug_source_bind_get_var, gimple_debug_source_bind_get_value, gimple_debug_source_bind_get_value_ptr, gimple_debug_source_bind_set_var, gimple_debug_source_bind_set_value): New inlines. * gimple.c (gimple_build_debug_source_bind_stat): New function. * gimple-pretty-print.c (dump_gimple_debug): Handle GIMPLE_DEBUG_SOURCE_BIND. * sese.c (rename_uses): Handle gimple_debug_source_bind_p. * tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Likewise. * tree-parloops.c (eliminate_local_variables, separate_decls_in_region): Likewise. (separate_decls_in_region_debug): Renamed from separate_decls_in_region_debug_bind. Handle gimple_debug_source_bind_p. * tree.h (decl_debug_args_lookup, decl_debug_args_insert): New prototypes. (DECL_HAS_DEBUG_ARGS_P): Define. (struct tree_function_decl): Add has_debug_args_flag field. * tree.c (debug_args_for_decl): New variable. (decl_debug_args_lookup, decl_debug_args_insert): New functions. * tree-into-ssa.c (mark_def_sites): Handle uses in debug stmts. (rewrite_debug_stmt_uses): New function. (rewrite_stmt): Use it to rewrite debug stmt uses. * rtl.def (DEBUG_PARAMETER_REF): New. * rtl.h (DEBUG_PARAMETER_REF_DECL): Define. * cselib.c (rtx_equal_for_cselib_1, cselib_hash_rtx): Handle DEBUG_PARAMETER_REF. * rtl.c (rtx_equal_p_cb, rtx_equal_p, iterative_hash_rtx): Likewise. * print-rtl.c (print_rtx): Likewise. * tree-sra.c (sra_ipa_reset_debug_stmts): Prefer replacing of SSA_NAMEs with DEBUG_EXPR_DECLs initialized in source bind debug stmts in the first bb. * tree-inline.c (remap_ssa_name): If remapping default def of a PARM_DECL fails, map to a DEBUG_EXPR_DECL set in a source bind debug stmt. (remap_gimple_stmt): Handle gimple_debug_source_bind_p. (maybe_move_debug_stmts_to_successors): Likewise. (copy_debug_stmt): Likewise. Avoid shadowing a variable. (tree_function_versioning): If DECL_HAS_DEBUG_ARGS_P, copy debug args vector from old_decl to new_decl. * ipa-prop.c (ipa_modify_call_arguments): For optimized away or modified parameters, add debug bind stmts before call setting DEBUG_EXPR_DECL which is remembered in debug args vector. * cfgexpand.c (expand_call_stmt): Call expand_debug_expr on DECL_DEBUG_EXPRs from debug args vector. (expand_debug_source_expr): New function. (expand_debug_locations): Use it for source bind insns. (expand_gimple_basic_block): Handle gimple_debug_source_bind_p. * var-tracking.c (prepare_call_arguments): Add debug args to call_arguments if any. * dwarf2out.c (dwarf_stack_op_name, size_of_loc_descr, output_loc_operands, output_loc_operands_raw, resolve_addr_in_expr, compare_loc_operands): Handle DW_OP_GNU_parameter_ref. (get_ref_die_offset, parameter_ref_descriptor): New functions. (mem_loc_descriptor): Handle DEBUG_PARAMETER_REF. (gen_subprogram_die): Handle parameters identified by DEBUG_PARAMETER_REF. * dwarf2.h (enum dwarf_location_atom): Add DW_OP_GNU_parameter_ref. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175288 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-06-16 Richard Guenther <rguenther@suse.de>rguenth2011-06-161-9/+1
| | | | | | | | | | | | * gimple.c (canonicalize_cond_expr_cond): (bool)x is not the same as x != 0. * fold-const.c (fold_binary_loc): Do not fold X & 1 != 0 to (bool) X & 1. * ipa-prop.c (ipa_analyze_indirect_call_uses): Also allow equality compares against zero for the lower bit. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@175096 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-31 Richard Guenther <rguenther@suse.de>rguenth2011-05-311-12/+0
| | | | | | | | * gimple.c (gimple_register_canonical_type): Do not register any types via gimple_register_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174483 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-30 Richard Guenther <rguenther@suse.de>rguenth2011-05-301-3/+9
| | | | | | | | * gimple.c (gimple_types_compatible_p_1): Compare record and union type members properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174436 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-25 Richard Guenther <rguenther@suse.de>rguenth2011-05-251-4/+12
| | | | | | | | * gimple.c (iterative_hash_canonical_type): Skip non-FIELD_DECLs. (gimple_canonical_types_compatible_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174181 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-24 Richard Guenther <rguenther@suse.de>rguenth2011-05-241-66/+11
| | | | | | | | | | | | * gimple.c (compare_type_names_p): Remove for_completion_p arg. (gimple_compatible_complete_and_incomplete_subtype_p): Remove. (gimple_types_compatible_p_1): Adjust. (iterative_hash_canonical_type): Do not bother about complete vs. incomplete types. (gimple_canonical_types_compatible_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174118 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-24 Richard Guenther <rguenther@suse.de>rguenth2011-05-241-20/+6
| | | | | | | | | | | | PR bootstrap/49078 * gimple.c (gimple_register_canonical_type): Revert previous change. * alias.c (get_alias_set): Only assert that TYPE_CANONICAL does not for a tree for the case where it matters. Cache pointer-type alias-sets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174113 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-23 Richard Guenther <rguenther@suse.de>rguenth2011-05-231-7/+6
| | | | | | | | * gimple.c (gimple_types_compatible_p_1): Always compare type names. (iterative_hash_gimple_type): Always hash type names. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@174074 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-20 Richard Guenther <rguenther@suse.de>rguenth2011-05-201-0/+19
| | | | | | | | | PR middle-end/48849 * gimple.c (gimple_register_canonical_type): Compute TYPE_CANONICAL of pointer types the same way the middle-end does. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173939 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-20 Richard Guenther <rguenther@suse.de>rguenth2011-05-201-76/+7
| | | | | | | | | | | | | | | * gimple.c (gimple_register_type_1): Do not fiddle with main-variant or pointer-to chains. Delay all fixup to uniquify_nodes. lto/ * lto.c (lto_ft_common): Remove pointer-to chain teardown. (lto_ft_type): Move main-variant and pointer-to chain building ... (uniquify_nodes): ... here. Compute TYPE_CANONICAL also here, in a separate final loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173938 138bc75d-0d04-0410-961f-82ee72b054a4
* * gimple.c (gtc_visited, gtc_ob, type_pair_hash, type_pair_eq): Remove.hubicka2011-05-191-68/+31
| | | | | | | | | | | | | | (GIMPLE_TYPE_PAIR_SIZE): New macro. (type_pair_cache): New static var. (lookup_type_pair): Use fixed sized custom hash; make inline. (gtc_visit, gimple_types_compatible_p, gimple_register_type_1): Update calls of lookup_type_pair. (print_gimple_types_stats): Remove cache stats. (free_gimple_type_tables): Free type_pair_cache instead of gtc_visited and gtc_ob. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173925 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-19 Richard Guenther <rguenther@suse.de>rguenth2011-05-191-5/+9
| | | | | | | | | | | | | | | * gimple.c (gimple_types_compatible_p_1): Compare names of the types themselves. (iterative_hash_gimple_type): And hash them that way. (gimple_register_type_1): If we register a main variant properly initialize the leader to ourselves. lto/ * lto.c (uniquify_nodes): First register all types before fixing up the tree SCC. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173900 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-18 Richard Guenther <rguenther@suse.de>rguenth2011-05-181-7/+14
| | | | | | | | | | PR tree-optimization/49018 * gimple.c (gimple_has_side_effects): Volatile asms have side-effects. * tree-ssa-ifcombine.c (bb_no_side_effects_p): Use gimple_has_side_effects. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173861 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-18 Richard Guenther <rguenther@suse.de>rguenth2011-05-181-17/+32
| | | | | | | | * gimple.c (gimple_register_type_1): New function, split out from ... (gimple_register_type): ... here. Avoid infinite recursion. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173857 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-17 Richard Guenther <rguenther@suse.de>rguenth2011-05-171-3/+5
| | | | | | | * gimple.c (type_hash_pair_compare): Fix comparison. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173832 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-17 Richard Guenther <rguenther@suse.de>rguenth2011-05-171-4/+7
| | | | | | | | * gimple.c (iterative_hash_gimple_type): Simplify singleton case some more, fix final hash value of the non-singleton case. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173829 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-17 Richard Guenther <rguenther@suse.de>rguenth2011-05-171-2/+3
| | | | | | | | | | | | | PR bootstrap/49013 Revert 2011-05-16 Richard Guenther <rguenther@suse.de> * gimple.c (gimple_types_compatible_p_1): Use names of the type itself, not its main variant. (iterative_hash_gimple_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173827 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-17 Richard Guenther <rguenther@suse.de>rguenth2011-05-171-9/+4
| | | | | | | | * gimple.c (gimple_register_canonical_type): Use the main-variant leader for computing the canonical type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173826 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-16 Richard Guenther <rguenther@suse.de>rguenth2011-05-161-3/+2
| | | | | | | | | * gimple.c (gimple_types_compatible_p_1): Use names of the type itself, not its main variant. (iterative_hash_gimple_type): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173795 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-16 Richard Guenther <rguenther@suse.de>rguenth2011-05-161-34/+8
| | | | | | | | | * gimple.c (iterative_hash_gimple_type): Re-instantiate change to always visit pointer target and function result and argument types. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173794 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-16 Richard Guenther <rguenther@suse.de>rguenth2011-05-161-7/+77
| | | | | | | | | | * gimple.c (struct type_hash_pair): New type. (type_hash_pair_compare): New function. (iterative_hash_gimple_type): Mix in SCC member hashes in hash-order. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173790 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-13 Richard Guenther <rguenther@suse.de>rguenth2011-05-131-47/+17
| | | | | | | | * gimple.c (gimple_canonical_types_compatible_p): Do not use type-pair caching, do not compare hashes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173734 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-13 Richard Guenther <rguenther@suse.de>rguenth2011-05-131-8/+34
| | | | | | | | | PR lto/48978 * gimple.c (iterative_hash_gimple_type): Revert change in pointer target and function result and argument hashing. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173730 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-12 Richard Guenther <rguenther@suse.de>rguenth2011-05-121-237/+112
| | | | | | | | | | | | | | | | | | | * gimple.c (gtc_visit): Compare TREE_ADDRESSABLE, handle NULLPTR_TYPE similar to VOID_TYPE. Defer type-leader lookup until after simple checks. (gimple_types_compatible_p): Likewise. (iterative_hash_gimple_type): Always hash pointer targets and function return and argument types. (iterative_hash_canonical_type): Do not hash TYPE_QUALS, hash TYPE_ALIGN. Do not hash TYPE_MIN/MAX_VALUE. (gimple_canonical_types_compatible_p): Compare TREE_ADDRESSABLE, handle NULLPTR_TYPE similar to VOID_TYPE. Handle non-aggregates completely in the simple compare section. (gimple_register_canonical_type): Query the cache again after registering. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173704 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-11 Richard Guenther <rguenther@suse.de>rguenth2011-05-111-1/+1
| | | | | | | | PR middle-end/48964 * gimple.c (iterative_hash_canonical_type): Fix typo. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173663 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-11 Richard Guenther <rguenther@suse.de>rguenth2011-05-111-119/+64
| | | | | | | | | | | | | | * gimple.c (gimple_type_hash_1): Merge with ... (gimple_type_hash): ... this. (gtc_visit): Remove mode parameter and simplify accordingly. (gimple_types_compatible_p_1): Likewise. (gimple_types_compatible_p): Likewise. (iterative_hash_gimple_type): Likewise. (visit): Likewise. (gimple_type_eq): Adjust. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173655 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-11 Richard Guenther <rguenther@suse.de>rguenth2011-05-111-3/+497
| | | | | | | | | | | | | | * gimple.c (gimple_canonical_types_compatible_p): Split out from gimple_types_compatible_p and friends. Do not recurse to pointed-to types. (gimple_canonical_type_eq): Use it. (iterative_hash_canonical_type): Split out from iterative_hash_gimple_type and friends. Do not recurse to pointed-to types. (gimple_canonical_type_hash): Use it, allocate the hash here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173649 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-05-09 Richard Guenther <rguenther@suse.de>rguenth2011-05-091-1/+3
| | | | | | | | | | | | | | * lto-symtab.c (lto_cgraph_replace_node): Use types_compatible_p for diagnostics. (lto_symtab_merge): Likewise. Do not register types here. (lto_symtab_merge_decls_2): Likewise. (lto_symtab_merge_decls_1): Likewise. * gimple.h (enum gtc_mode, gimple_types_compatible_p): Do not declare. * gimple.c (enum gtc_mode): Declare. (gimple_types_compatible_p): Make static. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173575 138bc75d-0d04-0410-961f-82ee72b054a4
* * gimple.c (type_pair_hash, type_pair_eq, lookup_type_pair):hubicka2011-05-091-9/+15
| | | | | | | | Arrange type pairs to be UID ordered. (gimple_lookup_type_leader): Make inline. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@173560 138bc75d-0d04-0410-961f-82ee72b054a4
* * gimple.c (walk_gimple_op) <GIMPLE_CALL>: Fix couple of oversights.ebotcazou2011-04-211-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172828 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rsandifo2011-04-201-20/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Makefile.in (INTERNAL_FN_DEF, INTERNAL_FN_H): Define. (GIMPLE_H): Include $(INTERNAL_FN_H). (OBJS-common): Add internal-fn.o. (internal-fn.o): New rule. * internal-fn.def: New file. * internal-fn.h: Likewise. * internal-fn.c: Likewise. * gimple.h: Include internal-fn.h. (GF_CALL_INTERNAL): New gf_mask. (gimple_statement_call): Put fntype into a union with a new internal_fn field. (gimple_build_call_internal): Declare. (gimple_build_call_internal_vec): Likewise. (gimple_call_same_target_p): Likewise. (gimple_call_internal_p): New function. (gimple_call_internal_fn): Likewise. (gimple_call_fntype): Return null for internal calls. (gimple_call_set_fntype): Assert that the function is not internal. (gimple_call_set_fn): Likewise. (gimple_call_set_fndecl): Likewise. (gimple_call_set_internal_fn): New function. (gimple_call_addr_fndecl): Handle null functions. (gimple_call_return_type): Likewise null types. * gimple.c (gimple_build_call_internal_1): New function. (gimple_build_call_internal): Likewise. (gimple_build_call_internal_vec): Likewise. (gimple_call_same_target_p): Likewise. (gimple_call_flags): Handle calls to internal functions. (gimple_call_fnspec): New function. (gimple_call_arg_flags, gimple_call_return_flags): Use it. (gimple_has_side_effects): Handle null functions. (gimple_rhs_has_side_effects): Likewise. (gimple_call_copy_skip_args): Handle calls to internal functions. * cfgexpand.c (expand_call_stmt): Likewise. * expr.c (expand_expr_real_1): Assert that the call isn't internal. * gimple-fold.c (gimple_fold_call): Handle null functions. (gimple_fold_stmt_to_constant_1): Don't fold calls to internal functions. * gimple-low.c (gimple_check_call_args): Handle calls to internal functions. * gimple-pretty-print.c (dump_gimple_call): Likewise. * ipa-prop.c (ipa_analyze_call_uses): Handle null functions. * tree-cfg.c (verify_gimple_call): Handle calls to internal functions. (do_warn_unused_result): Likewise. * tree-eh.c (same_handler_p): Use gimple_call_same_target_p. * tree-ssa-ccp.c (ccp_fold_stmt): Handle calls to internal functions. * tree-ssa-dom.c (hashable_expr): Use the gimple statement to record the target of a call. (initialize_hash_element): Update accordingly. (hashable_expr_equal_p): Use gimple_call_same_target_p. (iterative_hash_hashable_expr): Handle calls to internal functions. (print_expr_hash_elt): Likewise. * tree-ssa-pre.c (can_value_number_call): Likewise. (eliminate): Handle null functions. * tree-ssa-sccvn.c (visit_use): Handle calls to internal functions. * tree-ssa-structalias.c (get_fi_for_callee): Likewise. (find_func_aliases): Likewise. * value-prof.c (gimple_ic_transform): Likewise. (gimple_indirect_call_to_profile): Likewise. * lto-streamer-in.c (input_gimple_stmt): Likewise. * lto-streamer-out.c (output_gimple_stmt): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172758 138bc75d-0d04-0410-961f-82ee72b054a4
* PR lto/48148ebotcazou2011-04-191-0/+3
| | | | | | | | * gimple.c (gimple_types_compatible_p_1) <ENUMERAL_TYPE>: Do not merge the types if they have different enumeration identifiers. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172712 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.h (ALLOCA_FOR_VAR_P): Rename to CALL_ALLOCA_FOR_VAR_P.matz2011-04-151-1/+6
| | | | | | | | | | | | | | | | | | | * builtins.c (expand_builtin): Use CALL_ALLOCA_FOR_VAR_P. * function.c (gimplify_parameters): Ditto. * gimplify.c (gimplify_vla_decl): Ditto. * gimple.h (enum gf_mask): Add GF_CALL_ALLOCA_FOR_VAR. (gimple_call_set_alloca_for_var): New inline function. (gimple_call_alloca_for_var_p): Ditto. * gimple.c (gimple_build_call_from_tree): Remember CALL_ALLOCA_FOR_VAR_P state. * cfgexpand.c (expand_call_stmt): Restore CALL_ALLOCA_FOR_VAR_P state. * tree-inline.c (inline_forbidden_p_stmt): Don't reject alloca calls if they were for VLA objects. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172516 138bc75d-0d04-0410-961f-82ee72b054a4
* * gimple.h (gimple_asm_clobbers_memory_p): Declare.froydnj2011-04-151-0/+17
| | | | | | | | | * gimple.c (gimple_asm_clobbers_memory_p): Define. * ipa-pure-const.c (check_stmt): Call it. * tree-ssa-operands.c (get_asm_expr_operands): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172496 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-12 Richard Guenther <rguenther@suse.de>rguenth2011-04-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | PR tree-optimization/46076 * gimple.h (struct gimple_statement_call): Add fntype field. (gimple_call_fntype): Adjust. (gimple_call_set_fntype): New function. * gimple.c (gimple_build_call_1): Set the call function type. * gimplify.c (gimplify_call_expr): Preserve the function type the frontend used for the call. (gimplify_modify_expr): Likewise. * lto-streamer-in.c (input_gimple_stmt): Input the call stmts function type. * lto-streamer-out.c (output_gimple_stmt): Output the call stmts function type. * tree-ssa.c (useless_type_conversion_p): Function pointer conversions are useless. * gcc.dg/tree-ssa/pr46076.c: Un-XFAIL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172310 138bc75d-0d04-0410-961f-82ee72b054a4
* Remove doubled up words.mrs2011-04-101-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172247 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-08 Richard Guenther <rguenther@suse.de>rguenth2011-04-081-10/+1
| | | | | | | * gimple.c (gimple_call_flags): Remove kludge. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172190 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-08 Richard Guenther <rguenther@suse.de>rguenth2011-04-081-9/+1
| | | | | | | | | * gimple.c (gimple_set_modified): Do not queue calls to MODIFIED_NORETURN_CALLS here ... * tree-ssa-operands.c (update_stmt_operands): ... but here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172182 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-04-08 Richard Guenther <rguenther@suse.de>rguenth2011-04-081-6/+8
| | | | | | | | | | | | | | | | | * gimple.h (gimple_call_fntype): New function. (gimple_call_return_type): Use it. * expr.c (expand_expr_real_1): Use gimple_call_fntype. * gimple-low.c (gimple_check_call_args): Likewise. * gimple.c (gimple_call_flags): Likewise. (gimple_call_arg_flags): Likewise. (gimple_call_return_flags): Likewise. * tree-cfg.c (verify_gimple_call): Likewise. (do_warn_unused_result): Likewise. * tree-ssa-ccp.c (ccp_fold_stmt): Likewise. * value-prof.c (gimple_ic_transform): Fix fndecl check. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172178 138bc75d-0d04-0410-961f-82ee72b054a4
* * lto-streamer.h (struct lto_streamer_cache_d): Remove offsetsmatz2011-04-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and next_slot members. (lto_streamer_cache_insert, lto_streamer_cache_insert_at, lto_streamer_cache_lookup, lto_streamer_cache_get): Adjust prototypes. (lto_streamer_cache_append): Declare. * lto-streamer.c (lto_streamer_cache_add_to_node_array): Use unsigned index, remove offset parameter, ensure that we append or update existing entries. (lto_streamer_cache_insert_1): Use unsigned index, remove offset_p parameter, update next_slot for append. (lto_streamer_cache_insert): Use unsigned index, remove offset_p parameter. (lto_streamer_cache_insert_at): Likewise. (lto_streamer_cache_append): New function. (lto_streamer_cache_lookup): Use unsigned index. (lto_streamer_cache_get): Likewise. (lto_record_common_node): Don't test tree_node_can_be_shared. (preload_common_node): Adjust call to lto_streamer_cache_insert. (lto_streamer_cache_delete): Don't free offsets member. * lto-streamer-out.c (eq_string_slot_node): Use memcmp. (lto_output_string_with_length): Use lto_output_data_stream. (lto_output_tree_header): Remove ix parameter, don't write it. (lto_output_builtin_tree): Likewise. (lto_write_tree): Adjust callers to above, don't track and write offset, write unsigned index. (output_unreferenced_globals): Don't emit all global vars. (write_global_references): Use unsigned indices. (lto_output_decl_state_refs): Likewise. (write_symbol): Likewise. * lto-streamer-in.c (lto_input_chain): Move earlier. (input_function): Use unsigned index. (input_alias_pairs): Don't read and then ignore all global vars. (lto_materialize_tree): Remove ix_p parameter, don't read index, don't pass it back, use lto_streamer_cache_append. (lto_register_var_decl_in_symtab): Use unsigned index. (lto_register_function_decl_in_symtab): Likewise. (lto_get_pickled_tree): Don't read in or handle offset, read unsigned index. (lto_get_builtin_tree): Don't read index, use lto_streamer_cache_append. (lto_read_tree): Adjust call to lto_materialize_tree. * ipa-inline.c (cgraph_edge_badness): Move growth calculaton, don't use function calls in arguments to MIN. * varasm.c (decl_binds_to_current_def_p): Don't check TREE_PUBLIC twice. * gimple.c (gimple_type_leader_entry): Mark deletable. lto/ * lto.c (lto_materialize_function): Don't read and then discard sections in WPA mode. (lto_read_in_decl_state): Adjust call to lto_streamer_cache_get. * lto-lang.c (registered_builtin_fndecls): Remove. (lto_getdecls): Return NULL_TREE. (lto_builtin_function): Don't remember in registered_builtin_fndecls. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171906 138bc75d-0d04-0410-961f-82ee72b054a4
* * tree.c (decl_init_priority_insert): Don't create entry formatz2011-04-031-2/+1
| | | | | | | | | | | default priority. (decl_fini_priority_insert): Ditto. (fields_compatible_p, find_compatible_field): Remove. * tree.h (fields_compatible_p, find_compatible_field): Remove. * gimple.c (gimple_compare_field_offset): Adjust block comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171902 138bc75d-0d04-0410-961f-82ee72b054a4
* ChangeLog gcc/ktietz2011-03-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | 2011-03-25 Kai Tietz <ktietz@redhat.com> * c-typeck.c (comptypes_internal): Replace target hook call of comp_type_attributes by version in tree.c file. * gimple.c (gimple_types_compatible_p_1): Likewise. * tree-ssa.c (useless_type_conversion_p): Likewise. * tree.c (build_type_attribute_qual_variant): Likewise. (attribute_value_equal): New static helper function. (comp_type_attributes): New function. (merge_attributes): Use attribute_value_equal for comparison. (attribute_list_contained): Likewise. * tree.h (comp_type_attributes): New prototype. ChangeLog cp/ 2011-03-25 Kai Tietz <ktietz@redhat.com> * decl.c (decls_match): Replace target hook call of comp_type_attributes by version in tree.c file. * search.c (check_final_overrider): Likewise. * typeck.c (structural_comptypes): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171445 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-03-22 Richard Guenther <rguenther@suse.de>rguenth2011-03-221-4/+3
| | | | | | | | | | | | | | | | | | | | | | | * gimple.c (gimple_rhs_class_table): POLYNOMIAL_CHREC is not a valid RHS. Make DOT_PROD_EXPR and REALIGN_LOAD_EXPR ternary. * tree-cfg.c (verify_gimple_assign_ternary): Allow DOT_PROD_EXPR and REALIGN_LOAD_EXPR. (verify_gimple_assign_single): Do not allow POLYNOMIAL_CHREC, DOT_PROD_EXPR or REALIGN_LOAD_EXPR. * expr.c (expand_expr_real_1): Move REALIGN_LOAD_EXPR and DOT_PROD_EXPR case ... (expand_expr_real_2): ... here. * gimple-pretty-print.c (dump_ternary_rhs): Handle DOT_PROD_EXPR and REALIGN_LOAD_EXPR. * tree-data-ref.c (split_constant_offset): Bail out for all CHRECs. * tree-vect-loop.c (vect_model_reduction_cost): Handle ternaries. (vect_create_epilog_for_reduction): Likewise. (vectorizable_reduction): Likewise. * tree-vect-patterns.c (vect_recog_dot_prod_pattern): Adjust. * tree-vect-stmts.c (vectorizable_load): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171284 138bc75d-0d04-0410-961f-82ee72b054a4
* 2011-03-21 Richard Guenther <rguenther@suse.de>rguenth2011-03-211-1/+1
| | | | | | | | PR middle-end/47661 * gimple.c (is_gimple_condexpr): Use tree_could_throw_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@171236 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-12-02 Richard Guenther <rguenther@suse.de>rguenth2010-12-021-37/+85
| | | | | | | | | | | | | | | | | | | | | | | | | PR lto/44871 * gimple.c (canonical_type_hash_cache): New hashtable. (gimple_type_hash): Make a wrapper around ... (gimple_type_hash_1): ... this. Take gtc_mode argument. (gimple_canonical_type_hash): Likewise. (gtc_visit): Take a gtc_mode argument. (gimple_types_compatible_p_1): Likewise. Do not compare struct tag names or field names when computing canonical types. (gimple_types_compatible_p): Adjust. (visit): Take a gtc_mode argument. (iterative_hash_gimple_type): Likewise. Do not hash struct tag names or field names when computing hashes of canonical types. (gimple_register_canonical_type): Use gimple_canonical_type_hash for the hash. (print_gimple_types_stats): Dump stats of canonical_type_hash_cache. (free_gimple_type_tables): Free canonical_type_hash_cache. * g++.dg/lto/20101126-1_0.C: New testcase. * g++.dg/lto/20101126-1_1.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167367 138bc75d-0d04-0410-961f-82ee72b054a4
* * diagnostic-core.h: Include bversion.h.jsm282010-11-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * toplev.h: Don't include input.h or bversion.h. (parse_optimize_options): Don't declare here. * alias.c, auto-inc-dec.c, c-aux-info.c, c-convert.c, c-parser.c, caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c, combine-stack-adj.c, config/arm/pe.c, config/darwin-c.c, config/host-darwin.c, config/i386/host-cygwin.c, config/i386/host-mingw32.c, config/i386/msformat-c.c, config/i386/netware.c, config/i386/nwld.c, config/i386/winnt-cxx.c, config/i386/winnt-stubs.c, config/ia64/ia64-c.c, config/m32c/m32c-pragma.c, config/mep/mep-pragma.c, config/microblaze/microblaze-c.c, config/rs6000/host-darwin.c, config/rs6000/rs6000-c.c, config/score/score3.c, config/score/score7.c, config/sh/symbian-base.c, config/sh/symbian-c.c, config/sh/symbian-cxx.c, config/sol2-c.c, config/sol2.c, config/v850/v850-c.c, config/vxworks.c, convert.c, cppbuiltin.c, cselib.c, dbgcnt.c, ddg.c, dfp.c, dominance.c, emit-rtl.c, fixed-value.c, fwprop.c, ggc-common.c, gimple.c, gimplify.c, graphite-blocking.c, graphite-clast-to-gimple.c, graphite-dependences.c, graphite-flattening.c, graphite-interchange.c, graphite-poly.c, graphite-scop-detection.c, graphite.c, haifa-sched.c, implicit-zee.c, integrate.c, ipa-pure-const.c, ipa-reference.c, ira-build.c, ira-conflicts.c, ira-costs.c, ira-lives.c, jump.c, lists.c, loop-doloop.c, loop-iv.c, lto-cgraph.c, lto-compress.c, lto-opts.c, lto-section-in.c, lto-section-out.c, lto-streamer-out.c, lto-symtab.c, modulo-sched.c, optabs.c, params.c, postreload-gcse.c, postreload.c, predict.c, profile.c, regcprop.c, reginfo.c, regmove.c, reorg.c, resource.c, sched-deps.c, sched-ebb.c, sched-rgn.c, sdbout.c, sel-sched-dump.c, sel-sched-ir.c, sese.c, stmt.c, targhooks.c, tree-cfgcleanup.c, tree-mudflap.c, tree-nomudflap.c, tree-object-size.c, tree-outof-ssa.c, tree-phinodes.c, tree-profile.c, tree-sra.c, tree-ssa-ccp.c, tree-ssa-coalesce.c, tree-ssa-live.c, tree-ssa-loop-prefetch.c, tree-ssa-loop.c, tree-ssa-operands.c, tree-ssa-structalias.c, tree-ssa-uninit.c, tree-vect-patterns.c, value-prof.c, var-tracking.c, web.c: Don't include toplev.h. * Makefile.in (TOPLEV_H): Remove. All uses changed to use toplev.h. Dependencies for above files and c-family files changed to remove $(TOPLEV_H) or toplev.h. (C_TREE_H): Don't include $(TOPLEV_H). (DIAGNOSTIC_CORE_H): Use $(INPUT_H) instead of input.h. Add bversion.h. * config/arm/t-pe, config/arm/t-wince-pe, config/i386/t-cygming, config/ia64/t-ia64, config/mep/t-mep, config/score/t-score-elf, config/t-darwin, config/t-sol2, config/t-vxworks, config/v850/t-v850, config/v850/t-v850e: Dependencies for above files changed to remove $(TOPLEV_H) or toplev.h. c-family: * c-common.h (parse_optimize_options): Declare. * c-cppbuiltin.c, c-format.c, c-gimplify.c, c-lex.c, c-omp.c, c-pch.c, c-pragma.c, c-semantics.c: Don't include toplev.h. cp: * cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c, except.c, expr.c, friend.c, init.c, mangle.c, name-lookup.c, optimize.c, parser.c, rtti.c, tree.c, typeck2.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. java: * expr.c, lang.c, mangle.c, mangle_name.c, typeck.c, verify-glue.c: Don't include toplev.h. * Make-lang.in: Dependencies for above files changed to remove toplev.h. lto: * Make-lang.in (lto/lto-object.o): Depend on toplev.h instead of $(TOPLEV_H). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167293 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-11-27 Richard Guenther <rguenther@suse.de>rguenth2010-11-271-31/+5
| | | | | | | | | | | | | | | | | * gimple.c (gimple_assign_copy_p): Use gimple_assign_single_p. (gimple_assign_ssa_name_copy_p): Likewise. (gimple_assign_unary_nop_p): Use is_gimple_assign. (is_gimple_cast): Remove. (gimple_assign_single_p): Move ... * gimple.h (gimple_assign_single_p): ... here. (is_gimple_cast): Remove. (gimple_assign_rhs_code): Simplify. * gimple-fold.c (gimple_fold_builtin): Use CONVERT_EXPR_P instead of is_gimple_cast. * ipa-type-escape.c (look_for_casts): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167200 138bc75d-0d04-0410-961f-82ee72b054a4
* 2010-11-26 Richard Guenther <rguenther@suse.de>rguenth2010-11-261-17/+16
| | | | | | | | | | | | | | | PR lto/46648 * gimple.c (gtc_visit): Do not return true for members of an SCC still being processed but the current lattice value of the member. Treat SCC members comparison state as lattice, starting at equal, eventually dropping to unequal. (gimple_types_compatible_p_1): Likewise. * gcc.dg/lto/20101125-1_0.c: New testcase. * gcc.dg/lto/20101125-1_1.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@167183 138bc75d-0d04-0410-961f-82ee72b054a4