summaryrefslogtreecommitdiff
path: root/gcc/cse.c
Commit message (Collapse)AuthorAgeFilesLines
* * alias.c: Invlude varray.hhubicka2004-01-121-1/+6
| | | | | | | | | | | | | (alias_sets): Turn into varray. (get_alias_set_entry): Use VARRAY; mark inline. (mems_in_disjoint_alias_sets_p): Mark inline. (record_alias_subset): Use varray. (init_alias_once): Initialize varray. (new_alias_set): Grow array. * varray.c: Make VARRAY_GENERIC_PTR non GTYized. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@75711 138bc75d-0d04-0410-961f-82ee72b054a4
* PR target/11229amodra2003-12-031-0/+10
| | | | | | | | * cse.c (cse_insn): Set classp using src_const_elt if src_eqv_elt is NULL. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74225 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_set_around_loop): When changing a constant loadamylaar2003-11-271-0/+4
| | | | | | | to a register -register copy, add a REG_EQUAL note. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@74007 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_insn) [src_folded]: Check that the tentative replacementebotcazou2003-10-181-1/+5
| | | | | | | was successfully forced to memory before using the result. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72635 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (constant_pool_entries_regcost): New global variable tosayle2003-10-111-1/+7
| | | | | | | | | | | | | | | | | | | hold the register cost component of constant_pool_entries_cost. (fold_rtx): Calculate constant_pool_entries_regcost at the same time as constant_pool_entries_cost. (cse_insn): Set both src_folded_cost and src_folded_regcost from constant_pool_entries_cost and constant_pool_entries_regcost. (cse_main): Initialize constant_pool_entries_regcost to zero. * optabs.c (expand_unop): Attach a REG_EQUAL note describing the semantics of the sequence of bit operations used to negate a floating-point value. (expand_abs_nojump): Likewise attach a REG_EQUAL note describing the semantics of the bit operations used to abs a floating point value. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72326 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/12142danglin2003-10-081-33/+22
| | | | | | | | | | | | * cse.c (count_reg_usage): In a SET with a REG SET_DEST, count the uses of the register in the SET_SRC. Remove unnecessary argument. * pa.c (legitimize_pic_address): Before reload, use a scratch register for the intermediate result in loading the address of a SYMBOL_REF. Set the MEM_NOTRAP_P flag for the MEM. Add a REG_EQUAL to the insn which loads the SYMBOL_REF address. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72234 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/12215ebotcazou2003-10-061-1/+9
| | | | | | | | * cse.c (cse_set_around_loop): Emit the move at the beginning of the next basic block for trapping sets. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@72141 138bc75d-0d04-0410-961f-82ee72b054a4
* PR inline-asm/11676rth2003-07-261-0/+10
| | | | | | | * cse.c (count_reg_usage): Handle asm_operands properly. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69816 138bc75d-0d04-0410-961f-82ee72b054a4
* * alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.cghazi2003-07-191-12/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* * cse.c (fold_rtx): Use swap_commutative_operands_p to determinesayle2003-07-181-4/+5
| | | | | | | whether to reorder the operands of a commutative binary operator. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@69534 138bc75d-0d04-0410-961f-82ee72b054a4
* * combine.c (distribute_notes): Don't bother REG_WAS_0.kazu2003-07-011-49/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | * cse.c (cse_insn): Likewise. * final.c (final_scan_insn): Likewise. * jump.c (duplicate_loop_exit_test): Likewise. * rtl.c (reg_note_name): Remove REG_WAS_0. * rtl.h (REG_WAS_0): Remove. * unroll.c (final_reg_note_copy): Don't bother REG_WAS_0. * config/avr/avr.c (output_movqi): Don't use reg_was_0. (output_movhi): Likewise. (output_movsisf): Likewise. (reg_was_0): Remove. * config/m68hc11/m68hc11.c (m68hc11_gen_movhi): Don't use REG_WAS_0. (m68hc11_gen_movqi): Likewise. * config/vax/vax-protos.h: Remove the prototype for reg_was_0_p. * config/vax/vax.c (follows_p): Remove. (reg_was_0_p): Likewise. * config/vax/vax.md (movsi): Don't use reg_was_0_p. (movhi): Likewise. (movqi): Likewise. * doc/rtl.texi (REG_WAS_0): Remove. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68753 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c: Convert prototypes to ISO C90.aj2003-06-291-255/+139
| | | | | | | | | | | | | | | | | | | * cselib.c: Likewise. * cselib.h: Likewise. * dbxout.c: Likewise. * debug.c: Likewise. * df.c: Likewise. * df.h: Likewise. * dojump.c: Likewise. * doloop.c: Likewise. * dominance.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2out.c: Likewise. * dwarf2out.h: Likewise. * dwarfout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68673 138bc75d-0d04-0410-961f-82ee72b054a4
* * alloc-pool.c: Fix comment formatting.kazu2003-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * bitmap.c: Likewise. * bitmap.h: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * caller-save.c: Likewise. * cfganal.c: Likewise. * cfgrtl.c: Likewise. * collect2.c: Likewise. * cse.c: Likewise. * df.c: Likewise. * diagnostic.c: Likewise. * dwarf2out.c: Likewise. * dwarfout.c: Likewise. * expmed.c: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * gcc.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * libgcov.c: Likewise. * mips-tfile.c: Likewise. * optabs.c: Likewise. * prefix.c: Likewise. * rtlanal.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * toplev.c: Likewise. * varasm.c: Likewise. * vmsdbgout.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68672 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (fold_rtx): Replace the equality comparison of INTVALskazu2003-06-271-1/+1
| | | | | | | with a pointer equality comparison. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@68600 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (find_best_addr): Consider binary operators even if secondrth2003-06-041-4/+3
| | | | | | | argument is not CONST_INT. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67463 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cse.o): Add params.h dependency.rakdver2003-06-041-6/+10
| | | | | | | | | | | | * cse.c: Include params.h. (PATHLENGTH): Removed. (struct cse_basic_block_data): Make path array dynamic. (cse_end_of_basic_block): Use PARAM_MAX_CSE_PATH_LENGTH instead of PATHLENGTH. (cse_main, cse_basic_block): Allocate path array. * params.def (PARAM_MAX_CSE_PATH_LENGTH): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67433 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_insn): Simplify REG_EQUAL note on libcalls whensayle2003-05-301-14/+30
| | | | | | | | | | | | | | making a substitution. (dead_libcall_p): If directly replacing a libcall with a constant value produces an invalid instruction, also try forcing the constant into the constant pool. * expr.c (emit_move_insn): Add a REG_EQUAL note when it is not obvious that the source is a constant. (compress_float_constant): Use set_unique_reg_note to place REG_EQUAL notes on instructions. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67247 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (count_reg_usage): When processing an INSNs REG_EQUALamylaar2003-05-231-1/+15
| | | | | | | note containing an EXPR_LIST, process all the arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@67132 138bc75d-0d04-0410-961f-82ee72b054a4
* * emit-rtl.c (last_call_insn, add_function_usage_to): New functions.kenner2003-05-031-0/+11
| | | | | | | | | | | | | | | | | | | | | * 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
* 2003-04-09 Dan Nicolaescu <dann@ics.uci.edu>zack2003-04-101-5/+11
| | | | | | | | | | | | Zack Weinberg <zack@codesourcery.com> * regrename.c (struct du_chain): Use a bitfield for reg_class. * cse.c (struct qty_table_elem, struct table_elt, struct set): Use bitfields for fields holding enum rtx_code or enum machine_mode values. Add comments explaining size choices. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65419 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (fold_rtx): Fix 03-30 change; do check insn non-null.rth2003-04-041-1/+1
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65249 138bc75d-0d04-0410-961f-82ee72b054a4
* * cfgbuild.c (make_edges): Use tablejump_p.rth2003-03-301-11/+5
| | | | | | | | | | | | | | | * cfgcleanup.c (label_is_jump_target_p): Likewise. * cfglayout.c (cfg_layout_can_duplicate_bb_p): Likewise. * cfgrtl.c (flow_delete_block_noexpunge): Likewise. (try_redirect_by_replacing_jump): Likewise. (redirect_edge_and_branch): Likewise. * cse.c (fold_rtx): Likewise. * jump.c (delete_related_insns): Likewise. * rtlanal.c (get_jump_table_offset): Likewise. * ssa-ccp.c (ssa_ccp_df_delete_unreachable_insns): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@65054 138bc75d-0d04-0410-961f-82ee72b054a4
* * cselib.c (clear_table): Do not take argument; always clear justhubicka2003-03-141-8/+1
| | | | | | | | | | | | | | | used slots. (cselib_process_insn): Update call of clear_table (cselib_init): Do not call clear_table. (cselib_finish): Clear table. * cse.c (count_reg_usage): Do not check side_effects_p. * rtlanal.c (set_noop_p): Check side_effects_p only when set looks like noop. (find_reg_equal_equiv_note): Do not use find_reg_note. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@64369 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (count_reg_usage): Fix handling of REG_EQUAL notes.rakdver2003-02-261-7/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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-3/+1
| | | | | | | | | | | * 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
* * cse.c (find_best_addr): Kill !ADDRESS_COST code.rth2003-01-281-26/+6
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@62008 138bc75d-0d04-0410-961f-82ee72b054a4
* * target.h (targetm.address_cost): New.rth2003-01-281-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 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
* * cse.c (cse_insn): Avoid redundant REG_EQUAL notes.sayle2003-01-281-5/+9
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61971 138bc75d-0d04-0410-961f-82ee72b054a4
* * Makefile.in (cse.o): Depend on TARGET_H.rth2003-01-281-11/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * cse.c (rtx_cost): Use targetm.rtx_costs. * system.h (CONST_COSTS RTX_COSTS DEFAULT_RTX_COSTS): Poison. * doc/tm.texi: Update. * target.h (targetm.rtx_costs): New. * target-def.h (TARGET_RTX_COSTS): New. * hooks.c (hook_bool_rtx_int_int_intp_false): New. * hooks.h: Update. * config/alpha/alpha.c (alpha_rtx_cost_data): New. (alpha_rtx_costs, TARGET_RTX_COSTS): New. * config/alpha/alpha.h (PROCESSOR_MAX): New. (CONST_COSTS, RTX_COSTS): Remove. * config/arc/arc.c, config/arc/arc.h, config/c4x/c4x.c, config/c4x/c4x.h, config/cris/cris.c, config/cris/cris.h, config/d30v/d30v.c, config/d30v/d30v.h, config/dsp16xx/dsp16xx.c, config/dsp16xx/dsp16xx.h, config/frv/frv.c, config/frv/frv.h, config/h8300/h8300.c, config/h8300/h8300.h, config/i370/i370.c, config/i370/i370.h, config/i386/i386.c, config/i386/i386.h, config/i960/i960.c, config/i960/i960.h, config/ia64/ia64.c, config/ia64/ia64.h, config/m32r/m32r.c, config/m32r/m32r.h, config/m68k/m68k.c, config/m68k/m68k.h, config/m88k/m88k.c, config/m88k/m88k.h, config/mcore/mcore.c, config/mcore/mcore.h, config/mips/mips.c, config/mips/mips.h, config/mn10200/mn10200.c, config/mn10200/mn10200.h, config/mn10300/mn10300.c, config/mn10300/mn10300.h, config/ns32k/ns32k.c, config/ns32k/ns32k.h, config/pa/pa.c, config/pa/pa.h, config/pdp11/pdp11.c, config/pdp11/pdp11.h, config/romp/romp.c, config/romp/romp.h, config/rs6000/rs6000.c, config/rs6000/rs6000.h, config/s390/s390.c, config/s390/s390.h, config/sh/sh.c, config/sh/sh.h, config/stormy16/stormy16.c, config/stormy16/stormy16.h, config/v850/v850.c, config/v850/v850.h, config/xtensa/xtensa.c, config/xtensa/xtensa.h (CONST_COSTS, RTX_COSTS): Move code ... (foo_rtx_costs, TARGET_RTX_COSTS): ... here. * config/arm/arm.c (arm_rtx_costs_1): Rename from arm_rtx_costs. (arm_rtx_costs, TARGET_RTX_COSTS): New. * config/arm/arm-protos.h: Update. * config/arm/arm.h (DEFAULT_RTX_COSTS): Remove. * config/avr/avr.h (CONST_COSTS): Move code ... * config/avr/avr.c (avr_rtx_costs): ... here. (default_rtx_costs): Make static. * config/avr/avr-protos.h: Update. * config/h8300/h8300.c (const_costs): Make static. (h8300_and_costs, h8300_shift_costs): Likewise. * config/h8300/h8300-protos.h: Update. * config/ip2k/ip2k.h (DEFAULT_RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/ip2k/ip2k.c (ip2k_rtx_costs): ... here. Rename from default_rtx_costs; update for signature change. * config/ip2k/ip2k-protos.h: Update. * config/m68hc11/m68hc11.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/m68hc11/m68hc11.c (m68hc11_rtx_costs): ... here. (TARGET_RTX_COSTS): New. (m68hc11_rtx_costs_1): Rename from m68hc11_rtx_costs; make static. * config/m68hc11/m68hc11-protos.h: Update. * config/m68k/m68k.c (const_int_cost): Make static. * config/m68k/m68k-protos.h: Update. * config/mcore/mcore.c (mcore_const_costs): Make static. (mcore_and_cost, mcore_ior_cost): Likewise. * config/mcore/mcore-protos.h: Update. * config/mmix/mmix.c (mmix_rtx_costs, TARGET_RTX_COSTS): New. (mmix_rtx_cost_recalculated): Remove. * config/mmix/mmix.h (DEFAULT_RTX_COSTS): Remove. * config/mmix/mmix-protos.h: Update. * config/sh/sh.c (shiftcosts): Make static. (addsubcosts, andcosts, multcosts): Likewise. * config/sh/sh-protos.h: Update. * config/sparc/sparc.c (TARGET_RTX_COSTS): New. (sparc_rtx_costs): Make static; update for change in signature. * config/sparc/sparc.h (RTX_COSTS_CASES, RTX_COSTS): Remove. * config/sparc/sparc-protos.h: Update. * config/v850/v850.c (const_costs): Make static. * config/v850/v850-protos.h: Update. * config/vax/vax.h (RTX_COSTS): Remove. (CONST_COSTS): Move code ... * config/vax/vax.c (vax_rtx_costs_1): ... here; rename from vax_rtx_cost. (vax_rtx_costs, TARGET_RTX_COSTS): New. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61954 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (fold_rtx): Instantiate CONSTANT_P_RTX to 0 when notsayle2003-01-251-1/+1
| | | | | | | | | optimizing, even if flag_gcse is true. * toplev.c (rest_of_compilation): purge_builtin_constant_p only needs to be called when "optimize > 0 && flag_gcse". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61785 138bc75d-0d04-0410-961f-82ee72b054a4
* * i386.c (ix86_expand_movstr, ix86_expand_clrstr): Consistentlyhubicka2003-01-251-0/+3
| | | | | | | | | | | | | do libcall for large blocks. * i386.md (comi patterns): Set type to ssecomi. (sse2_unpck?pd): Fix mode of vec_select. * cse.c: Include except.h (cse_set_around_loop): Do not create new basic blocks. * Makefile.in (cse.o): Add dependnecy on except.h git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61772 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/8423sayle2003-01-231-3/+8
| | | | | | | | | | | | | | | | | | | | * cse.c (fold_rtx): Only eliminate a CONSTANT_P_RTX to 1 when its argument is constant, or 0 if !flag_gcse. * simplify-rtx.c (simplify_rtx): Convert CONSTANT_P_RTX to 1 if it's argument is constant. * gcse.c (want_to_gcse_p): Ignore CONSTANT_P_RTX nodes. (hash_scan_set): Don't record CONSTANT_P_RTX expressions. (do_local_cprop): Don't propagate CONSTANT_P_RTX constants. * builtins.c (purge_builtin_constant_p): New function to force instantiation of any remaining CONSTANT_P_RTX nodes. * rtl.h (purge_builtin_constant_p): Prototype here. * toplev.c (rest_of_compilation): Invoke purge_builtin_constant_p pass after GCSE and before loop. (flag_gcse): No longer static. * flags.h (flag_gcse): Prototype here. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61642 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_insn): Avoid RTL sharing when updating the RETVALsayle2003-01-211-4/+4
| | | | | | | insn's notes following a substitution inside a libcall. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61524 138bc75d-0d04-0410-961f-82ee72b054a4
* Merge basic-improvements-branch to trunkzack2002-12-161-75/+53
| | | | git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60174 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-12-10 Andrew Haley <aph@redhat.com>aph2002-12-101-2/+10
| | | | | | | * cse.c (cse_insn): Don't cse past a basic block boundary. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@60000 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog.1: Fix typos.kazu2002-10-281-1/+1
| | | | | | | | * cse.c: Fix a comment typo. * reload1.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58596 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (mention_regs): Set SUBREG_TICKED to the register number,geoffk2002-10-121-3/+3
| | | | | | | | not the address of the REG. (struct cse_reg_info): Make subreg_ticked unsigned. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58075 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-10-10 Stuart Hastings <stuart@apple.com>geoffk2002-10-101-7/+30
| | | | | | | | | | | | | * cse.c (struct cse_reg_info): Add subreg_ticked. (SUBREG_TICKED): New. (get_cse_reg_info): Initialize SUBREG_TICKED. (mention_regs): Use it. (invalidate): Set SUBREG_TICKED. (invalidate_for_call): Likewise. (addr_affects_sp_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58035 138bc75d-0d04-0410-961f-82ee72b054a4
* Fix miscompilation of testcase 20021010-1.c for v850 target with -O -mv850e.wilson2002-10-101-5/+11
| | | | | | | | * cse.c (fold_rtx): Don't perform associative optimization for DIV and UDIV. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@58026 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (insn_live_p): Pass insn pattern, not full insnuweigand2002-10-091-1/+1
| | | | | | | to may_trap_p. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57982 138bc75d-0d04-0410-961f-82ee72b054a4
* 2002-09-30 Andrew Haley <aph@redhat.com>aph2002-10-011-1/+3
| | | | | | | | | * flow.c (insn_dead_p): When using non-call-exceptions, don't eliminate insns that may trap. * cse.c (insn_live_p): Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57688 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2002-09-221-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.0: Likewise. * ChangeLog.1: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * FSFChangeLog.10: Likewise. * FSFChangeLog.11: Likewise. * alias.c: Likewise. * basic-block.h: Likewise. * c-aux-info.c: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-semantics.c: Likewise. * c-typeck.c: Likewise. * calls.c: Likewise. * cfganal.c: Likewise. * cfgloop.c: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * conflict.c: Likewise. * cppexp.c: Likewise. * cppfiles.c: Likewise. * cpphash.h: Likewise. * cppinit.c: Likewise. * cpplex.c: Likewise. * cpplib.c: Likewise. * cpplib.h: Likewise. * cppmacro.c: Likewise. * cse.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57398 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (fold_rtx): Calculate the old cost before we fold eachrearnsha2002-09-211-1/+1
| | | | | | | operand. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57394 138bc75d-0d04-0410-961f-82ee72b054a4
* * real.c (real_hash): New.rth2002-09-201-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | * real.h: Declare it. * cse.c (canon_hash): Use it. * cselib.c (hash_rtx): Likewise. * emit-rtl.c (const_double_htab_hash): Likewise. * rtl.h (CONST_DOUBLE_REAL_VALUE): New. * varasm.c (struct rtx_const): Reduce vector size; separate integer and fp vectors. (HASHBITS): Remove. (const_hash_1): Rename from const_hash. Use real_hash. Do not take modulus MAX_HASH_TABLE. (const_hash): New. Do take modulus MAX_HASH_TABLE. (output_constant_def): Do not take modulus MAX_HASH_TABLE. (SYMHASH): Don't use HASHBITS. (decode_rtx_const): Copy only active bits from REAL_VALUE_TYPE. Fix CONST_VECTOR thinko wrt fp vectors. Fix kind comparison. (simplify_subtraction): Fix kind comparison. (const_hash_rtx): Return unsigned int. Don't use HASHBITS. Use a union to pun integer array. * config/rs6000/rs6000.c (rs6000_hash_constant): Use real_hash; only hash two words of integral CONST_DOUBLE. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57356 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc/rth2002-09-161-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * real.c, real.h: Rewrite from scratch. * Makefile.in (simplify-rtx.o): Depend on TREE_H. (paranoia): New target. * builtins.c (fold_builtin_inf): Use new real.h interface. * c-common.c (builtin_define_with_hex_fp_value): Likewise. * c-lex.c (interpret_float): Likewise. * emit-rtl.c (gen_lowpart_common): Likewise. * optabs.c (expand_float): Use real_2expN. * config/ia64/ia64.md (divsi3, udivsi3): Likewise. * defaults.h (INTEL_EXTENDED_IEEE_FORMAT): New. (FLOAT_WORDS_BIG_ENDIAN): New. * cse.c (find_comparison_args): Don't pass FLOAT_STORE_FLAG_VALUE directly to REAL_VALUE_NEGATIVE. * loop.c (canonicalize_condition): Likewise. * simplify-rtx.c: Include tree.h. (simplify_unary_operation): Don't handle FIX and UNSIGNED_FIX with floating-point result modes. * toplev.c (backend_init): Call init_real_once. * fold-const.c (force_fit_type): Don't call CHECK_FLOAT_VALUE. * tree.c (build_real): Likewise. * config/alpha/alpha.c, config/vax/vax.c (float_strings, float_values, inited_float_values, check_float_value): Remove. * config/alpha/alpha.h, config/m68hc11/m68hc11.h, config/m88k/m88k.h, config/vax/vax.h (CHECK_FLOAT_VALUE): Remove. * doc/tm.texi (CHECK_FLOAT_VALUE): Remove. gcc/f/ * target.c (ffetarget_real1): Don't pass FFETARGET_ATOF_ directly to ffetarget_make_real1. (ffetarget_real2): Similarly. * target.h (ffetarget_cvt_r1_to_rv_, ffetarget_cvt_rv_to_r2_, ffetarget_cvt_r2_to_rv_): Use new real.h interface and simplify. gcc/java/ * jcf-parse.c (get_constant): Runtime check for IEEE format; use new real.h interface. * jcf-write.c (find_constant_index): Use new real.h interface. * lex.c (IS_ZERO): Use REAL_VALUES_EQUAL. contrib/ * paranoia.cc: New file. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57198 138bc75d-0d04-0410-961f-82ee72b054a4
* * ChangeLog: Follow spelling conventions.kazu2002-09-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * ChangeLog.0: Likewise. * ChangeLog.2: Likewise. * ChangeLog.3: Likewise. * ChangeLog.4: Likewise. * ChangeLog.5: Likewise. * ChangeLog.6: Likewise. * cppfiles.c: Likewise. * cppinit.c: Likewise. * cpplib.h: Likewise. * cse.c: Likewise. * debug.h: Likewise. * df.c: Likewise. * dominance.c: Likewise. * hashtable.c: Likewise. * hashtable.h: Likewise. * loop.c: Likewise. * config/arm/README-interworking: Likewise. * config/arm/arm.c: Likewise. * config/arm/arm.h: Likewise. * config/arm/arm.md: Likewise. * config/dsp16xx/dsp16xx.h: Likewise. * config/frv/frv.c: Likewise. * config/frv/frv.h: Likewise. * config/ip2k/ip2k.h: Likewise. * config/rs6000/rs6000.c: Likewise. * config/stormy16/stormy-abi: Likewise. * config/stormy16/stormy16.h: Likewise. * config/v850/v850.c: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57146 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_insn): Avoid subreg games if the equivalencerth2002-09-041-8/+17
| | | | | | | is already in the proper mode. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@56819 138bc75d-0d04-0410-961f-82ee72b054a4
* * cse.c (cse_insn): Supply proper SUBREG_BYTE to simplify_gen_subreg.amylaar2002-07-101-2/+17
| | | | | | | | Get mode from dest. If simplify_gen_subreg fails, try next equivalent. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55368 138bc75d-0d04-0410-961f-82ee72b054a4
* gcc:amylaar2002-07-041-3/+2
| | | | | | | | | | | | | | | * simplify-rtx.c (simplify_subreg): Reduce problem of finding vector mode subregs of constants to finding integer mode subregs of constants. * cse.c (cse_insn): Use simplify_gen_subreg. * convert.c (convert_to_integer): Don't strip a NOP_EXPR From a vector mode expression of different size than the target mode. gcc/testsuite: * gcc.c-torture/compile/simd-3.c: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55234 138bc75d-0d04-0410-961f-82ee72b054a4
* PR optimization/6759jakub2002-06-101-2/+4
| | | | | | | | | | * cse.c (cse_insn): Fold src_eqv just once, store it folded back into the REQ_EQUAL note. * g++.dg/opt/cse1.C: New test. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@54469 138bc75d-0d04-0410-961f-82ee72b054a4