summaryrefslogtreecommitdiff
path: root/gcc/loop.c
Commit message (Collapse)AuthorAgeFilesLines
* PR optimization/12440rakdver2004-01-201-1/+5
| | | | | | | | | * loop.c: Include ggc.h. (loop_optimize): Run garbage collector between optimization of loops. * Makefile.in (loop.o): Add GGC_H dependency. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@76213 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-common.h: Fix comment formatting.kazu2004-01-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75957 138bc75d-0d04-0410-961f-82ee72b054a4
* * system.h: Poison PROMOTED_MODEsteven2004-01-141-1/+1
| | | | | | | | | | * integrate.c (expand_inline_function): Don't mention the PROMOTED_MODE. * loop.c (update_giv_derive): Same. * tree.h (DECL_RTL): Same. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75878 138bc75d-0d04-0410-961f-82ee72b054a4
* PR opt/12826hubicka2004-01-121-0/+2
| | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75733 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment typos.kazu2004-01-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75475 138bc75d-0d04-0410-961f-82ee72b054a4
* 2004-01-02 Andrew Pinski <pinskia@physics.uc.edu>pinskia2004-01-021-1/+4
| | | | | | | * loop.c (loop_optimize): Free all loops_info's mems. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75339 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-12-21 Dale Johannesen <dalej@apple.com>dalej2003-12-221-1/+34
| | | | | | | | | | 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). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74935 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment formatting.kazu2003-12-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74907 138bc75d-0d04-0410-961f-82ee72b054a4
* ChangeLog:uweigand2003-12-181-1/+2
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74778 138bc75d-0d04-0410-961f-82ee72b054a4
* * reload.c (reg_overlap_mentioned_for_reload_p):amylaar2003-12-151-2/+8
| | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74638 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/13037sayle2003-12-121-0/+4
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74572 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-12-11 Steven Bosscher <steven@gcc.gnu.org>steven2003-12-111-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | * 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... git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74520 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/13318ebotcazou2003-12-071-0/+3
| | | | | | | * loop.c (express_from): Protect integer division from overflow. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74387 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog.7: Fix comment typos.kazu2003-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73795 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): Try swapping the comparison operandssayle2003-11-091-0/+16
| | | | | | | | of the loop condition to identify a suitable induction variable. * unroll.c (loop_iterations): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73391 138bc75d-0d04-0410-961f-82ee72b054a4
* PR middle-end/11414sayle2003-10-241-13/+5
| | | | | | | | * loop.c (load_mems): Use redirect_jump to forward jumps from the original loop end label to the new "loop sink" block's label. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72876 138bc75d-0d04-0410-961f-82ee72b054a4
* * c-pretty-print.c: Fix comment typos.kazu2003-10-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72118 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-09-12 Zdenek Dvorak <rakdver@atrey.karlin.mff.cuni.cz>pinskia2003-09-151-9/+16
| | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71398 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c: Move comments describing BIV's and GIV's to top of filegerald2003-09-121-10/+10
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71333 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (loop_regs_update): Delete else clause for PATTERN rtx andwilson2003-09-071-15/+6
| | | | | | | simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@71160 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): Allow LTU in the loop condition.rth2003-07-301-2/+4
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69971 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c: Fix comment formatting.kazu2003-07-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69689 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (if_then_else_cond): Simplify the comparison ofkazu2003-07-221-3/+1
| | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69658 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-32/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69587 138bc75d-0d04-0410-961f-82ee72b054a4
* PR target/11087jakub2003-07-181-3/+30
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69552 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_ext_dependent_givs): Pass const struct loop *uweigand2003-07-171-8/+38
| | | | | | | | | | 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69489 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/9745wilson2003-07-111-9/+12
| | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69220 138bc75d-0d04-0410-961f-82ee72b054a4
* * jump.c: Convert prototypes to ISO C90.aj2003-07-061-606/+321
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68998 138bc75d-0d04-0410-961f-82ee72b054a4
* * basic-block.h: Fix comment typos.kazu2003-07-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68770 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (count_one_set): Fix detection of registers set in morerakdver2003-06-291-1/+1
| | | | | | | than one basic block. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68680 138bc75d-0d04-0410-961f-82ee72b054a4
* cp:ghazi2003-06-161-3/+3
| | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68043 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_insn_for_givs): Remove DONT_REDUCE_ADDR macro.aj2003-06-011-4/+0
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67312 138bc75d-0d04-0410-961f-82ee72b054a4
* * flags.h (flag_wrapv): New flag controlling overflow semantics.sayle2003-05-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67270 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:ghazi2003-05-171-5/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66900 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (check_dbra_loop): Factor common test.nathan2003-05-141-4/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66803 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (last_call_insn, add_function_usage_to): New functions.kenner2003-05-031-0/+24
| | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66429 138bc75d-0d04-0410-961f-82ee72b054a4
* PR opt/8705danglin2003-04-251-1/+7
| | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@66060 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/10157ebotcazou2003-04-031-5/+9
| | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65210 138bc75d-0d04-0410-961f-82ee72b054a4
* * reload1.c (reload_as_needed): Allow a USE in asm reloads.amodra2003-03-281-0/+4
| | | | | | | * loop.c: (find_mem_in_note_1, find_mem_in_note): Comment. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64991 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c: (find_mem_in_note_1, find_mem_in_note): New functions.amodra2003-03-281-3/+49
| | | | | | | | | (replace_loop_mems): Add "written" param. Remove invalid REG_EQUAL notes after hoisting. (load_mems): Adjust replace_loop_mems call. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64950 138bc75d-0d04-0410-961f-82ee72b054a4
* PR opt/10087mmitchel2003-03-271-0/+15
| | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64928 138bc75d-0d04-0410-961f-82ee72b054a4
* * rtl.h (subrtx_p): Renamed to rtx_referenced_p.zlomek2003-03-151-1/+2
| | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64419 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgcleanup.c (outgoing_edges_match): Compare the jump tables.zlomek2003-03-101-45/+0
| | | | | | | | | | | | | | | | | | | (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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64096 138bc75d-0d04-0410-961f-82ee72b054a4
* * calls.c: Fix comment formatting.kazu2003-03-081-4/+4
| | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63966 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-02-28 Dale Johannesen <dalej@apple.com>dalej2003-02-281-50/+110
| | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63572 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (count_reg_usage): Fix handling of REG_EQUAL notes.rakdver2003-02-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63462 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (combine_simplify_rtx, simplfy_comparison): Use CC0_P.sayle2003-02-261-4/+2
| | | | | | | | | | | * cse.c (invalidate_skipped_set): Likewise. * integrate.c (subst_constants): Likewise. * jump.c (reversed_comparison_code_parts): Likewise. * loop.c (canonicalize_condition): Likewise. * simplify-rtx.c (simplify_relational_operation): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@63446 138bc75d-0d04-0410-961f-82ee72b054a4
* * loop.c (emit_prefetch_instructions): Do conversion at right place inhubicka2003-01-311-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | RTL chain. * combine.c (simplify_set): Reverse order of ragumetns to REG_CANNOT_CHANGE_MODE_P * df.c (df_def_record_1): Likewise. * recog.c (register_operand): Likewise. * simplify-rtx.c (simplify_subreg): Likewise. * hard-reg-set.h (REG_CANNOT_CHANGE_MODE_P): Update use of CANNOT_CHANGE_MODE_CLASS. * regclass.c (cannot_change_mode_set_regs, invalid_mode_change_p): Likewise. * reload.c (push_reload): Likewise. * alpha.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * ia64.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * mips.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * mips-protos.h (mips_cannot_change_mode_class): Update prototype. * mips.c (mips_cannot_change_mode_class): Update. * pa64-regs.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * rs6000.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * s390.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * sh.h (CANNOT_CHANGE_MODE_CLASS): Update definition. * sh-protos.h (sh_cannot_change_mode_class): Update prototype. * sh.c (sh_cannot_change_mode_class): Update. * i386.h (CANNOT_CHANGE_MODE_CLASS): New. * tm.texi (CANNOT_CHANGE_MODE_CLASS): Update documentation. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62212 138bc75d-0d04-0410-961f-82ee72b054a4
* 2003-01-28 Dale Johannesen <dalej@apple.com>dalej2003-01-281-3/+5
| | | | | | | | | * emit-rtl.c (const_double_htab_hash): Use mode in the hash. * loop.c (scan_loop): Move movables on -Os rich-register targets. * config/rs6000/rs6000.md (sibcall*): Use match_operand for LR. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62004 138bc75d-0d04-0410-961f-82ee72b054a4
* * target.h (targetm.address_cost): New.rth2003-01-281-15/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * target-def.h (TARGET_ADDRESS_COST): New. (TARGET_RTX_COSTS): Uncomment. Oops. * cse.c (address_cost): Use new target hook. (default_address_cost): New. * output.h (default_address_cost): Declare. * hooks.c (hook_int_rtx_0): New. * hooks.h (hook_int_rtx_0): Declare. * loop.c (combine_givs_p): Remove if 0 code. * system.h (ADDRESS_COST): Poison. * config/alpha/alpha.c, config/alpha/alpha.h, config/d30v/d30v.c, config/d30v/d30v.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mmix/mmix.c, config/mmix/mmix.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/sparc/sparc.c, config/sparc/sparc.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (TARGET_ADDRESS_COST): Define as hook_int_rtx_0. (ADDRESS_COST): Remove. * config/arc/arc-protos.h, config/arc/arc.c, config/arc/arc.h, config/avr/avr-protos.h, config/avr/avr.c, config/avr/avr.h, config/c4x/c4x-protos.h, config/c4x/c4x.c, config/c4x/c4x.h, config/dsp16xx/dsp16xx-protos.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/i386/i386-protos.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960-protos.h, config/i960/i960.c, config/i960/i960.h, config/ip2k/ip2k-protos.h, config/ip2k/ip2k.c, config/ip2k/ip2k.h, config/mips/mips-protos.h, config/mips/mips.c, config/mips/mips.h, config/m68hc11/m68hc11-protos.h, config/m68hc11/m68hc11.c, config/m68hc11/m68hc11.h, config/ns32k/ns32k-protos.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa-protos.h, config/pa/pa.c, config/pa/pa.h, config/s390/s390-protos.h, config/s390/s390.c, config/s390/s390.h, config/vax/vax-protos.h, config/vax/vax.c, config/vax/vax.h (foo_address_cost): Make static. (TARGET_ADDRESS_COST): New. (ADDRESS_COST): Remove. * config/arm/arm.h, config/arm/arm.c, config/m88k/m88k.h, config/m88k/m88k.c, config/romp/romp.h, config/romp/romp.c, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h (ADDRESS_COST): Move code ... (foo_address_cost): ... here. (TARGET_ADDRESS_COST): New. * config/m32r/m32r.c (m32r_address_cost): Remove. * config/m32r/m32r-protos.h: Update. * config/mmix/mmix.c (mmix_address_cost): Remove. * config/mmix/mmix-protos.h: Update. * config/mn10300/mn10300.c (mn10300_address_cost_1): Rename from mn10300_address_cost; move unsig allocation ... (mn10300_address_cost): ... here. (TARGET_ADDRESS_COST): New. * config/mn10300/mn10300-protos.h: Update. * config/mn10300/mn10300.h (ADDRESS_COST): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61988 138bc75d-0d04-0410-961f-82ee72b054a4