aboutsummaryrefslogtreecommitdiff
path: root/gcc/combine.c
AgeCommit message (Collapse)AuthorFilesLines
2006-05-14re PR rtl-optimization/27538 (execute/20030128-1.c FAILs)Roger Sayle1-8/+10
PR rtl-optimization/27538 * combine.c (expand_compound_operation): Call gen_lowpart before calling simplify_shift_const. From-SVN: r113763
2006-04-26re PR target/27282 (ICE in final_scan_insn, at final.c:2448 - could not ↵David Edelsohn1-3/+3
split insn) 2006-04-26 David Edelsohn <edelsohn@gnu.org> Paolo Bonzini <bonzini@gnu.org> PR middle-end/27282 * combine.c (simplify_and_const_int_1): Use gen_int_mode. (simplify_and_const_int): Same. Co-Authored-By: Paolo Bonzini <bonzini@gnu.org> From-SVN: r113275
2006-03-14* combine.c (UWIDE_SHIFT_LEFT_BY_BITS_PER_WORD): Remove.Kazu Hirata1-6/+0
From-SVN: r112062
2006-03-09combine.c (simplify_shift_const_1): Use gen_lowpart_or_truncate instead of ↵Adam Nemet1-1/+1
gen_lowpart. * combine.c (simplify_shift_const_1): Use gen_lowpart_or_truncate instead of gen_lowpart. From-SVN: r111911
2006-03-04builtins.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* builtins.c, c-pragma.h, c-typeck.c, cgraph.c, cgraphunit.c, combine.c, common.opt, config/dfp-bit.c, config/i386/i386.c, config/m68k/m68k.c, config/m68k/m68k.md, config/mt/mt.c, config/mt/mt.h, config/s390/s390.md, df-core.c, df-problems.c, df-scan.c, df.h, diagnostic.c, expr.c, function.h, gimplify.c, loop-invariant.c, omp-low.c, opts.c, passes.c, rtl-factoring.c, rtlanal.c, struct-equiv.c, tree-cfgcleanup.c, tree-ssa-loop-niter.c, tree-ssa-loop-prefetch.c, tree-ssa-structalias.c, tree-ssa-threadedge.c, tree-ssa-threadupdate.c, tree-vect-patterns.c, tree-vect-transform.c, tree-vectorizer.h, tree-vrp.c, unwind-dw2.c: Fix comment typos. Follow spelling conventions. From-SVN: r111721
2006-03-02tree-vrp.c (execute_vrp): Return value.Daniel Berlin1-1/+2
2006-03-02 Daniel Berlin <dberlin@dberlin.org> * gcc/tree-vrp.c (execute_vrp): Return value. * gcc/regrename.c (rest_of_handle_regrename): Ditto. * gcc/tree-into-ssa.c (rewrite_into_ssa): Ditto. * gcc/tree-complex.c (tree_lower_complex): Ditto. (tree_lower_complex_O0): Ditto. * gcc/tracer.c (rest_of_handle_tracer): Ditto. * gcc/postreload-gcse.c (rest_of_handle_gcse2): Ditto. * gcc/postreload.c (rest_of_handle_postreload): Ditto. * gcc/tree-tailcall.c (execute_tail_recursion): Ditto. (execute_tail_calls): Ditto. * gcc/tree-ssa-loop-ch.c (copy_loop_headers): Ditto. * gcc/tree.h (init_function_for_compilation): Ditto. * gcc/ipa-cp.c (ipcp_driver): Ditto. * gcc/tree-scalar-evolution.c (scev_const_prop): Ditto. * gcc/tree-scalar-evolution.h (scev_const_prop): Ditto. * gcc/final.c (compute_alignments): Ditto. (rest_of_handle_final): Ditto. (rest_of_handle_shorten_branches): Ditto. (rest_of_clean_state): Ditto. * gcc/omp-low.c (execute_expand_omp): Ditto. (execute_lower_omp): Ditto. * gcc/tree-ssa-dse.c (tree_ssa_dse): Ditto. * gcc/ipa-reference.c (static_execute): Ditto. * gcc/tree-ssa-uncprop.c (tree_ssa_uncprop): Ditto. * gcc/reorg.c (rest_of_handle_delay_slots): Ditto. (rest_of_handle_machine_reorg): Ditto. * gcc/cgraphunit.c (rebuild_cgraph_edges): Ditto. * gcc/flow.c (recompute_reg_usage): Ditto. (rest_of_handle_remove_death_notes): Ditto. (rest_of_handle_life): Ditto. (rest_of_handle_flow2): Ditto. * gcc/tree-ssa-copyrename.c (rename_ssa_copies): Ditto. * gcc/tree-ssa-ccp.c (do_ssa_ccp): Ditto. (do_ssa_store_ccp): Ditto. (execute_fold_all_builtins): Ditto. * gcc/mode-switching.c (rest_of_handle_mode_switching): Ditto. * gcc/modulo-sched.c (rest_of_handle_sms): Ditto. * gcc/ipa-pure-const.c (static_execute): Ditto. * gcc/cse.c (rest_of_handle_cse): Ditto. (rest_of_handle_cse2): Ditto. * gcc/web.c (rest_of_handle_web): Ditto. * gcc/tree-stdarg.c (execute_optimize_stdarg): Ditto. * gcc/tree-ssa-math-opts.c (execute_cse_reciprocals): Ditto. * gcc/tree-ssa-dom.c (tree_ssa_dominator_optimize): Ditto. * gcc/tree-nrv.c (tree_nrv): Ditto. (execute_return_slot_opt): Ditto. * gcc/tree-ssa-alias.c (compute_may_aliases): Ditto. (create_structure_vars): Ditto. * gcc/loop-init.c (rtl_loop_init): Ditto. (rtl_loop_done): Ditto. (rtl_move_loop_invariants): Ditto. (rtl_unswitch): Ditto. (rtl_unroll_and_peel_loops): Ditto. (rtl_doloop): Ditto. * gcc/gimple-low.c (lower_function_body): Ditto. (mark_used_blocks): Ditto. * gcc/tree-ssa-sink.c (execute_sink_code): Ditto. * gcc/ipa-inline.c (cgraph_decide_inlining): Ditto. (cgraph_early_inlining): Ditto. * gcc/global.c (rest_of_handle_global_alloc): Ditto. * gcc/jump.c (cleanup_barriers): Ditto. (purge_line_number_notes): Ditto. * gcc/ifcvt.c (rest_of_handle_if_conversion): Ditto. (rest_of_handle_if_after_reload): Ditto. * gcc/tree-ssa-loop.c (tree_ssa_loop_init): Ditto. (tree_ssa_loop_im): Ditto. (tree_ssa_loop_unswitch): Ditto. (tree_vectorize): Ditto. (tree_linear_transform): Ditto. (tree_ssa_loop_ivcanon): Ditto. (tree_ssa_empty_loop): Ditto. (tree_ssa_loop_bounds): Ditto. (tree_complete_unroll): Ditto. (tree_ssa_loop_prefetch): Ditto. (tree_ssa_loop_ivopts): Ditto. (tree_ssa_loop_done): Ditto. * gcc/predict.c (tree_estimate_probability): Ditto. * gcc/recog.c (split_all_insns_noflow): Ditto. (rest_of_handle_peephole2): Ditto. (rest_of_handle_split_all_insns): Ditto. * gcc/tree-eh.c (lower_eh_constructs): Ditto. * gcc/regmove.c (rest_of_handle_regmove): Ditto. (rest_of_handle_stack_adjustments): Ditto. * gcc/local-alloc.c (rest_of_handle_local_alloc): Ditto. * gcc/function.c (instantiate_virtual_regs): Ditto. (init_function_for_compilation): Ditto. (rest_of_handle_check_leaf_regs): Ditto. * gcc/gcse.c (rest_of_handle_jump_bypass): Ditto. (rest_of_handle_gcse): Ditto. * gcc/ipa-type-escape.c (type_escape_execute): Ditto. * gcc/alias.c (rest_of_handle_cfg): Ditto. * gcc/tree-if-conv.c (main_tree_if_conversion): Ditto. * gcc/profile.c (rest_of_handle_branch_prob): Ditto. * gcc/tree-ssa-phiopt.c (tree_ssa_phiopt): Ditto. * gcc/rtl-factoring.c (rest_of_rtl_seqabstr): Ditto. * gcc/bt-load.c (rest_of_handle_branch_target_load_optimize): Ditto * gcc/tree-dfa.c (find_referenced_vars): Ditto. * gcc/except.c (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. (rest_of_handle_eh): Ditto. * gcc/emit-rtl.c (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. * gcc/except.h (set_nothrow_function_flags): Ditto. (convert_to_eh_region_ranges): Ditto. * gcc/cfgexpand.c (tree_expand_cfg): Ditto. * gcc/tree-cfgcleanup.c (merge_phi_nodes): Ditto. * gcc/tree-ssa-pre.c (do_pre): Ditto. (execute_fre): Ditto. * gcc/cfgcleanup.c (rest_of_handle_jump): Ditto. (rest_of_handle_jump2): Ditto. * gcc/tree-sra.c (tree_sra): Ditto. * gcc/tree-mudflap.c (execute_mudflap_function_ops): Ditto. (execute_mudflap_function_decls): Ditto. * gcc/tree-ssa-copy.c (do_copy_prop): Ditto. (do_store_copy_prop): Ditto. * gcc/ipa-prop.h (ipcp_driver): Ditto. * gcc/cfglayout.c (insn_locators_initialize): Ditto. * gcc/tree-ssa-forwprop.c (tree_ssa_forward_propagate_single_use_vars): Ditto. * gcc/cfglayout.h (insn_locators_initialize): Ditto. * gcc/tree-ssa-dce.c (tree_ssa_dce): Ditto. * gcc/tree-ssa.c (execute_early_warn_uninitialized): Ditto. (execute_late_warn_uninitialized): Ditto. * gcc/rtl.h (cleanup_barriers): Ditto. (split_all_insns_noflow): Ditto. (purge_line_number_notes): Ditto. (unshare_all_rtl): Ditto. (remove_unnecessary_notes): Ditto. (recompute_reg_usage): Ditto. (variable_tracking_main): Ditto. * gcc/integrate.c (emit_initial_value_sets): Ditto. * gcc/integrate.h (emit_initial_value_sets): Ditto. * gcc/tree-optimize.c (execute_free_datastructures): Ditto (execute_free_cfg_annotations): Ditto. (execute_fixup_cfg): Ditto. (execute_cleanup_cfg_pre_ipa): Ditto. (execute_cleanup_cfg_post_optimizing): Ditto. (execute_init_datastructures): Ditto. * gcc/tree-object-size.c (compute_object_sizes): Ditto. * gcc/combine.c (rest_of_handle_combine): Ditto. * gcc/tree-outof-ssa.c (rewrite_out_of_ssa): Ditto. * gcc/bb-reorder.c (duplicate_computed_gotos): Ditto. (rest_of_handle_reorder_blocks): Ditto. (rest_of_handle_partition_blocks): Ditto. * gcc/var-tracking.c (variable_tracking_main): Ditto. * gcc/tree-profile.c (tree_profiling): Ditto. * gcc/tree-vect-generic.c (expand_vector_operations): Ditto. * gcc/reg-stack.c (rest_of_handle_stack_regs): Ditto. * gcc/sched-rgn.c (rest_of_handle_sched): Ditto. (rest_of_handle_sched2): Ditto. * gcc/basic-block.h (free_bb_insn): Ditto. * gcc/tree-ssa-structalias.c (ipa_pta_execute): Ditto. * gcc/tree-cfg.c (execute_build_cfg): Ditto. (remove_useless_stmts): Ditto. (split_critical_edges): Ditto. (execute_warn_function_return): Ditto. (execute_warn_function_noreturn): Ditto. * gcc/tree-ssa-reassoc.c (execute_reassoc): Ditto. * gcc/cfgrtl.c (free_bb_for_insn): Ditto. * gcc/passes.c (execute_one_pass): Run additional todos returned by execute function. * gcc/tree-pass.h (struct tree_opt_pass): Make execute return a value. From-SVN: r111643
2006-02-28rtl.h (truncated_to_mode): Declare it.Paolo Bonzini1-0/+3
* rtl.h (truncated_to_mode): Declare it. (struct rtl_hooks): Add reg_truncated_to_mode hook. * rtlhooks-def.h (RTL_HOOKS_REG_TRUNCATED_TO_MODE): New macro. (RTL_HOOKS_INITIALIZER): Include it. * rtlhooks.c (reg_truncated_to_mode_general): New function. * combine.c (RTL_HOOKS_REG_TRUNCATED_TO_MODE): Override to reg_truncated_to_mode. * rtlanal.c (truncated_to_mode): Define it. * simplify-rtx.c (simplify_unary_operation_1): Use it. Co-Authored-By: Adam Nemet <anemet@caviumnetworks.com> From-SVN: r111573
2006-02-25combine.c (gen_lowpart_or_truncate): Call simplify_gen_unary(TRUNCATE, ...) ↵Adam Nemet1-1/+1
instead of gen_rtx_TRUNCATE. * combine.c (gen_lowpart_or_truncate): Call simplify_gen_unary(TRUNCATE, ...) instead of gen_rtx_TRUNCATE. From-SVN: r111437
2006-02-24re PR middle-end/24952 (ICE: RTL check: expected code 'set' or 'clobber', ↵Roger Sayle1-1/+2
have 'unspec' in try_combine, at combine.c:2898) PR middle-end/24952 * combine.c (try_combine): Explicitly check whether GET_CODE is a SET or a CLOBBER, instead on checking that it isn't a USE. From-SVN: r111425
2006-02-21re PR middle-end/26379 (ICE on vector shift RTL simplification)Jakub Jelinek1-1/+2
PR middle-end/26379 * combine.c (simplify_shift_const_1): Disable nested shifts optimization for vector shifts. * gcc.target/i386/mmx-7.c: New test. From-SVN: r111328
2006-02-15re PR middle-end/26300 (ICE in trunc_int_for_mode)Jakub Jelinek1-0/+3
PR middle-end/26300 * combine.c (make_extraction): Bail out if ORIG_POS is negative. * gcc.c-torture/compile/20060215-1.c: New test. From-SVN: r111116
2006-01-31tree-vrp.c: Use XNEW/XCNEW allocation wrappers.Marcin Dalecki1-6/+6
2006-01-31 Marcin Dalecki <martin@dalecki.de> * tree-vrp.c: Use XNEW/XCNEW allocation wrappers. * regrename.c: Ditto. * tree-ssa-loop-im.c: Ditto. * tree-dump.c: Ditto. * tree-complex.c: Ditto. * genrecog.c: Ditto. * tree-ssa-threadupdate.c: Ditto. * tracer.c: Ditto. * java/class.c: Ditto. * java/jcf-parse.c: Ditto. * java/resource.c: Ditto. * java/except.c: Ditto. * java/jvspec.c: Ditto. * java/jcf-write.c: Ditto. * java/jcf-path.c: Ditto. * java/gjavah.c: Ditto. * java/zextract.c: Ditto. * java/jcf-io.c: Ditto. * java/jcf.h: Ditto. * java/buffer.c: Ditto. * java/lang.c: Ditto. * java/parse-scan.y: Ditto. * java/lex.c: Ditto. * java/lex.h: Ditto. * cfgloopmanip.c: Ditto. * postreload-gcse.c: Ditto. * tree-ssa-loop-manip.c: Ditto. * postreload.c: Ditto. * tree-ssa-loop-ch.c: Ditto. * loop.c: Ditto. * ipa-cp.c: Ditto. * cppspec.c: Ditto. * diagnostic.c: Ditto. * final.c: Ditto. * genoutput.c: Ditto. * gcc.c: Ditto. * cfghooks.c: Ditto. * cfgloopanal.c: Ditto. * objc/objc-act.c: Ditto. * gcov.c: Ditto. * genextract.c: Ditto. * genautomata.c: Ditto. * pretty-print.c: Ditto. * genemit.c: Ditto. * cgraphunit.c: Ditto. * flow.c: Ditto. * df-scan.c: Ditto. * haifa-sched.c: Ditto. * dominance.c: Ditto. * dbxout.c: Ditto. * tree-ssa-loop-ivopts.c: Ditto. * df-core.c: Ditto. * mode-switching.c: Ditto. * modulo-sched.c: Ditto. * graph.c: Ditto. * ipa-pure-const.c: Ditto. * cse.c: Ditto. * fix-header.c: Ditto. * web.c: Ditto. * tree-stdarg.c: Ditto. * ipa-utils.c: Ditto. * loop-init.c: Ditto. * ipa-inline.c: Ditto. * cfganal.c: Ditto. * global.c: Ditto. * alloc-pool.c: Ditto. * dwarf2out.c: Ditto. * opts.c: Ditto. * genattrtab.c: Ditto. * tree-ssa-loop-ivcanon.c: Ditto. * predict.c: Ditto. * timevar.c: Ditto. * lcm.c: Ditto. * fortran/gfortranspec.c: Ditto. * regmove.c: Ditto. * local-alloc.c: Ditto. * langhooks.c: Ditto. * function.c: Ditto. * tree-vectorizer.c: Ditto. * gcse.c: Ditto. * ipa-type-escape.c: Ditto. * alias.c: Ditto. * tree-if-conv.c: Ditto. * profile.c: Ditto. * ipa.c: Ditto. * tree-data-ref.c: Ditto. * loop-unroll.c: Ditto. * treelang/treetree.c: Ditto. * calls.c: Ditto. * bt-load.c: Ditto. * ggc-common.c: Ditto. * except.c: Ditto. * coverage.c: Ditto. * cselib.c: Ditto. * tree-cfgcleanup.c: Ditto. * tree-ssa-pre.c: Ditto. * cfgcleanup.c: Ditto. * loop-invariant.c: Ditto. * loop-iv.c: Ditto. * ipa-prop.c: Ditto. * print-tree.c: Ditto. * conflict.c: Ditto. * ggc-page.c: Ditto. * sched-deps.c: Ditto. * regclass.c: Ditto. * tree-object-size.c: Ditto. * combine.c: Ditto. * bb-reorder.c: Ditto. * resource.c: Ditto. * var-tracking.c: Ditto. * cfgloop.c: Ditto. * df-problems.c: Ditto. * reg-stack.c: Ditto. * tlink.c: Ditto. * gccspec.c: Ditto. * sched-rgn.c: Ditto. * tree-ssa-structalias.c: Ditto. * tree-ssa-reassoc.c: Ditto. * config/darwin-c.c: Ditto. * config/darwin.c: Ditto. * config/arm/arm.c: Ditto. * cfgrtl.c: Ditto. * collect2.c: Ditto. * reload1.c: Ditto. From-SVN: r110446
2006-01-29combine.c (simplify_comparison <AND>): Check TRULY_NOOP_TRUNCATION before ↵Adam Nemet1-2/+15
start using a subreg. * combine.c (simplify_comparison <AND>): Check TRULY_NOOP_TRUNCATION before start using a subreg. * config/mips/mips.md (*branch_zero<mode>, *branch_zero<mode>_inverted, *branch_equality<mode>, *branch_equality<mode>_inverted, *branch_equality<mode>_mips16): Remove mode check from comparisons. From-SVN: r110358
2006-01-26re PR rtl-optimization/25703 (ACATS cxa4024 failure)Roger Sayle1-20/+18
PR rtl-optimization/25703 * combine.c (try_combine): Handle zero_extract and strict_low_part of non-lowpart SUBREGs for constant reg_subword_p set optimization. * gcc.target/i386/20060125-1.c: New test case. * gcc.target/i386/20060125-2.c: New test case. From-SVN: r110242
2006-01-24re PR rtl-optimization/25890 (testsuite failure: ↵Paolo Bonzini1-5/+6
gcc.c-torture/compile/20051228-1.c) 2006-01-23 Paolo Bonzini <bonzini@gnu.org> PR rtl-optimization/25890 PR rtl-optimization/25905 * combine.c (expand_compound_operation, expand_field_assignment): Fail if the bitfield's final position is out of bounds. From-SVN: r110170
2006-01-19combine.c (try_combine): Do not worry about MEMs wrapped by USEs.Paolo Bonzini1-104/+50
2006-01-19 Paolo Bonzini <bonzini@gnu.org> * combine.c (try_combine): Do not worry about MEMs wrapped by USEs. (expand_compound_operation, expand_field_assignment): Fail if the bit lengths of an extract operation are out of range. (make_extraction): Compute wanted_inner_mode based on the position and length of the extraction. Make it extraction_mode for non-constant positions, and do not modify offset in that case. When generating a new MEM, use a mode that can hold the extraction while keeping correct alignment. Remove code that supported MEMs wrapped by USEs. (simplify_shift_const_1, force_to_mode) <case USE>: Remove. From-SVN: r109961
2006-01-16combine.c (record_value_for_reg): Invalidate registers if INSN is null.Paolo Bonzini1-9/+15
2005-01-16 Paolo Bonzini <bonzini@gnu.org> * combine.c (record_value_for_reg): Invalidate registers if INSN is null. (record_dead_and_set_regs_1): Likewise, by passing them to record_value_for_reg. (record_dead_and_set_regs): Invalidate stores made by a call. We do not combine across a call, but we still relied on equivalences. From-SVN: r109759
2006-01-16combine.c (combine_instructions): Make it static.Kazu Hirata1-1/+1
* combine.c (combine_instructions): Make it static. * rtl.h: Remove the prototype for combine_instructions. From-SVN: r109746
2006-01-13combine.c (struct reg_stat): Add new fields truncation_label and ↵Adam Nemet1-27/+134
truncated_to_mode. * combine.c (struct reg_stat): Add new fields truncation_label and truncated_to_mode. (record_value_for_reg): Reset truncated_to_mode. (record_truncated_value): New function. (check_promoted_subreg): Call it. Rename to check_conversions. (combine_instructions): Rename check_promoted_subreg to check_conversions. (reg_truncated_to_mode): New function. (make_extraction): Use it. Check TRULY_NOOP_TRUNCATION. (gen_lowpart_or_truncate): New function. (force_to_mode): Use it instead of gen_lowpart. From-SVN: r109679
2006-01-11combine.c (struct undo): Remove is_int.Ian Lance Taylor1-50/+108
2006-01-11 Ian Lance Taylor <ian@airs.com> * combine.c (struct undo): Remove is_int. Enumify types of undos. Allow undoing set of machine mode. (do_SUBST): Use enums instead of is_int. (do_SUBST_MODE): New function. (SUBST_MODE): New macro. (try_combine): Use SUBST_MODE/PUT_MODE instead of generating a new reg and trying to replace reg_regno_rtx with a new register. (undo_all): Use new enums, handle undoing a PUT_MODE change. (simplify_set): Use SUBST_MODE. (distribute_notes): Remove code that tried to update reg notes for regno_reg_rtx changes. From-SVN: r109579
2006-01-03re PR rtl-optimization/25578 (gfortran version 4.2.0 20051227 - 144 new ↵Paolo Bonzini1-3/+3
testsuite failures since 2005121) gcc: 2006-01-03 Paolo Bonzini <bonzini@gnu.org> PR rtl-optimization/25578 * combine.c (combine_simplify_rtx, force_to_mode): Don't pass a parameter to simplify_shift_const if changing ASHIFTRT to LSHIFTRT. gcc/testsuite: 2006-01-03 Paolo Bonzini <bonzini@gnu.org> PR rtl-optimization/25578 * gcc.c-torture/execute/20060102-1.c: New testcase. From-SVN: r109281
2006-01-03combine.c (reg_subword_p): New predicate to test whether the destination of ↵Roger Sayle1-50/+137
a set refers to a... * combine.c (reg_subword_p): New predicate to test whether the destination of a set refers to a subword/piece of a register. (try_combine): Generalize the code to merge the setting of a pseudo to a constant followed by a set of a subword of that register to a constant. From-SVN: r109267
2006-01-03combine.c (apply_distributive_law <SUBREG>): Check TRULY_NOOP_TRUNCATION.Adam Nemet1-1/+6
* combine.c (apply_distributive_law <SUBREG>): Check TRULY_NOOP_TRUNCATION. From-SVN: r109261
2005-12-26re PR middle-end/25568 (RTL checking bootstrap failure on ↵Graham Stott1-0/+2
i686-unknown-linux-gnu) PR middle-end/25568 * combine.c (simplify_shift_const_1 <case PLUS>):Fix enable-checking rtl bootstrap failure. From-SVN: r109064
2005-12-23combine.c (simplify_shift_const): Fix typo.Paolo Bonzini1-143/+152
2005-12-23 Paolo Bonzini <bonzini@gnu.org> * combine.c (simplify_shift_const): Fix typo. Use, whenever applicable, simplify_const_binary_operation. (simplify_shift_const): Leave only the fallback case when no simplification is possible. Extract to... (simplify_shift_const_1): ... here. Always create a new RTX instead of substituting. Remove the signed_count variable. Return NULL_RTX if no substitution is possible. (simplify_and_const_int): Leave only the fallback case when no simplification is possible. Extract to... (simplify_and_const_int_1): ... here. Always create a new RTX instead of substituting. Return NULL_RTX if no substitution is possible. (force_to_mode, simplify_comparison): Don't pass a non-NULL first parameter to simplify_and_const_int and simplify_shift_const, unless it is equal to the expected non-simplified result. From-SVN: r109016
2005-12-20combine.c (try_combine): Improve splitting of binary operators by taking ↵Roger Sayle1-2/+65
advantage of reassociative... * combine.c (try_combine): Improve splitting of binary operators by taking advantage of reassociative transformations. From-SVN: r108834
2005-12-17basic-block.h: Changed basic block numbering so that the entry block is 0 ↵Daniel Berlin1-1/+1
and the exit block is 1. 2005-12-17 Danny Berlin <dberlin@dberlin.org> Kenneth Zadeck <zadeck@naturalbridge.com> * basic-block.h: Changed basic block numbering so that the entry block is 0 and the exit block is 1. Changed insn iterators so that they are tolerant of blocks with no insns. * regrename.c (copyprop_hardreg_forward): Changed basic block numbering so that the entry block is 0 and the exit block is 1. * sched-ebb.c (sehedule_ebbs): Ditto. * tracer.c (branch_ratio_cutoff): Ditto. * cfgloopmanip.c (fix_loop_structure): Ditto. * cfghooks.c (verify_flow_info): Ditto. * cfg.c (compact_blocks): Ditto. * reorg.c (dbr_schedule): Ditto. * flow.c (calculate_global_regs_live, libcall_dead_p): Ditto. * dominance.c (calc_dfs_tree_nonrec, calc_dfs_tree, calculate_dominance_info): Ditto. * cfganal.c (create_edge_list, print_edge_list, flow_depth_first_order_compute, flow_dfs_compute_reverse_init, flow_dfs_compute_reverse_add_bb, flow_dfs_compute_reverse_execute, dfs_enumerate_from): Ditto. * global.c (global_alloc, set_up_bb_rts_numbers): Ditto. * ifcvt.c (find_if_case_2): Ditto. * cfgbuild.c (control_flow_insn_p, count_basic_blocks, find_basic_blocks): Ditto. * predict.c (predict_loops, tree_bb_level_predictions, predict_paths_leading_to, propagate_freq): Ditto. * lcm.c (compute_antinout_edge, compute_laterin, compute_available): Ditto. * function.c (thread_prologue_and_epilogue_insns): Ditto. * gcse.c (gcse_main, bypass_jumps): Ditto. * profile.c (compute_branch_probabilities, compute_value_histograms, branch_prob): Ditto. * tree-flow-inline.h (bsi_start, bsi_after_labels, bsi_last): Ditto. * tree-ssa-phiopt.c (tree_ssa_phiopt, blocks_in_phiopt_order): Ditto. * bt-load.c (compute_defs_uses_and_gen, compute_kill, compute_out, link_btr_uses, migrate_btr_defs): Ditto. * tree-dfa.c (collect_dfa_stats): Ditto. * cfgcleanup.c (try_forward_edges, try_optimize_cfg): Ditto. * cfglayout.c (fixup_reorder_chain): Ditto. * bb-reorder.c (reorder_basic_blocks, duplicate_computed_gotos, partition_hot_cold_basic_blocks): Ditto. * var-tracking.c (vt_find_locations): Ditto. * cfgloop.c (flow_loops_cfg_dump, flow_loops_find, get_loop_body): Ditto. * sched-rgn.c (compute_trg_info, init_regions, schedule_insns): Ditto. * tree-cfg.c (init_empty_tree_cfg, build_tree_cfg, make_edges label_to_block_fn, print_loop_ir, tree_flow_call_edges_add): Ditto. * tree-ssa-reassoc.c (init_reassoc): Ditto. * cfgrtl.c (entry_of_function, rtl_verify_flow_info, rtl_flow_call_edges_add, rtl_flow_call_edges_add): Ditto. * df.c (df_analyze_1, hybrid_search, iterative_dataflow): Ditto and removed unused reverse orders. * df.h (): Ditto. * combine.c: Fix document typo. Co-Authored-By: Kenneth Zadeck <zadeck@naturalbridge.com> From-SVN: r108713
2005-12-16combine.c (combine_simplify_rtx <case NOT, [...]): Move simplifications that ↵Paolo Bonzini1-553/+3
do not require additional infrastructure... 2005-12-16 Paolo Bonzini <bonzini@gnu.org> * combine.c (combine_simplify_rtx <case NOT, NEG, TRUNCATE, FLOAT_TRUNCATE, FLOAT_EXTEND, PLUS, MINUS, AND, IOR, XOR, ABS, VEC_SELECT, POPCOUNT, PARITY, FFS, FLOAT>, simplify_logical): Move simplifications that do not require additional infrastructure... * simplify-rtx.c (simplify_unary_operation_1, simplify_binary_operation_1): ... here. From-SVN: r108634
2005-12-15combine.c: Remove force_to_mode's fourth parameter.Paolo Bonzini1-49/+140
2005-12-15 Paolo Bonzini <bonzini@gnu.org> * combine.c: Remove force_to_mode's fourth parameter. (force_to_mode): Do not handle REG. (canon_reg_for_combine): New. (make_field_assignment): Use it where the removed argument was non-NULL. From-SVN: r108564
2005-12-02re PR target/21017 (ppc 64bit target not using rlwinm)Alan Modra1-6/+27
PR target/21017 * combine.c (simplify_logical <IOR>): Simplify more patterns to rotates. From-SVN: r107873
2005-11-30combine.c (find_split_point): Sign extend bitmask when changing bitfield ↵Dale Johannesen1-2/+4
assignment to IOR of AND. 2005-11-30 Dale Johannesen <dalej@apple.com> Andrew Pinski <pinskia@physics.uc.edu> * combine.c (find_split_point): Sign extend bitmask when changing bitfield assignment to IOR of AND. 2005-11-30 Dale Johannesen <dalej@apple.com> * gcc.c-torture/compile/pr24930.c: New. Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu> From-SVN: r107731
2005-11-21re PR rtl-optimization/24883 (fatal error: internal consistency failure ↵Ian Lance Taylor1-10/+19
building xorg-x11) ./: PR rtl-optimization/24883 * combine.c (combinable_i3pat): When checking whether the destination of i3 is used in i3, consider paradoxical subregs. testsuite/: PR rtl-optimization/24883 * gcc.c-torture/compile/pr24883.c: New test. From-SVN: r107279
2005-11-21combine.c (try_combine): Do not run subst on i1src and i2src in the case of ↵Joseph Myers1-29/+35
generating a PARALLEL for a... * combine.c (try_combine): Do not run subst on i1src and i2src in the case of generating a PARALLEL for a comparison. From-SVN: r107273
2005-11-19combine.c (make_compound_operation): Swap operands of commutative operation ↵Joseph Myers1-0/+10
if necessary before returning. * combine.c (make_compound_operation): Swap operands of commutative operation if necessary before returning. From-SVN: r107219
2005-11-15re PR rtl-optimization/22002 (internal consistency failure with -funroll-loops)Alan Modra1-0/+20
PR rtl-optimization/22002 * combine.c (distribute_notes): Detect cases where a reg dies two or more times in a bb, including on the insn we are combining, and place the death note on the correct range. From-SVN: r106921
2005-11-06re PR target/22432 (Wrong code generation using MMX intrinsics on amd64)Ian Lance Taylor1-8/+10
./: PR target/22432 * combine.c (apply_distributive_law): Don't distribute across a vector mode subreg. testsuite/: PR target/22432 * gcc.target/i386/pr22432.c: New test. From-SVN: r106555
2005-10-12combine.c (make_extraction): Correct offset computation.Adrian Straetling1-2/+3
* combine.c (make_extraction): Correct offset computation. * gcc.c-torture/execute/20051012-1.c: New test. From-SVN: r105330
2005-10-11re PR rtl-optimization/13931 (combiner much slower on big basic blocks)Ian Lance Taylor1-18/+57
PR rtl-optimization/13931 * combine.c: Revert patch of 2003-05-14, and: (try_combine): Only set elim_i1 and elim_i2 if the destination is completely killed in the appropriate insn. (distribute_notes): Don't skip multiple hard register test for elim_i1 and elim_i2. From-SVN: r105275
2005-09-26Check for valid use of subreg.Fariborz Jahanian1-1/+1
Oked by Richard Henderson. From-SVN: r104649
2005-08-26combine.c (make_extraction): Avoid reference outside object.Ian Lance Taylor1-3/+5
2005-08-26 Ian Lance Taylor <ian@airs.com> * combine.c (make_extraction): Avoid reference outside object. From-SVN: r103537
2005-08-08re PR rtl-optimization/23241 (Invalid code generated for comparison of uchar ↵Josh Conner1-1/+1
to 255) PR rtl-optimization/23241 * combine.c (simplify_comparison): Fix error in determining whether to lift a subreg from comparison. From-SVN: r102869
2005-08-03combine.c (can_change_dest_mode): New function.Paul Brook1-24/+38
2005-08-03 Paul Brook <paul@codesourcery.com> * combine.c (can_change_dest_mode): New function. (try_combine, simplify_set): Use it. From-SVN: r102686
2005-08-02combine.c (combine_instructions): Don't use reg_equal/equiv results if the ↵Richard Henderson1-3/+6
mode doesn't match. * combine.c (combine_instructions): Don't use reg_equal/equiv results if the mode doesn't match. From-SVN: r102679
2005-07-22re PR rtl-optimization/22258 (combine causes spill failure on return value ↵J"orn Rennecke1-0/+80
register) PR rtl-optimization/22258 * combine.c (likely_spilled_retval_1, likely_spilled_retval_p): New functions. (try_combine): Use likely_spilled_retval_p. From-SVN: r102279
2005-07-19bt-load.c (link_btr_uses): Fix uninitialised warnings.Ben Elliston1-1/+1
* bt-load.c (link_btr_uses): Fix uninitialised warnings. * cfganal.c (find_edge_index): Ditto. * combine.c (combine_instructions): Ditto. * ddg.c (create_scc): Ditto. (find_successors): Ditto. (find_predecessors): Ditto. (find_nodes_on_paths): Ditto. (longest_simple_path): Ditto. * flow.c (update_life_info): Ditto. (count_or_remove_death_notes): Ditto. (clear_log_links): Ditto. * modulo-sched.c (generate_reg_moves): Ditto. (find_max_asap): Ditto. (find_max_hv_min_mob): Ditto. (find_max_dv_min_mob): Ditto. * sbitmap.c (sbitmap_first_set_bit): Ditto. * sched-rgn.c (extract_edgelst): Ditto. * tree-into-ssa.c (prepare_names_to_update): Ditto. (dump_update_ssa): Ditto. (ssa_names_to_replace) Ditto. (switch_virtuals_to_full_rewrite): Ditto. (update_ssa): Ditto. * tree-vect-transform.c (vect_create_epilog_for_reduction): Ditto. From-SVN: r102151
2005-07-05Makefile.in: Adjust dependencies.Paolo Bonzini1-0/+49
2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in: Adjust dependencies. * tree-pass.h: Add new passes and passes formerly in tree-optimize.c. * basic-block.h (duplicate_computed_gotos): Remove, it is now static. * alias.c (rest_of_handle_cfg, pass_cfg): New. * bb-reorder.c (duplicate_computed_gotos): Make it static. * cfgexpand.c (tree_expand_cfg): Add code formerly at the beginning of rest_of_compilation. * bb-reorder.c (gate_duplicate_computed_gotos, pass_duplicate_computed_gotos, gate_handle_reorder_blocks, rest_of_handle_reorder_blocks, pass_reorder_blocks, gate_handle_partition_blocks, rest_of_handle_partition_blocks, pass_partition_blocks): New. * bt-load.c (gate_handle_branch_target_load_optimize, rest_of_handle_branch_target_load_optimize, pass_branch_target_load_optimize): New. * cfgcleanup.c (rest_of_handle_jump, pass_jump, rest_of_handle_jump2, pass_jump2): New. * cfglayout.c (pass_insn_locators_initialize): New. * cfgrtl.c (pass_free_cfg): New. * combine.c (gate_handle_combine, rest_of_handle_combine, pass_combine): New. * cse.c (gate_handle_cse, rest_of_handle_cse, pass_cse, gate_handle_cse2, rest_of_handle_cse2, pass_cse2): New. * emit-rtl.c (pass_unshare_all_rtl, pass_remove_unnecessary_notes): New. * except.c (pass_set_nothrow_function_flags, pass_convert_to_eh_region_ranges, gate_handle_eh, rest_of_handle_eh, pass_rtl_eh): New. * final.c (pass_compute_alignments, rest_of_handle_final, pass_final, rest_of_handle_shorten_branches, pass_shorten_branches, rest_of_clean_state, pass_clean_state): New. * flow.c (pass_recompute_reg_usage, gate_remove_death_notes, rest_of_handle_remove_death_notes, pass_remove_death_notes, rest_of_handle_life, pass_life, rest_of_handle_flow2, pass_flow2): New. * function.c (pass_instantiate_virtual_regs, pass_init_function, rest_of_handle_check_leaf_regs, pass_leaf_regs): New. * gcse.c (gate_handle_jump_bypass, rest_of_handle_jump_bypass, pass_jump_bypass, gate_handle_gcse, rest_of_handle_gcse, pass_gcse): New. * global.c (rest_of_handle_global_alloc, pass_global_alloc): New. * ifcvt.c (gate_handle_if_conversion, rest_of_handle_if_conversion, pass_rtl_ifcvt, gate_handle_if_after_combine, rest_of_handle_if_after_combine, pass_if_after_combine, gate_handle_if_after_reload, rest_of_handle_if_after_reload, pass_if_after_reload): New. * integrate.c (pass_initial_value_sets): New. * jump.c (pass_cleanup_barriers, purge_line_number_notes, pass_purge_lineno_notes): New. * mode-switching.c (rest_of_handle_mode_switching, pass_mode_switching): New. * local-alloc.c (rest_of_handle_local_alloc, pass_local_alloc): New. * loop-init.c (gate_handle_loop2, rest_of_handle_loop2, pass_loop2): New. * loop.c (gate_handle_loop_optimize, rest_of_handle_loop_optimize, pass_loop_optimize): New. * modulo-sched.c (gate_handle_sms, rest_of_handle_sms, pass_sms): New. * postreload-gcse.c (gate_handle_gcse2, rest_of_handle_gcse2, pass_gcse2): New. * postreload.c (gate_handle_postreload, rest_of_handle_postreload, pass_postreload_cse): New. * profile.c (gate_handle_profiling, pass_profiling, rest_of_handle_branch_prob, pass_branch_prob): New. * recog.c (pass pass_split_for_shorten_branches, gate_do_final_split, pass_split_before_regstack, gate_handle_split_before_regstack, gate_handle_peephole2, rest_of_handle_peephole2, pass_peephole2, rest_of_handle_split_all_insns, pass_split_all_insns): New. * reg-stack.c (gate_handle_stack_regs, rest_of_handle_stack_regs, pass_stack_regs): New. * regmove.c (gate_handle_regmove, rest_of_handle_regmove, pass_regmove, gate_handle_stack_adjustments, rest_of_handle_stack_adjustments, pass_stack_adjustments): New. * regrename.c (gate_handle_regrename, rest_of_handle_regrename, pass_regrename): New. * reorg.c (gate_handle_delay_slots, rest_of_handle_delay_slots, pass_delay_slots, gate_handle_machine_reorg, rest_of_handle_machine_reorg, pass_machine_reorg): New. * rtl.h (extern void purge_line_number_notes): New. * sched-rgn.c (gate_handle_sched, rest_of_handle_sched, gate_handle_sched2, rest_of_handle_sched2, pass_sched, pass_sched2): New. * tracer.c (gate_handle_tracer, rest_of_handle_tracer, pass_tracer): New. * value-prof.c (gate_handle_value_profile_transformations, rest_of_handle_value_profile_transformations, pass_value_profile_transformations): New. * var-tracking.c (gate_handle_var_tracking, pass_variable_tracking): New. * web.c (gate_handle_web, rest_of_handle_web, pass_web): New. * passes.c (open_dump_file, close_dump_file, rest_of_handle_final, rest_of_handle_delay_slots, rest_of_handle_stack_regs, rest_of_handle_variable_tracking, rest_of_handle_machine_reorg, rest_of_handle_old_regalloc, rest_of_handle_regrename, rest_of_handle_reorder_blocks, rest_of_handle_partition_blocks, rest_of_handle_sms, rest_of_handle_sched, rest_of_handle_sched2, rest_of_handle_gcse2, rest_of_handle_regmove, rest_of_handle_tracer, rest_of_handle_if_conversion, rest_of_handle_if_after_combine, rest_of_handle_if_after_reload, rest_of_handle_web, rest_of_handle_branch_prob, rest_of_handle_value_profile_transformations, rest_of_handle_cfg, rest_of_handle_jump_bypass, rest_of_handle_combine, rest_of_handle_life, rest_of_handle_cse, rest_of_handle_cse2, rest_of_handle_gcse, rest_of_handle_loop_optimize, rest_of_handle_loop2, rest_of_handle_branch_target_load_optimize, rest_of_handle_mode_switching, rest_of_handle_jump, rest_of_handle_eh, rest_of_handle_stack_adjustments, rest_of_handle_flow2, rest_of_handle_jump2, rest_of_handle_peephole2, rest_of_handle_postreload, rest_of_handle_shorten_branches, rest_of_clean_state, rest_of_compilation): Remove. * cgraphunit.c (ipa_passes): Moved from tree-optimize.c. * passes.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list): Moved from tree-optimize.c. (init_optimization_passes): Moved from tree-optimize.c, adding the RTL optimizations. * tree-dump.h (dump_info_p, dump_flag): Moved from tree.h. * tree-optimize.c (dump_flags, in_gimple_form, all_passes, all_ipa_passes, all_lowering_passes, register_one_dump_file, register_dump_files, next_pass_1, last_verified, execute_todo, execute_one_pass, execute_pass_list, execute_ipa_pass_list, init_tree_optimization_passes, ipa_passes): Delete. * tree-pass.h (enum tree_dump_index): Moved from tree.h, removing the RTL dumps. (TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved from tree.h. (ipa_passes): Remove. (all_passes, all_ipa_passes, all_lowering_passes): Now extern. * tree.h (enum tree_dump_index, TDF_*, get_dump_file_name, dump_enabled_p, dump_initialized_p, dump_begin, dump_end, dump_node, dump_switch_p, dump_flag_name): Moved to tree-pass.h. (dump_info_p, dump_flag): Moved to tree-dump.h. * Makefile.in: Adjust dependencies for tree-pretty-print.c, cgraph.c, opts.c. * passes.c (finish_optimization_passes): Use dump_begin and dump_end, TDI_end. (gate_rest_of_compilation): New. (pass_rest_of_compilation): Use it. (gate_postreload, pass_postreload): New. * toplev.c (general_init): Rename init_tree_optimization_passes. * toplev.h (init_tree_optimization_passes): Rename to init_optimizations_passes. * tree-dump.c (dump_flag): Make static. (dump_files): Remove RTL dumps. * tree-optimize.c (pass_all_optimizations, pass_early_local_passes, pass_cleanup_cfg, pass_free_cfg_annotations, pass_cleanup_cfg_post_optimizing, pass_free_datastructures, pass_init_datastructures, pass_fixup_cfg): Make non-static. * tree-pretty-print.c: Include tree-pass.h. * cgraph.c: Include tree-dump.h. cp: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (class.o, decl2.o): Adjust dependencies. * class.c: Include tree-dump.h. * decl2.c: Include tree-dump.h. java: 2005-07-05 Paolo Bonzini <bonzini@gnu.org> * Makefile.in (parse.o): Adjust dependencies. * parse.y: Include tree-dump.h. From-SVN: r101627
2005-07-03bb-reorder.c, [...]: Avoid "." or "\n" at end of diagnostics and capital ↵Joseph Myers1-2/+2
letters at start of diagnostics. * bb-reorder.c, c-pch.c, c-pragma.c, c.opt, cfghooks.c, cfgloop.c, cfgrtl.c, cgraphunit.c, config/c4x/c4x.c, config/cris/cris.c, config/frv/frv.c, config/host-darwin.c, config/iq2000/iq2000.c, config/lynx.h, config/m68k/m68k.c, config/pa/pa.c, config/sh/sh.h, config/stormy16/stormy16.c, config/v850/v850.c, config/vax/netbsd-elf.h, coverage.c, dwarf2out.c, emit-rtl.c, except.c, gcc.c, tree-cfg.c, tree-eh.c, tree-ssa.c, xcoffout.c: Avoid "." or "\n" at end of diagnostics and capital letters at start of diagnostics. * combine.c, cse.c: Don't translate dump file output. * toplev.c (print_version): Only translate output if going to stderr. From-SVN: r101561
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2005-06-20re PR target/22077 (vec_all_eq does not produce good result)Fariborz Jahanian1-0/+5
PR 22077. Oked by Roger Sayle. From-SVN: r101211
2005-06-19combine.c (make_compound_operation): Use simplify_subreg.Andreas Krebbel1-31/+23
2005-06-19 Andreas Krebbel <krebbel1@de.ibm.com> * combine.c (make_compound_operation): Use simplify_subreg. Delete a optimization already done by simplify_subreg. From-SVN: r101183