aboutsummaryrefslogtreecommitdiff
path: root/gcc/loop.c
AgeCommit message (Collapse)AuthorFilesLines
2004-02-19* loop.c (all_sets_invariant_p): Remove.Kazu Hirata1-31/+0
From-SVN: r78090
2004-02-14loop.c (check_dbra_loop): Use gen_int_mode instead of GEN_INT for ↵Eric Botcazou1-4/+5
start_value when... * loop.c (check_dbra_loop): Use gen_int_mode instead of GEN_INT for start_value when it is directly moved into reg, and factorize the retrieval of GET_MODE (reg). From-SVN: r77803
2004-02-06loop.c (force_movables): Transitively increase the priorities of all insns ↵Ulrich Weigand1-3/+9
forces by an insn... * loop.c (force_movables): Transitively increase the priorities of all insns forces by an insn, not just the first one. From-SVN: r77419
2004-02-02alias.c (record_set): Use hard_regno_nregs.Jan Hubicka1-1/+1
* alias.c (record_set): Use hard_regno_nregs. * bt-load.c (find_btr_reference, note_btr_set): Likewise. * builtins.c (apply_args_size): Likewise. * caller-save.c (setup_save_areas, save_call_clobbered_regs, mark_set_regs, add_stored_regs, mark_referenced_regs, insert_restore, insert_save, insert_one_insn): Likewise. * cfgcleanup.c: Include regs.h (mark_effect, mentions_nonequal_regs): Likewise. * cfgrtl.c (mark_killed_regs): Likewise * combine.c (update_table_tick, record_value_for_reg, record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p, reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths, reg_bitfield_target_p, distribute_notes): Likewise. * cse.c (mention_regs, insert, invalidate, invalidate_for_call, exp_equiv_p, cse_insn): Likewise. * cselib.c (cselib_lookup): Likewise. (cselib_invalidate_regno, cselib_record_set): Likewise. * df.c (df_ref_record): Likewise. * dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor): Likewise. * flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg, count_or_remove_death_notes_bb): Likewise. * function.c (aggregate_value_p, keep_stack_depressed): Likewise. * gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts, mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise. * integrate.c (mark_stores): Likewise. * jump.c (delete_prior_computation): Likewise. * lcm.c (reg_dies, reg_becomes_live): Likewise. * local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise. * loop.c (LOOP_REGNO_NREGS): Likewise. * postreload.c (reload_combine, reload_combine_note_store, reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise. * ra-colorize.c (combine, color_usable_p, get_free_reg, calculate_dont_begin, calculate_dont_begin, colorize_one_web, try_recolor_web, insert_coalesced_conflicts, check_colors, break_precolored_alias): Likewise. * ra-debug.c: Include regs.h (ra_print_rtx_object): Likewise. * ra-rewrite (choose_spill_colors): Likewise. (spill_same_color_p, update_spill_colors, spill_is_free): Likewise. * ra.c (init_ra): Likewise. * recog.c (reg_fits_class_p, peep2_reg_dead_p, peep2_find_free_register): Likewise. * reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise. * regclass.c (hard_regno_nregs): New array. (init_reg_modes_once): Initialize it. (choose_hard_reg_mode): Use it. (record_reg_classes): Likewise. * regmove.c (mark_flags_life_zones): Likewise. * regrename.c (note_sets, clear_dead_regs, regrename_optimize, scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno, copy_value, maybe_mode_change, find_oldest_value_reg, copyprop_hardreg_forward_1): * regs.h (hard_regno_nregs): Declare. * realod.c (reload_inner_reg_of_subreg): Use it. (push_reload, combine_reloads, find_dummy_reload, hard_reg_set_here_p, operands_match_p, decompose, find_reloads, refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p, reload_adjust_reg_for_mode): Likewise. * reload1.c (compute_use_by_pseudos, count_pseudo, count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live, spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use, clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p allocate_reload_reg, choose_reload_regs, emit_reload_insns, delete_output_reload): Likewise. * resource.c (update_live_status, mark_referenced_resources, mark_set_resources, mark_target_live_regs): Likewise. * rtlanal.c: Include regs.h (refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p, dead_or_set_regno_p, find_regno_note, find_reg_fusage, subreg_regno_offset, subreg_offset_representable_p, hoist_test_store): Likewise. * sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise. * sched-rgn.c (check_live_1, update_live_1): Likewise. * stmt.c: Include regs.h (decl_conflicts_with_clobbers_p): Likewise. * varasm.c (make_decl_rtl): Likewise. * Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy. From-SVN: r77088
2004-01-20re PR rtl-optimization/12440 (gcc 3.3.1 on i386 linux 2.4.22 crashes during ↵Zdenek Dvorak1-1/+5
compilation of quicktime4linux 2.0.0) PR optimization/12440 * loop.c: Include ggc.h. (loop_optimize): Run garbage collector between optimization of loops. * Makefile.in (loop.o): Add GGC_H dependency. From-SVN: r76213
2004-01-16c-common.h: Fix comment formatting.Kazu Hirata1-1/+1
* c-common.h: Fix comment formatting. * c-cppbuiltin.c: Likewise. * c-pragma.c: Likewise. * calls.c: Likewise. * collect2.c: Likewise. * cppcharset.c: Likewise. * cpptrad.c: Likewise. * dbxout.c: Likewise. * defaults.h: Likewise. * dwarf2out.c: Likewise. * fold-const.c: Likewise. * genautomata.c: Likewise. * genconditions.c: Likewise. * genflags.c: Likewise. * gengtype.c: Likewise. * integrate.c: Likewise. * loop.c: Likewise. * predict.c: Likewise. * sdbout.c: Likewise. From-SVN: r75957
2004-01-14system.h: Poison PROMOTED_MODESteven Bosscher1-1/+1
* system.h: Poison PROMOTED_MODE * integrate.c (expand_inline_function): Don't mention the PROMOTED_MODE. * loop.c (update_giv_derive): Same. * tree.h (DECL_RTL): Same. From-SVN: r75878
2004-01-12re PR rtl-optimization/12826 (Optimizer removes reference through volatile ↵Jan Hubicka1-0/+2
pointer) PR opt/12826 * loop.c (insert_loop_mem): Preffer VOLATILE memory references to be stored. PR opt/12863 * cfgcleanup.c (label_is_jump_target_p): Move to... * rtlanal.c (label_is_jump_target_p): ... here. * cfgrtl.c (cfg_layout_redirect_edge_and_branch): Fix redirecting of fallthru edges unified with branch edges. From-SVN: r75733
2004-01-06alias.c: Fix comment typos.Kazu Hirata1-1/+1
* alias.c: Fix comment typos. * builtins.c: Likewise. * cfg.c: Likewise. * df.c: Likewise. * dominance.c: Likewise. * dwarf2out.c: Likewise. * emit-rtl.c: Likewise. * expr.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * gcse.c: Likewise. * genattrtab.c: Likewise. * genrecog.c: Likewise. * gensupport.c: Likewise. * ggc-zone.c: Likewise. * integrate.c: Likewise. * local-alloc.c: Likewise. * loop.c: Likewise. * recog.c: Likewise. * regmove.c: Likewise. * reg-stack.c: Likewise. * reorg.c: Likewise. * rtlanal.c: Likewise. * rtl.h: Likewise. * sched-ebb.c: Likewise. * simplify-rtx.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. From-SVN: r75475
2004-01-02loop.c (loop_optimize): Free all loops_info's mems.Andrew Pinski1-1/+4
2004-01-02 Andrew Pinski <pinskia@physics.uc.edu> * loop.c (loop_optimize): Free all loops_info's mems. From-SVN: r75339
2003-12-22re PR rtl-optimization/12828 (-floop-optimize is unstable on PowerPC (float ↵Dale Johannesen1-1/+34
to int conversion problem)) 2003-12-21 Dale Johannesen <dalej@apple.com> PR optimization/12828 * loop.c: Add find_regs_nested to look inside CLOBBER(MEM). (scan_loop): Call it. * regclass.c (reg_scan_mark_regs): Look inside CLOBBER(MEM). From-SVN: r74935
2003-12-21alias.c: Fix comment formatting.Kazu Hirata1-1/+1
* alias.c: Fix comment formatting. * alloc-pool.c: Likewise. * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * c-pretty-print.c: Likewise. * caller-save.c: Likewise. * cfghooks.h: Likewise. * cgraph.c: Likewise. * collect2.c: Likewise. * cppfiles.c: Likewise. * cpplib.h: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * emit-rtl.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genemit.c: Likewise. * ggc.h: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * libgcc2.h: Likewise. * loop.c: Likewise. * predict.h: Likewise. * unwind-libunwind.c: Likewise. * varasm.c: Likewise. From-SVN: r74907
2003-12-18loop.c (move_movables): Handle combination of m->consec...Ulrich Weigand1-1/+2
ChangeLog: * loop.c (move_movables): Handle combination of m->consec, m->move_insn_first, and m->insert_temp all nonzero correctly. testsuite/ChangeLog: * gcc.dg/20031216-1.c: New test. From-SVN: r74778
2003-12-15reload.c (reg_overlap_mentioned_for_reload_p): When looking at a PLUS in X...J"orn Rennecke1-2/+8
* reload.c (reg_overlap_mentioned_for_reload_p): When looking at a PLUS in X, avoid spuriously returning nonzero when IN is a REG or another simple PLUS, or a MEM containing one. * loop.c (loop_invariant_p): Amend comment about where new registers might come from. From-SVN: r74638
2003-12-12re PR rtl-optimization/13037 ([gcse-lm] g77 generates incorrect code)Roger Sayle1-0/+4
PR optimization/13037 * loop.c (update_giv_derive): Ignore redundant sets of a biv when calculating how to derive a giv from a biv. * g77.f-torture/execute/13037.f: New test case. From-SVN: r74572
2003-12-11basic-block.h (BLOCK_HEAD, BLOCK_END): Remove.Steven Bosscher1-8/+8
2003-12-11 Steven Bosscher <steven@gcc.gnu.org> * basic-block.h (BLOCK_HEAD, BLOCK_END): Remove. (BLOCK_HEAD_TREE, BLOCK_END_TREE): Remove. (basic_block_def): Rename `head' to `head_' and `end' to `end_'. (BB_HEAD, BB_END): New accessor macros for the `head_' and `end_' fields of a basic block. * bb-reorder.c, bt-load.c, caller-save.c, cfg.c, cfganal.c, cfgbuild.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgloopanal.c, cfgloopmanip.c, cfgrtl.c, combine.c, conflict.c, df.c, emit-rtl.c, final.c, flow.c, function.c, gcse.c, global.c, graph.c, haifa-sched.c, ifcvt.c, lcm.c, local-alloc.c, loop-unswitch.c, loop.c, postreload.c, predict.c, profile.c, ra-build.c, ra-debug.c, ra-rewrite.c, ra.c, recog.c, reg-stack.c, regclass.c, regmove.c, regrename.c, reload1.c, resource.c, sched-ebb.c, sched-rgn.c, sibcall.c, tracer.c, config/frv/frv.c, config/i386/i386.c, config/ia64/ia64.c: Use the BB_HEAD and BB_END macros instead of accessing the `head' and `end' fields of a basic block directly. * gengtype.c: Add missing piece from earlier patch. Dunno what I was thinking... From-SVN: r74520
2003-12-07re PR rtl-optimization/13318 (ICE: floating point exception in the loop ↵Eric Botcazou1-0/+3
optimizer) PR optimization/13318 * loop.c (express_from): Protect integer division from overflow. From-SVN: r74387
2003-11-21ChangeLog.7: Fix comment typos.Kazu Hirata1-1/+1
* ChangeLog.7: Fix comment typos. * c-common.c: Likewise. * c-pretty-print.c: Likewise. * cgraphunit.c: Likewise. * et-forest.h: Likewise. * expr.c: Likewise. * gcse.c: Likewise. * genautomata.c: Likewise. * genrecog.c: Likewise. * gensupport.c: Likewise. * ggc-zone.c: Likewise. * haifa-sched.c: Likewise. * ifcvt.c: Likewise. * loop.c: Likewise. * optabs.c: Likewise. * pretty-print.h: Likewise. * regrename.c: Likewise. * rtl.h: Likewise. * sched-rgn.c: Likewise. * target.h: Likewise. * value-prof.c: Likewise. * web.c: Likewise. From-SVN: r73795
2003-11-09loop.c (check_dbra_loop): Try swapping the comparison operands of the loop ↵Roger Sayle1-0/+16
condition to identify a... * loop.c (check_dbra_loop): Try swapping the comparison operands of the loop condition to identify a suitable induction variable. * unroll.c (loop_iterations): Likewise. From-SVN: r73391
2003-10-24re PR middle-end/11414 (Segementation fault compiling csets.adb)Roger Sayle1-13/+5
PR middle-end/11414 * loop.c (load_mems): Use redirect_jump to forward jumps from the original loop end label to the new "loop sink" block's label. From-SVN: r72876
2003-10-05c-pretty-print.c: Fix comment typos.Kazu Hirata1-1/+1
* c-pretty-print.c: Fix comment typos. * c-pretty-print.h: Likewise. * calls.c: Likewise. * cfgloopmanip.c: Likewise. * cgraphunit.c: Likewise. * cppfiles.c: Likewise. * final.c: Likewise. * function.c: Likewise. * gcov-io.h: Likewise. * gcse.c: Likewise. * genoutput.c: Likewise. * loop.c: Likewise. * postreload.c: Likewise. * reg-stack.c: Likewise. * regmove.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * simplify-rtx.c: Likewise. * tree-inline.c: Likewise. * config/m68hc11/m68hc11.h: Likewise. * config/mmix/mmix.c: Likewise. * config/mn10300/mn10300.md: Likewise. * config/sh/sh.h: Likewise. From-SVN: r72118
2003-09-14re PR rtl-optimization/10914 (unswitch loops does not work on powerpc)Zdenek Dvorak1-9/+16
2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz> PR optimization/10914 * expr.h (get_condition, canonicalize_condition): Declaration changed. * cfgloopanal.c (simple_loop_exit_p): Add parameter to a get_condition and canonicalize_condition calls. * gcse.c (fis_get_condition, delete_null_pointer_checks_1, delete_null_pointer_checks): Ditto. * ifcvt.c (noce_get_alt_condition, noce_get_condition): Ditto. * predict.c (estimate_probability, expected_value_to_br_prob): Ditto. * loop.c (check_dbra_loop, get_condition_for_loop): Ditto. (canonicalize_condition, get_condition): Allow to return comparisons of cc mode registers. * loop-unswitch.c (may_unswitch_on_p, unswitch_single_loop): Allow cc mode registers comparison in condition. From-SVN: r71398
2003-09-12* loop.c: Move comments describing BIV's and GIV's to top of fileChris Lattner1-10/+10
From-SVN: r71333
2003-09-06loop.c (loop_regs_update): Delete else clause for PATTERN rtx and simplify.James E Wilson1-15/+6
* loop.c (loop_regs_update): Delete else clause for PATTERN rtx and simplify. From-SVN: r71160
2003-07-30* loop.c (check_dbra_loop): Allow LTU in the loop condition.Andi Kleen1-2/+4
From-SVN: r69971
2003-07-22alias.c: Fix comment formatting.Kazu Hirata1-1/+1
* alias.c: Fix comment formatting. * c-common.c: Likewise. * c-decl.c: Likewise. * c-opts.c: Likewise. * combine.c: Likewise. * cpplib.c: Likewise. * diagnostic.c: Likewise. * dojump.c: Likewise. * final.c: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcse.c: Likewise. * ggc-page.c: Likewise. * jump.c: Likewise. * loop.c: Likewise. * mips-tfile.c: Likewise. * recog.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * tree.c: Likewise. * tree.h: Likewise. From-SVN: r69689
2003-07-22combine.c (if_then_else_cond): Simplify the comparison of rtx against -1, 0, ↵Kazu Hirata1-3/+1
and 1. * combine.c (if_then_else_cond): Simplify the comparison of rtx against -1, 0, and 1. * loop.c (check_dbra_loop): Likewise. * optabs.c (emit_conditional_move): Likewise. (emit_conditional_add): Likewise. * config/i386/i386.md (*movsi_or): Likewise. (*movdi_or_rex6): Likewise. From-SVN: r69658
2003-07-19alias.c [...]: Remove unnecessary casts.Kaveh R. Ghazi1-32/+24
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c gcse.c genattr.c genattrtab.c genautomata.c genconditions.c genemit.c genextract.c genoutput.c genrecog.c gensupport.c ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c postreload.c prefix.c print-tree.c protoize.c ra-build.c ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c regmove.c regrename.c reload.c reload1.c reorg.c resource.c sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary casts. From-SVN: r69587
2003-07-18re PR target/11087 (gcc miscompiles raid1.c from linux kernel)Jakub Jelinek1-3/+30
PR target/11087 * loop.c (basic_induction_var): Check if convert_modes emitted any instructions. Remove them and return 0 if so. * gcc.c-torture/execute/20030717-1.c: New test. From-SVN: r69552
2003-07-17loop.c (check_ext_dependent_givs): Pass const struct loop * instead of ↵Ulrich Weigand1-8/+38
struct loop_info * as argument. * loop.c (check_ext_dependent_givs): Pass const struct loop * instead of struct loop_info * as argument. Accept BIVs with increment +/- 1 provided there is a friendly exit test against a loop-invariant value. (strength_reduce): Adapt call to check_ext_dependent_givs. From-SVN: r69489
2003-07-10re PR rtl-optimization/9745 ([powerpc] miscompiles libmcrypt (alias problem ↵James E Wilson1-9/+12
during loop)) PR optimization/9745 * loop.c (loop_iv_add_mult_emit_before): Call loop_regs_update before loop_insn_emit_before. (loop_iv_add_mult_sink, loop_iv_add_mult_hoist): Likewise. From-SVN: r69220
2003-07-06jump.c: Convert prototypes to ISO C90.Andreas Jaeger1-606/+321
* jump.c: Convert prototypes to ISO C90. * langhooks-def.h: Likewise. Add extern to prototypes. * langhooks.c: Likewise. * langhooks.h: Likewise. * lcm.c: Likewise. * local-alloc.c: Likewise. * loop-init.c: Likewise. * loop-unroll.c: Likewise. * loop-unswitch.c: Likewise. * loop.c: Likewise. * loop.h: Likewise. Add extern to prototypes. * machmode.h: Likewise. * main.c: Likewise. * mbchar.c: Likewise. * mbchar.h: Likewise. * mkdeps.c: Likewise. * mkdeps.h: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * output.h: Likewise. * gccspec.c: Likwise. * postreload.c: Likewise. * prefix.c: Likewise. * prefix.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * real.h: Likewise. * recog.c: Likewise. * recog.h: Likewise. * reg-stack.c: Likewise. * regclass.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * reload.c: Likewise. * reload.h: Likewise. * reload1.c: Likewise. * reorg.c: Likewise. * resource.c: Likewise. * resource.h: Likewise. * rtl-error.c: Likewise. * rtl.c: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. From-SVN: r68998
2003-07-01basic-block.h: Fix comment typos.Kazu Hirata1-3/+3
* 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
2003-06-29loop.c (count_one_set): Fix detection of registers set in more than one ↵Zdenek Dvorak1-1/+1
basic block. * loop.c (count_one_set): Fix detection of registers set in more than one basic block. From-SVN: r68680
2003-06-16decl.c, [...]: Don't use the PTR macro.Kaveh R. Ghazi1-3/+3
cp: * cp/decl.c, cp/pt.c, cp/search.c, cp/tree.c: Don't use the PTR macro. gcc: * bitmap.c, builtins.c, c-incpath.c, cgraph.c, config/frv/frv.c, config/mips/mips.c, cppfiles.c, cpphash.c, cppinit.c, cpplib.c, dwarf2out.c, dwarfout.c, except.c, expr.c, expr.h, fold-const.c, function.c, gcc.c, genoutput.c, gensupport.c, global.c, haifa-sched.c, hashtable.c, ifcvt.c, integrate.c, local-alloc.c, loop.c, mips-tdump.c, mips-tfile.c, mkdeps.c, protoize.c, read-rtl.c, recog.h, reload1.c, sbitmap.c, ssa-dce.c, stringpool.c, tlink.c, tree.c, varasm.c, varray.c: Don't use the PTR macro. From-SVN: r68043
2003-06-01* loop.c (check_insn_for_givs): Remove DONT_REDUCE_ADDR macro.Andreas Jaeger1-4/+0
From-SVN: r67312
2003-05-31flags.h (flag_wrapv): New flag controlling overflow semantics.Roger Sayle1-0/+3
* flags.h (flag_wrapv): New flag controlling overflow semantics. * toplev.c (flag_wrapv): Declare the variable with default false. (lang_independent_options): New option "-fwrapv" to set the above. * fold-const.c (extract_muldiv_1): Disable optimization of (2*x)/2 as x, when signed arithmetic overflow wraps around. (fold): Optimize "-A - B" as "-B - A" if overflow wraps around. * loop.c (basic_induction_var): Ignore BIVs that rely on undefined overflow when flag_wrapv is true. * java/lang.c (java_init_options): Prescribe wrap-around two's complement arithmetic overflow by setting flag_wrapv. * doc/invoke.texi: Document new -fwrapv command line option. * doc/c-tree.texi: Mention that the overflow semantics of NEGATE_EXPR, PLUS_EXPR, MINUS_EXPR and MULT_EXPR is dependent upon both flag_wrapv and flag_trapv. * gcc.dg/fwrapv-1.c: New test case. * gcc.dg/fwrapv-2.c: New test case. * libjava.lang/Overflow.java: New test. * libjava.lang/Overflow.out: New file. From-SVN: r67270
2003-05-17cfgloopanal.c (test_for_iteration): Use string concatentation on ↵Kaveh R. Ghazi1-5/+3
HOST_WIDE_INT_PRINT_* format specifier to collapse... gcc: * cfgloopanal.c (test_for_iteration): Use string concatentation on HOST_WIDE_INT_PRINT_* format specifier to collapse multiple function calls into one. * dbxout.c (dbxout_symbol): Likewise. * defaults.h (ASM_OUTPUT_SIZE_DIRECTIVE): Likewise. * dwarf2asm.c (dw2_asm_output_data_uleb128, dw2_asm_output_data_sleb128): Likewise. * genrecog.c (debug_decision_2): Likewise. * loop.c (emit_prefetch_instructions): Likewise. * print-rtl.c (print_rtx): Likewise. * print-tree.c (print_node_brief, print_node): Likewise. * ra-debug.c (dump_igraph, dump_graph_cost, dump_static_insn_cost): Likewise. * ra-rewrite.c (dump_cost): Likewise. * sdbout.c (PUT_SDB_INT_VAL, PUT_SDB_SIZE): Likewise. * sreal.c (dump_sreal): Likewise. * unroll.c (unroll_loop, precondition_loop_p): Likewise. * varasm.c (assemble_vtable_entry): Likewise. cp: * ptree.c (cxx_print_type, cxx_print_xnode): Use string concatentation on HOST_WIDE_INT_PRINT_* format specifier to collapse multiple function calls into one. * tree.c (debug_binfo): Likewise. java: * parse.y (print_int_node): Use string concatentation on HOST_WIDE_INT_PRINT_* format specifier to collapse multiple function calls into one. From-SVN: r66900
2003-05-14* loop.c (check_dbra_loop): Factor common test.Nathan Sidwell1-4/+6
From-SVN: r66803
2003-05-03emit-rtl.c (last_call_insn, [...]): New functions.Olivier Hainque1-0/+24
* emit-rtl.c (last_call_insn, add_function_usage_to): New functions. * rtl.h (last_call_insn, add_function_usage_to): New prototypes. * builtins.c (expand_builtin_apply): Use the new emit-rtl functions. * calls.c (emit_call_1): Likewise. (expand_call): For calls initializing constant memory, replace emission of standalone mem /u clobber with function usage entry. * expr.c (emit_block_move_via_libcall): Likewise. * cse.c (count_reg_usage, case EXPR_LIST): New case. * flow.c (propagate_one_insn): Pass entire operand of CALL_INSN_FUNCTION_USAGE to mark_used_regs. * integrate.c (try_constants): For CALL_INSNs, substitute constants within the FUNCTION_USAGE also. * loop.c (prescan_loop): Note clobbers of const mem mentioned in FUNCTION_USAGE lists. * reload1.c (replace_pseudos_in): Renamed. (reload): Use it for clobbers surviving until the end of the reload. From-SVN: r66429
2003-04-25re PR rtl-optimization/8705 ([HP-PA] ICE in emit_move_insn_1, at expr.c:3101)John David Anglin1-1/+7
PR opt/8705 * gcse.c (try_replace_reg): On a successful substitution of a constant into a single set, try to simplify the source of the set. * loop.c (scan_loop): Don't try to optimize a MODE_CC set with a constant source. From-SVN: r66060
2003-04-03re PR rtl-optimization/10157 ([Sparc] internal compiler error: in ↵Eric Botcazou1-5/+9
extract_insn, at recog.c:2188) PR optimization/10157 * gcse.c (can_copy_p): Rename it to can_copy. (can_copy_init_p): Remove. (compute_can_copy): Use can_copy instead of can_copy_p. (can_copy_p): New exported function. Call compute_can_copy. (hash_scan_set): Use it. (gcse_main): Don't call compute_can_copy. (bypass_jumps): Don't call compute_can_copy. * rtl.h (can_copy_p): Declare. * loop.c (scan_loop): Don't move the source and add a reg-to-reg copy if the mode doesn't support copy operations. From-SVN: r65210
2003-03-29reload1.c (reload_as_needed): Allow a USE in asm reloads.Alan Modra1-0/+4
* reload1.c (reload_as_needed): Allow a USE in asm reloads. * loop.c: (find_mem_in_note_1, find_mem_in_note): Comment. From-SVN: r64991
2003-03-28loop.c: (find_mem_in_note_1, find_mem_in_note): New functions.Alan Modra1-3/+49
* loop.c: (find_mem_in_note_1, find_mem_in_note): New functions. (replace_loop_mems): Add "written" param. Remove invalid REG_EQUAL notes after hoisting. (load_mems): Adjust replace_loop_mems call. From-SVN: r64950
2003-03-27re PR rtl-optimization/10087 (optimizer produces wrong code when indexing 2D ↵Glen Nakamura1-0/+15
array) PR opt/10087 * gcc.dg/20030324-1.c: New test. PR opt/10087 * loop.c (loop_givs_reduce): Skip bivs with duplicate locations while incrementing giv. (record_biv): Check for duplicate biv locations and set (struct induction *) v->same if found. From-SVN: r64928
2003-03-15rtl.h (subrtx_p): Renamed to rtx_referenced_p.Josef Zlomek1-1/+2
* rtl.h (subrtx_p): Renamed to rtx_referenced_p. (rtx_pair): Added new element update_label_nuses, renamed to replace_label_data. * cfgcleanup.c (outgoing_edges_match, try_crossjump_to_edge): Use replace_label_data instead of rtx_pair. * loop.c (load_mems): Likewise. * rtlanal.c (replace_label): Replace label in pool constants and in INSN_LIST (in REG_LABEL note). (subrtx_p): Renamed to rtx_referenced_p. (subrtx_p_1): Renamed to rtx_referenced_p_1, compare the interior of LABEL_REF with CODE_LABEL, traverse constants from pool. From-SVN: r64419
2003-03-10cfgcleanup.c (outgoing_edges_match): Compare the jump tables.Josef Zlomek1-45/+0
* cfgcleanup.c (outgoing_edges_match): Compare the jump tables. (try_crossjump_to_edge): Replace refereces to one jump table by references to identical jump table. * loop.c (load_mems): Moved setting the JUMP_LABEL to replace_label. (replace_label): Moved to rtlanal.c. (struct rtx_pair): Moved to rtl.h. * rtl.h (struct rtx_pair): Moved from loop.c. (replace_label): New extern function. (subrtx_p): New extern function. (tablejump_p): New extern function. * rtlanal.c (replace_label): Moved from loop.c. (subrtx_p_1): New static function. (subrtx_p): New function. (tablejump_p): New function. From-SVN: r64096
2003-03-08calls.c: Fix comment formatting.Kazu Hirata1-4/+4
* calls.c: Fix comment formatting. * cfgloopanal.c: Likewise. * cfgloopmanip.c: Likewise. * combine.c: Likewise. * dwarf2out.c: Likewise. * ggc-common.c: Likewise. * langhooks.c: Likewise. * loop-unroll.c: Likewise. * loop.c: Likewise. * ra-build.c: Likewise. * sbitmap.c: Likewise. * toplev.c: Likewise. From-SVN: r63966
2003-02-28loop.c (struct movable): Add insert_temp, shrink savemode.Dale Johannesen1-50/+110
2003-02-28 Dale Johannesen <dalej@apple.com> * loop.c (struct movable): Add insert_temp, shrink savemode. (scan_loop): Accept invariants that require copying; mark as insert_temp. (combine_movables): Don't combine insert_temp movables. (move_movables): Insert copies for insert_temp movables. Don't record the info based on regno for insert_temp's. From-SVN: r63572
2003-02-26cse.c (count_reg_usage): Fix handling of REG_EQUAL notes.Zdenek Dvorak1-1/+1
* cse.c (count_reg_usage): Fix handling of REG_EQUAL notes. * Makefile.in (loop-unroll.o): New. * cfgloop.h (UAP_PEEL, UAP_UNROLL, UAP_UNROLL_ALL): New. (unroll_and_peel_loops): Declare. * alias.c (init_alias_analysis): Flag_unroll_loops renamed to flag_old_unroll_loops. * loop.c (loop_invariant_p): Ditto. * unroll.c (unroll_loop): Flag_unroll_all_loops renamed to flag_old_unroll_all_loops. * flags.h (flag_unroll_loops): Renamed to flag_old_unroll_loops. (flag_unroll_all_loops): Renamed to flag_old_unroll_all_loops. * params.def (PARAM_MAX_UNROLLED_INSNS): Default value changed. (PARAM_MAX_AVERAGE_UNROLLED_INSNS, PARAM_MAX_UNROLL_TIMES, PARAM_MAX_PEELED_INSNS, PARAM_MAX_PEEL_TIMES, PARAM_MAX_COMPLETELY_PEELED_INSNS, PARAM_MAX_COMPLETELY_PEEL_TIMES, PARAM_MAX_ONCE_PEELED_INSNS): New. * toplev.h (flag_old_unroll_loops, flag_old_unroll_all_loops): New. (flag_unroll_loops, flag_unroll_all_loops): Used for new unroller instead of old one. (flag_peel_loops): New. (lang_independent_options): The new flags added. (rest_of_compilation): Call new unroller. (process_options): Setup flags for coexistence of old and new unroller. * doc/invoke.texi: Document new options. * doc/passes.texi: Document new unroller pass. From-SVN: r63462