Commit Graph

408 Commits

Author SHA1 Message Date
Franz Sirl
bbd288a44d re PR rtl-optimization/11440 (gcc-3.3.1 miscompiles c++ code with -O2, -fno-gcse cures it)
2003-07-14  Franz Sirl  <Franz.Sirl-kernel@lauterbach.com>

	PR optimization/11440
	* gcse.c (try_replace_reg): Don't attach notes to ZERO_EXTRACT or
	SIGN_EXTRACT SETs.

From-SVN: r69325
2003-07-14 09:29:44 +00:00
Zdenek Dvorak
3b14e3af06 gcse.c (load_kills_store, [...]): Keep track of the correct dependency function to use.
* gcse.c (load_kills_store, find_loads, store_killed_in_insn,
	store_killed_after, store_killed_before): Keep track of the correct
	dependency function to use.

From-SVN: r69198
2003-07-10 19:48:43 +00:00
Andreas Jaeger
1d088deebe gcc.c: Convert prototypes to ISO C90.
* gcc.c: Convert prototypes to ISO C90.
	* gcc.h: Likewise.
	* gcov-dump.c: Likewise.
	* gcov-iov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.h: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* graph.c: Likewise.
	* graph.h: Likewise.
	* hosthooks.h: Likewise.
	* hooks.h: Likewise.
	* hooks.c: Likewise.
	* hashtable.h: Likewise.
	* hashtable.c: Likewise.
	* haifa-sched.c: Likewise.
	* integrate.h: Likewise.
	* integrate.c: Likewise.
	* input.h: Likewise.
	* ifcvt.c: Likewise.

From-SVN: r68995
2003-07-06 08:15:36 +02:00
Kazu Hirata
4d6922ee32 bt-load.c: Fix comment typos.
* bt-load.c: Fix comment typos.
	* c-incpath.c: Likewise.
	* cfg.c: Likewise.
	* cfgcleanup.c: Likewise.
	* cfgloop.h: Likewise.
	* cfgloopmanip.c: Likewise.
	* cfgrtl.c: Likewise.
	* diagnostic.h: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* et-forest.c: Likewise.
	* et-forest.h: Likewise.
	* expr.c: Likewise.
	* gcse.c: Likewise.
	* genattr.c: Likewise.
	* jump.c: Likewise.
	* langhooks.h: Likewise.
	* local-alloc.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* ra-build.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* rtl.def: Likewise.
	* rtlanal.c: Likewise.
	* sched-ebb.c: Likewise.
	* sched-rgn.c: Likewise.
	* simplify-rtx.c: Likewise.
	* ssa.c: Likewise.
	* tracer.c: Likewise.
	* tree.c: Likewise.

From-SVN: r68975
2003-07-05 15:17:36 +00:00
Matt Kraai
0e8a66de6d gcse.c: Fix misspelling.
* gcse.c: Fix misspelling.
	* line-map.c: Likewise.
	* config/dsp16xx/dsp16xx.h: Likewise.

From-SVN: r68865
2003-07-03 05:26:31 +00:00
Kazu Hirata
e0bb17a83f basic-block.h: Fix comment typos.
* 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-07-01 12:18:01 +00:00
Kazu Hirata
735e8085f7 gcse.c (compute_ld_motion_mems): Use INSN_P instead of its definition.
* gcse.c (compute_ld_motion_mems): Use INSN_P instead of its
	definition.
	(store_killed_in_insn): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* config/frv/frv.c (frv_final_prescan_insn): Likewise.
	* config/m68hc11/m68hc11.c (dead_register_here): Likewise.
	(m68hc11_reassign_regs): Likewise.
	(m68hc11_reorg): Likewise.

From-SVN: r68640
2003-06-28 14:56:24 +00:00
Kazu Hirata
ebd7a7af83 gcse.c (expr_equiv_p): Replace expressions that are known to be 0 with 0.
* gcse.c (expr_equiv_p): Replace expressions that are known to
	be 0 with 0.

From-SVN: r68601
2003-06-27 19:38:27 +00:00
Zdenek Dvorak
bc083e1828 * gcse.c (store_killed_in_insn): Fix.
From-SVN: r68230
2003-06-19 22:26:53 +00:00
Kazu Hirata
2fa4a84980 gcse.c (fis_get_condition): Make it a global function.
* gcse.c (fis_get_condition): Make it a global function.
	* reload1.c (reload_cse_move2add): Detect implicit sets.
	* rtl.h: Add a prototype for fis_get_condition.

From-SVN: r67814
2003-06-12 04:15:56 +00:00
Roger Sayle
bc6688b40e gcse.c (cprop_jump): Make use of REG_EQUAL notes on both setcc and jump, if they exist.
* gcse.c (cprop_jump):  Make use of REG_EQUAL notes on both
	setcc and jump, if they exist.  If substituted instruction
	fails to validate, store current effort in a REG_EQUAL note.
	(cprop_insn): Don't attempt further substitutions if the
	current instruction has been deleted.
	(local_cprop_pass): Likewise.

	* jump.c (redirect_jump):  Also update REG_EQUAL note, if
	one is attached to the jump instruction.
	(invert_jump): Delete REG_EQUAL note on jump, if one exists.

Co-Authored-By: Joern Rennecke <joern.rennecke@superh.com>
Co-Authored-By: Kazu Hirata <kazu@cs.umass.edu>

From-SVN: r67054
2003-05-21 01:16:33 +00:00
John David Anglin
9feff11466 re PR rtl-optimization/8705 ([HP-PA] ICE in emit_move_insn_1, at expr.c:3101)
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-25 00:58:28 +00:00
Hans-Peter Nilsson
4d3eb89ac4 gcse.c (compute_ld_motion_mems): For MEM destinations...
* gcse.c (compute_ld_motion_mems): For MEM destinations, only
	consider those to be movable where the source matches
	want_to_gcse_p.
	(update_ld_motion_stores): In comment, refer to
	compute_ld_motion_mems for validity of replacement.

From-SVN: r65766
2003-04-18 01:29:19 +00:00
J"orn Rennecke
9a318d3046 * gcse.c (replace_store_insn): Use single_set.
From-SVN: r65339
2003-04-07 21:00:08 +01:00
Zdenek Dvorak
94f24ddce6 alias.c (find_base_term): Export.
* alias.c (find_base_term): Export.
	* rtl.h (find_base_term): Declare.
	* gcse.c (find_moveable_store): Test for flag_non_call_exceptions
	instead of flag_exceptions.  Move test for parameter passing ...
	(store_killed_in_insn): ... here.

From-SVN: r65272
2003-04-05 15:57:40 +00:00
Eric Botcazou
773eae3968 re PR rtl-optimization/10157 ([Sparc] internal compiler error: in 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-04-03 19:20:06 +00:00
Roger Sayle
e129b3f951 re PR fortran/9974 (Test g77.f-torture/noncompile/check0.f fails)
PR fortran/9974
	* gcse.c (reg_killed_on_egde): New function to test whether the
	given reg is overwritten by any instruction queued on an edge.
	(bypass_block): Ignore substitutions killed on incoming edges.
	Don't bypass outgoing edges that have queued instructions.

	* gcc.c-torture/execute/20030401-1.c: New test case.

From-SVN: r65148
2003-04-01 22:32:37 +00:00
Zdenek Dvorak
47a3dae13e gcse.c (struct ls_expr): Added pattern_regs field.
* gcse.c (struct ls_expr): Added pattern_regs field.
	(ldst_entry): Initialize it.
	(extract_mentioned_regs, extract_mentioned_regs_helper): New.
	(store_ops_ok): Use regs precomputed by them.
	(find_loads, store_killed_in_insn, load_kills_store): Change return
	type to bool.
	(store_killed_before, store_killed_after): Take position of register
	set in account.
	(reg_set_info): Store position of the setter.
	(gcse_main): Enable store motion.
	(mems_conflict_for_gcse_p): Enable load motion of non-symbol mems.
	(pre_insert_copy_insn, update_ld_motion_stores, insert_store): Prevent rtl
	sharing.
	(simple_mem): Enable store motion of non-symbol mems.
	(regvec): Type changed.
	(LAST_AVAIL_CHECK_FAILURE): New.
	(compute_store_table_current_insn): New.
	(build_store_vectors): Computation of availability and anticipatability
	moved ...
	(compute_store_table, find_moveable_store): ... here.
	(delete_store): Remove senseless comment.
	(store_motion): Reorganize.

From-SVN: r65141
2003-04-01 20:23:54 +00:00
Richard Sandiford
98d3d33620 gcse.c (simple_mem): Return false for floating-point accesses if flag_float_store is true.
* gcse.c (simple_mem): Return false for floating-point accesses
	if flag_float_store is true.

From-SVN: r65076
2003-03-31 06:28:56 +00:00
Roger Sayle
6b2d1c9e2b gcse.c (gcse_constant_p): New function to identify constants suitable for constant propagation...
* gcse.c (gcse_constant_p): New function to identify constants
	suitable for constant propagation, including COMPARE with two
	integer constant arguments.
	(hash_scan_set): Use gcse_constant_p.
	(find_avail_set): Likewise.
	(cprop_insn): Likewise.
	(do_local_cprop): Likewise.
	(find_implicit_sets): Likewise.
	(find_bypass_set): Likewise.

From-SVN: r65075
2003-03-31 05:25:52 +00:00
Zdenek Dvorak
72b8d451f1 gcse.c (bypass_block, [...]): Do not create irreducible loops.
* gcse.c (bypass_block, bypass_conditional_jumps): Do not create
	irreducible loops.

	* loop-unroll.c (unroll_loop_runtime_iterations): Update irreducible
	loops info correctly.

From-SVN: r63980
2003-03-08 09:47:28 +00:00
Kazu Hirata
9e48c409cd * gcse.c (cprop_jump): Revert the 2003-02-23 change.
From-SVN: r63420
2003-02-25 22:56:27 +00:00
Kazu Hirata
ef90638128 * gcse.c (cprop_jump): Use the REG_EQUAL note if available.
From-SVN: r63332
2003-02-23 20:52:44 +00:00
Richard Henderson
9a71ece17f gcse.c (bypass_block): Use BLOCK_FOR_INSN for resolving LABEL_REFs.
* gcse.c (bypass_block): Use BLOCK_FOR_INSN for resolving LABEL_REFs.
        (bypass_conditional_jumps): Accept computed_jump_p insns as well.

From-SVN: r62945
2003-02-15 13:37:22 -08:00
Richard Henderson
ceda50e9d5 gcse.c (lookup_set): Remove unused argument PAT.
* gcse.c (lookup_set): Remove unused argument PAT.  Update
        both callers.

From-SVN: r62759
2003-02-11 22:14:12 -08:00
Richard Henderson
710ee3ed76 gcse.c (local_cprop_find_used_regs): New.
* gcse.c (local_cprop_find_used_regs): New.
        (local_cprop_pass): Use it.

From-SVN: r62555
2003-02-07 14:57:41 -08:00
Roger Sayle
fbef91d8f6 gcse.c (implicit_sets): New.
* gcse.c (implicit_sets): New.
        (compute_hash_table_work): Include them in hash table.
        (find_implicit_sets, fis_get_condition): New.
        (one_cprop_pass): Allocate and free implicit_sets; call
        find_implicit_sets before building hash table.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r62533
2003-02-07 11:17:20 -08:00
Josef Zlomek
244d05fb87 * gcse.c (constprop_register): Check NEXT_INSN (insn) != NULL.
From-SVN: r61884
2003-01-27 11:30:35 +00:00
Roger Sayle
7821bfc741 gcse.c (bypass_last_basic_block): New global variable.
* gcse.c (bypass_last_basic_block): New global variable.
	(bypass_block):  Use redirect_edge_and_branch_force to redirect
	fall-through edges.  Use bypass_last_basic_block to determine
	which blocks have valid PRE information.
	(bypass_conditional_jumps): Initialize bypass_last_basic_block.

From-SVN: r61800
2003-01-25 21:49:52 +00:00
Jan Hubicka
5f0bea72c5 * gcse.c (local_cprop_pass): Update reg_sets table when needed.
From-SVN: r61799
2003-01-25 21:32:42 +00:00
Jan Hubicka
1649d92fb3 re PR rtl-optimization/8492 (GCC spins forever compiling loop)
PR opt/8492
	* gcse.c (one_cprop_pass): Delete unreachable blocks.

Co-Authored-By: Eric Botcazou <ebotcazou@libertysurf.fr>

From-SVN: r61798
2003-01-25 20:10:37 +00:00
Roger Sayle
34ee7f8278 re PR rtl-optimization/8423 (CSE1 not propagating __builtin_constant_p enough)
PR optimization/8423
	* 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.

From-SVN: r61642
2003-01-23 02:57:26 +00:00
Kazu Hirata
fbe5a4a607 et-forest.c: Fix comment typos.
* et-forest.c: Fix comment typos.
	* et-forest.h: Likewise.
	* except.c: Likewise.
	* expr.c: Likewise.
	* flags.h: Likewise.
	* flow.c: Likewise.
	* gcc.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* genautomata.c: Likewise.
	* gengtype.c: Likewise.
	* genrecog.c: Likewise.
	* global.c: Likewise.
	* gthr-rtems.h: Likewise.

From-SVN: r61443
2003-01-17 14:24:24 +00:00
Roger Sayle
a013431213 gcse.c (one_cprop_pass): Change function arguments to take both cprop_jumps and bypass_jumps flags...
* gcse.c (one_cprop_pass): Change function arguments to take both
	cprop_jumps and bypass_jumps flags instead of just alter_jumps.
	(gcse_main): Update calls to one_cprop_pass, disabling bypassing.
	(bypass_jumps): New function to perform separate jump bypassing pass.
	* rtl.h (bypass_jumps): Add function prototype.
	* timevar.def (TV_BYPASS): New timing variable.
	* toplev.c (enum dump_file_index): Add new entry DFI_bypass.
	(dump_file): New entry for the bypass RTL dump file.
	(rest_of_compilation): Insert new jump bypassing optimization
	pass after loop.
	* doc/passes.texi: Document new pass.

From-SVN: r61374
2003-01-16 01:06:33 +00:00
Jan Hubicka
9635cfadee cselib.c (cselib_current_insn_in_libcall): New static variable.
* cselib.c (cselib_current_insn_in_libcall): New static variable.
	(new_elt_loc_list, cselib_process_insn, cselib_init): Keep track on whether
	we are inside libcall.
	* cselib.h (elt_loc_list): Add in_libcall.
	* gcse.c (do_local_cprop): Do not copy propagate using insns
	in libcalls.

From-SVN: r61023
2003-01-07 22:14:43 +00:00
Zack Weinberg
4977bab6ed Merge basic-improvements-branch to trunk
From-SVN: r60174
2002-12-16 18:23:00 +00:00
Roger Sayle
a500466ba1 * gcse.c (gcse_emit_move_after): Correct typo in REG_EQUAL note.
From-SVN: r59271
2002-11-19 19:26:53 +00:00
Richard Henderson
f4e3e61878 re PR rtl-optimization/8165 (builtin string functions SEGV on alpha-pc-linux-gnu at -O2)
PR opt/8165
        * gcse.c (adjust_libcall_notes): Revert last change.
        * simplify-rtx.c (simplify_replace_rtx): Handle LO_SUM.

From-SVN: r58130
2002-10-14 11:16:07 -07:00
Richard Henderson
e197b6fcab re PR rtl-optimization/8165 (builtin string functions SEGV on alpha-pc-linux-gnu at -O2)
PR opt/8165
	* gcse.c (adjust_libcall_notes): Also adjust notes for INSN.
	* gcc.c-torture/execute/20021011-1.c: New.

From-SVN: r58071
2002-10-11 15:42:31 -07:00
Jan Hubicka
48ddd46c41 i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.
* i386.h (TARGET_CPP_CPU_BUILTINS): Define __SSE_MATH__.

	* gcse.c (cprop_jump): Check that the register has not
	been modified
	(cprop_jump): Likewise.

From-SVN: r57648
2002-09-30 13:00:32 +00:00
Kazu Hirata
cc2902df52 dbxout.c: Follow spelling conventions.
* dbxout.c: Follow spelling conventions.
	* defaults.h: Likewise.
	* df.c: Likewise.
	* diagnostic.h: Likewise.
	* doloop.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* emit-rtl.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* flags.h: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* genconfig.c: Likewise.
	* genrecog.c: Likewise.
	* ggc-page.c: Likewise.
	* ggc.h: Likewise.
	* global.c: Likewise.
	* gthr-win32.h: Likewise.
	* integrate.c: Likewise.
	* jump.c: Likewise.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* line-map.h: Likewise.
	* local-alloc.c: Likewise.
	* longlong.h: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise.

From-SVN: r57406
2002-09-22 14:09:34 +00:00
J"orn Rennecke
8ba464346a gcse.c (adjust_libcall_notes): New function.
* gcse.c (adjust_libcall_notes): New function.
	(do_local_cprop): Use it.  Add fourth parameter.  Changed caller.

From-SVN: r56252
2002-08-13 14:50:22 +01:00
Zdenek Dvorak
0228065963 gcse.c (expr_hash_table_size, [...]): Removed.
* gcse.c (expr_hash_table_size, n_exprs, set_hash_table_size,
	n_sets): Removed.
	(expr_hash_table, set_hash_table): Type changed to ...
	(struct hash_table): New type.
	(hash_scan_insn, hash_scan_set, hash_scan_clobber, hash_scan_call,
	insert_expr_in_table, insert_set_in_table, compute_hash_table,
	dump_hash_table, lookup_expr, lookup_set, compute_local_properties,
	compute_ae_gen, compute_ae_kill): Modified to pass the table explicitly.
	(alloc_set_hash_table, alloc_expr_hash_table): Merged to ...
	(alloc_hash_table): New.
	(free_set_hash_table, free_expr_hash_table): Merged to ...
	(free_hash_table): New.
	(compute_set_hash_table, compute_expr_hash_table): Merged to ...
	(compute_hash_table_work): New.
	(classic_gcse, one_classic_gcse_pass, compute_cprop_data,
	find_avail_set, one_cprop_pass, find_bypass_set, compute_pre_data,
	pre_edge_insert, pre_insert_copies, pre_delete, pre_gcse,
	one_pre_gcse_pass, compute_transpout, compute_code_hoist_vbeinout,
	hoist_code, one_code_hoisting_pass,
	trim_ld_motion_mems): Altered due to changed type of hash tables.

From-SVN: r55940
2002-08-01 19:10:14 +00:00
Kazu Hirata
68e82b8334 fold-const.c: Fix comment typos.
* fold-const.c: Fix comment typos.
	* gcse.c: Likewise.
	* reload1.c: Likewise.

From-SVN: r55876
2002-07-30 16:42:05 +00:00
Neil Booth
77bbd421e0 collect2.c (SYMBOL__MAIN): Remove.
* collect2.c (SYMBOL__MAIN): Remove.
	* gcse.c (obstack_chunk_alloc): Remove.
	(gcse_alloc): Fix to count allocated bytes.

From-SVN: r55755
2002-07-25 18:57:31 +00:00
Neil Booth
10d6af32dd genautomata.c (VLA_HWINT_SHORTEN, [...]): Remove.
* genautomata.c (VLA_HWINT_SHORTEN, VLA_HWINT_LAST): Remove.
	* df.c (HANDLE_SUBREG, FOR_EACH_BB_IN_BITMAP_REV,
	FOR_EACH_BB_IN_SBITMAP): Remove.
	* gcse.c (NEVER_SET, FOLLOW_BACK_EDGES): Remove.
	* haifa-sched.c (DONE_PRIORITY, MAX_PRIORITY, TAIL_PRIORITY,
	LAUNCH_PRIORITY, DONE_PRIORITY_P, LOW_PRIORITY_P): Remove.
	* loop.c (PREFETCH_BLOACK_IN_LOOP_MIN,
	PREFETCH_LIMIT_TO_SIMULTANEOUS): Remove.
	* regrename.c (REGNO_MODE_OK_FOR_BASE_P): Remove.

From-SVN: r55685
2002-07-23 19:19:33 +00:00
Jan Hubicka
2b773ee2c1 gcse.c (try_replace_reg): Use num_changes_pending.
2002-07-23  Jan Hubicka  <jh@suse.cz>

	* gcse.c (try_replace_reg): Use num_changes_pending.
	* recog.c (num_changes_pending): New function.
	(validate_replace_src): Use validate_repalce_src_group.
	(validate_replace_src_group): New.
	* recog.h (validate_repalce_src_group): New.
	(num_changes_pending): Likewise.

From-SVN: r55677
2002-07-23 12:08:10 +00:00
Neil Booth
4fa31c2aae defaults.h (obstack_chunk_alloc, [...]): Default definition.
* defaults.h (obstack_chunk_alloc, obstack_chunk_free):
	Default definition.
	* gcse.c: Don't define obstack_chunk_free.
	* collect2.c, conflict.c, df.c, diagnostic.c, fix-header.c,
	flow.c, gcc.c, genattrtab.c, genautomata.c, genflags.c, gensupport.c,
	integrate.c, loop.c, ra.c, read-rtl.c, regrename.c, reload1.c,
	reorg.c, tlink.c, tree.c, config/arm/arm.c, objc/objc-act.c:
	Don't define obstack macros.
cp:
	* class.c, method.c, pt.c, search.c: Similarly.

From-SVN: r55665
2002-07-23 06:22:05 +00:00
Jan Hubicka
4669036917 gcse.c (do_local_cprop): Do not extend lifetimes of registers set by do_local_cprop.
* gcse.c (do_local_cprop): Do not extend lifetimes of registers set by
	do_local_cprop.

From-SVN: r55626
2002-07-21 19:38:08 +00:00
Jan Hubicka
ae860ff787 gcse.c: Include cselib.h
* gcse.c: Include cselib.h
	(constptop_register): Break out from ...
	(cprop_insn): ... here; kill basic_block argument.
	(do_local_cprop, local_cprop_pass): New functions.
	(one_cprop_pass): Call local_cprop_pass.

From-SVN: r55615
2002-07-20 22:56:05 +00:00
Jan Hubicka
f305679f4e gcse.c (hoist_expr_reaches_here_p): Stop once expr_bb is reached.
* gcse.c (hoist_expr_reaches_here_p):  Stop once expr_bb is reached.

	* gcse.c (try_replace_reg): Do not return false positives.

From-SVN: r55553
2002-07-18 07:40:16 +00:00
Jan Hubicka
6bdb8dd695 * gcse.c (gcse_emit_move_after): Use gen_move_insn to produce the move.
From-SVN: r55087
2002-06-28 17:41:19 -06:00
Daniel Berlin
c635a1ec84 gcse.c (hoist_code): Rewrite to only get list of dominated blocks once per BB.
* gcse.c (hoist_code): Rewrite to only get list of dominated
        blocks once per BB. Also fix reversed test (by removing need for
        the test at all).

From-SVN: r55031
2002-06-27 09:56:40 -06:00
Jan Hubicka
355be0dc58 Mon Jun 10 20:42:34 CEST 2002 Jan Hubicka <jh@suse.cz>
* basic-block.h: Do not include et-forest.h
	(dominance_info): Declare as struct dominance-info.
	* cfglayout.c (cleanup_unconditional_jumps): Remove the edge before
	deleting block.
	* dominance.c (struct dominance_info): Define.
	(BB_NODE, SET_BB_NODE): New macros.
	(bb_hash_func, bb_eq_func): Kill.
	(calculate_dominace_info, free_dominacne_info, set_immediate_dominator,
	nearest_common_dominator, dominated_by_p, recount_dominator,
	add_to_dominance_info, delete_from_dominance_info): update for new
	representation.
	(get_dominated_by, redirect_immediate_dominators): Rewrite using
	enumerate_sons.
	* ifcvt.c (process_double_test_block, merge_if_block, find_cond_trap,
	find_if_case_1, find_if_case_2): Remove killed blocks from dominance
	structure.

	* et-forest.h: Update copyright; revamp all function to operate on
	nodes
	(et_forest_value): Kill.
	(et_forest_enumerate_sons, et_forest_node_value): New.
	* et-forest.c: Update copyright.
	* et-forest.h: Update copyright; revamp all function to operate on
	nodes
	(et_forest_value): Kill.
	(et_forest_enumerate_sons, et_forest_node_value): New.

	Thu Jun  6 22:43:43 CEST 2002  Jan Hubicka  <jh@suse.cz>

	* basic-block.h: Inlude et-forest.h
	(basic_block_def): Kill dominator.
	(dominance_info): New type.
	(loops): Use dominace_info.
	(dominace handling functions): Take dominace_info as argument
	instead of bitmaps.
	(create_preheader): Likewise.
	* cfg.c (entry_exit_blocks): Kill dominator.
	(dump_flow_info): Do not dump dominators.
	* cfglayout.c (cleanup_unconditonal_jumps): Delete deleted block from
	dominators.
	* cfgloop.c (flow_pre_header_find): Use dominacne_info.
	(flow_loops_pre_header_scan, make_forwarder_block,
	canonicale_loop_headers, flow_loops_find): Likewise.
	* dominance.c: Include error.h
	(idoms_to_doms): Kill.
	(bb_hash_func, bb_eq_func): New static functions.
	(debug_dominace_info): New global function.
	(calculate_dominance_info): Use new et forest structure.
	(free_dominace_info, get_immediate_dominator, set_immediate_dominator,
	get_dominated_by, redirect_immediate_dominators,
	nearest_common_dominator, dominated_by_p, verify_dominators,
	recount_dominator, iterate_fix_dominators, add_to_dominace_info,
	delete_from_dominance_info): New global functions.
	* gcse.c (domnators): CHange to dominance_info.
	(alloc_hoist_mem): Do not alloc dominators
	(free_code_hoist_mem): Use free_dominance_info.
	(compute_code_hoist_data): Use dominance_info.
	(hoist_code): Likewise.
	* ifcvt.c (post_dominators): Likewise.
	(find_if_case_2, if_convert): Likewise.
	* predict.c (process_note_predictions, process_note_prediction,
	estimate-probability): Likewise.
	* sched-rgn.c (find_rgns, init_regions): Likewise.
	* ssa-dce.c (find_all_control_dependences, fint_control_depemndence,
	find_pdom, delete_insn_bb, ssa_eliminate_dead_code): Likewise.
	* ssa.c (compute_dominance_frontiers_1, rename_block, rename_registers,
	find_evaluations, convert_to_ssa): Likewise.
	* ssa.h (compute_dominance_frontiers): Likewise.

	Thu Jun  6 22:57:34 CEST 2002  Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz>

	* Makefile.in (et-forest.c): Add.
	* et-forest.c: New file.
	* at-forest.h: New file.

Co-Authored-By: Pavel Nejedly <bim@atrey.karlin.mff.cuni.cz>

From-SVN: r54843
2002-06-20 17:51:06 +00:00
Jeff Law
99a15921f0 gcse.c (delete_null_pointer_checks_1): Inform caller if any null pointer checks were eliminated.
* gcse.c (delete_null_pointer_checks_1): Inform caller if any
        null pointer checks were eliminated.  Update prototype.
        (delete_null_pointer_checks): Similarly.
        * rtl.h (delete_null_pointer_checks): Update prototype.
        * toplev.c (rest_of_compilation): Only run cleanup_cfg if
        delete_null_pointer_checks deletes one or more null
        pointer checks.  Do not run cleanup_cfg before gcse, the
        CFG is accurate and optimized at that point..

From-SVN: r54617
2002-06-14 10:25:36 -06:00
Jan Hubicka
285464d088 i386.c (x86_promote_QImode): Set for Athlon
* i386.c (x86_promote_QImode): Set for Athlon
	(x86_fast_prefix): New global variable.
	(x86_arch_always_fancy_math_387): Fix formating.
	* i386.h (x86_fast_prefix): Declare
	(TARGET_FAST_PREFIX): define.
	* i386.md (and to strict_low_part, HI to SI
	promoting splitter): Use new macro.

	* i386.h (RTX_COSTS): float_extend is not for free for SSE.

From-SVN: r54521
2002-06-11 19:58:12 +00:00
David S. Miller
2f937369fa Delete SEQUENCE rtl usage outside of reorg and ssa passes.
2002-06-05  David S. Miller  <davem@redhat.com>

	Delete SEQUENCE rtl usage outside of reorg and ssa passes.
	* rtl.h (gen_sequence, emit_insns, emit_insns_before,
	emit_insns_before_scope, emit_insns_after,
	emit_insns_after_scope): Delete declaration.
	* ada/misc.c (insert_code_for): Use emit_insn* instead of
	emit_insns_foo.
	* config/alpha/alpha.c (alpha_set_memflags_1): Abort on SEQUENCE.
	(alpha_set_memflags): Fix comment.
	(set_frame_related_p): Use get_insns instead of gen_sequence.
	* config/alpha/alpha.md (setjmp receiver splitter): Avoid
	emitting no insns.
	* config/arm/arm.c (arm_finalize_pic): Use get_insns instead of
	gen_sequence.
	(arm_gen_load_multiple, arm_gen_store_multiple): Likewise.
	* config/fr30/fr30.c (fr30_move_double): Likewise.
	* config/i386/i386.c (ix86_expand_int_movcc, ix86_expand_movstr):
	Likewise.
	* config/ia64/ia64.c (spill_restore_mem): Likewise.
	* config/ia64/ia64.md (conditional move spliiter): Avoid emitting
	no insns.
	* config/m32r/m32r.c (gen_split_move_double): Use get_insns
	instead of gen_sequence.
	* config/mips/mips.c (embedded_pic_fnaddr_reg): Likewise.
	(mips_expand_prologue, mips16_gp_pseudo_reg): Likewise.
	* config/sh/sh.c (sh_need_epilogue): Likewise.
	* config/sparc/sparc.md (current_function_calls_alloca, flat): New
	attributes.
	(setjmp pattern and split): Use them to avoid splitter which emits
	no RTL.
	* genattrtab.c (main): Emit include of function.h
	* config/stormy16/stormy16.c (xstormy16_split_cbranch): Use
	get_insns instead of gen_sequence.
	* config/cris/cris.c (cris_split_movdx): Likewise.
	* emit-rtl.c (emit_insns*): Kill.
	(try_split): Expect insn list instead of SEQUENCE.
	(make_jump_insn_raw, make_call_insn_raw): Fix comments.
	(emit_*insn*): Reimplement to work with INSN lists and PATTERNs.
	Make them abort if a SEQUENCE is given and RTL checking is
	enabled.
	(emit_*_scope): Don't forget to set scope on final insn.
	(gen_sequence): Move from here...
	* ssa.c (gen_sequence): To here as private function.
	* builtins.c (expand_builtin_apply_args): Use emit_insn_foo, fix
	comments.
	(expand_builtin_return, expand_builtin_mathfn): Likewise.
	(expand_builtin_strlen): Use get_insns instead of gen_sequence.
	(expand_builtin_saveregs): Use emit_insn_foo, fix comments.
	(expand_builtin_expect_jump): Use get_insns and fix comments.
	* calls.c (try_to_integrate): Use emit_insn_foo.
	(expand_call, emit_library_call_value_1): Likewise.
	* expr.c (emit_queue): Handle insn lists instead of SEQUENCE.
	(emit_move_insn_1): Use get_insns instead of gen_sequence.
	(expand_expr): Use emit_insn_foo.
	* cfgrtl.c (commit_one_edge_insertion): Use emit_insn_foo.
	* except.c (build_post_landing_pads): Likewise.
	* flow.c (attempt_auto_inc): Likewise.
	* stmt.c (expand_fixup, fixup_gotos, expand_nl_handler_label,
	expand_nl_goto_receivers, expand_decl_cleanup): Likewise.
	* function.c (fixup_var_refs_insn): Use get_insns instead of
	gen_sequence.
	(fixup_var_refs_1): Likewise and expect insn list from gen_foo.
	(fixup_memory_subreg): Use get_insns instead of gen_sequence.
	(fixup_stack_1, purge_addressof_1, expand_main_function,
	get_arg_pointer_save_area): Likewise.
	(optimize_bit_field, instantiate_virtual_regs_1, assign_parms,
	expand_function_end): Use emit_insn_foo.
	(record_insns, keep_stack_depressed): Work with insn list instead
	of SEQUENCE, fix comments.
	* ifcvt.c (noce_emit_store_flag, noce_try_store_flag,
	noce_try_store_flag_constants, noce_try_store_flag_inc,
	noce_try_store_flag_mask, noce_emit_cmove, noce_try_cmove_arith,
	noce_try_minmax, noce_try_abs): Use emit_insn_foo.
	(noce_process_if_block): Use get_insns instead of gen_sequence.
	* optabs.c (add_equal_note): Work with insn list, fix comments.
	(expand_binop): Expect insn list from GEN_FCN(), use emit_insn_foo.
	(expand_unop, expand_complex_abs, expand_unop_insn,
	expand_no_conflict_block): Likewise.
	(gen_move_insn): Use get_insns instead of gen_sequence.
	(gen_cond_trap): Likewise.
	* integrate.c (copy_rtx_and_substitute): Likewise.
	(emit_initial_value_sets): Use emit_insn_foo.
	* reload1.c (emit_output_reload_insns, emit_reload_insns): Likewise.
	(fixup_abnormal_edges): Avoid losing REG_NOTES more intelligently
	now that RTL generators give insn lists.
	* sibcall.c (replace_call_placeholder): Use emit_insn_foo.
	* doloop.c (doloop_modify, doloop_modify_runtime): Use get_insns
	instead of gen_sequence.
	(doloop_optimize): Work with insn lists instead of SEQUENCE rtl.
	* explow.c (emit_stack_save, emit_stack_restore): Use get_insns
	instead of gen_sequence.
	* loop.c (move_movables, emit_prefetch_instructions,
	gen_add_mult, check_dbra_loop, gen_load_of_final_value):
	Likewise.
	(loop_regs_update): Work with insn list instead of SEQUENCE rtl.
	(product_cheap_p): Likewise, and add commentary about RTL wastage
	here.
	* lcm.c (optimize_mode_switching): Use get_insns instead of
	gen_sequence.
	* profile.c (gen_edge_profiler): Likewise.
	* regmove.c (copy_src_to_dest): Likewise.
	* reg-stack.c (compensate_edge): Likewise and fix comment.
	* gcse.c (process_insert_insn): Likewise.
	(insert_insn_end_bb): Work with insn list instead of SEQUENCE rtl.
	* jump.c (delete_prior_computation): Update comment.
	* genemit.c (gen_expand, gen_split, main): Use get_insns instead
	of gen_sequence, update comments to match.
	* recog.c (peephole2_optimize): Work with insn lists instead of
	SEQUENCE rtl.
	* sched-vis.c (print_pattern): Abort on SEQUENCE.
	* unroll.c (unroll_loop, find_splittable_givs, final_giv_value):
	Use get_insns instead of gen_sequence.
	(copy_loop_body): Likewise and don't emit dummy NOTE.
	* genrecog.c: Don't mention SEQUENCE rtl in comments.
	* combine.c (try_combine): Expect insn lists from split generator.
	* reorg.c (relax_delay_slots): Emit SEQUENCE into insn list by
	hand.

From-SVN: r54497
2002-06-11 05:22:48 -07:00
Roger Sayle
9543a9d2d4 toplev.c (rest_of_compilation): Disable early if-conversion pass.
* toplev.c (rest_of_compilation): Disable early if-conversion pass.
	* gcse.c (bypass_conditional_jumps): Fix typo in setcc test.

From-SVN: r54475
2002-06-10 22:26:45 +00:00
Kazu Hirata
589005ff21 gbl-ctors.h: Fix formatting.
* gbl-ctors.h: Fix formatting.
	* gcc.c: Likewise.
	* gccspec.c: Likewise.
	* gcov.c: Likewise.
	* gcov-io.h: Likewise.
	* gcse.c: Likewise.
	* ggc-common.c: Likewise.
	* ggc.h: Likewise.
	* ggc-page.c: Likewise.
	* ggc-simple.c: Likewise.
	* global.c: Likewise.
	* graph.h: Likewise.
	* gthr-dce.h: Likewise.
	* gthr.h: Likewise.
	* gthr-posix.h: Likewise.
	* gthr-rtems.h: Likewise.
	* gthr-solaris.h: Likewise.
	* gthr-win32.h: Likewise.

From-SVN: r54240
2002-06-04 11:30:46 +00:00
Geoffrey Keating
e2500fedef Merge from pch-branch up to tag pch-commit-20020603.
From-SVN: r54232
2002-06-04 07:11:05 +00:00
Roger Sayle
b2f02503e9 gcse.c (cprop_jump): Use single_set to get the pattern from the setcc argument.
* gcse.c (cprop_jump): Use single_set to get the pattern
	from the setcc argument.

From-SVN: r54221
2002-06-04 00:50:42 +00:00
Richard Henderson
ada8d98a5d * gcse.c (bypass_conditional_jumps): Fix typo last change.
From-SVN: r54189
2002-06-02 15:16:54 -07:00
Jan Hubicka
ba4f7968b5 loop.c (emit_prefetch_instructions): Properly place the address computation.
* loop.c (emit_prefetch_instructions): Properly place the address computation.


	* basic-block.h (basic_block_for_insn, BLOCK_FOR_INSN): Kill.
	(set_block_for_insn): Turn into macro.
	* cfgbuild.c (find_basic_block): Do not clear basic_block_for_insn.
	* cfglayout.c (insn_scopes): Kill.
	(scope_to_insns_initialize): Do not use insn_scopes.
	(scope_to_insns_finalize): Likewise.
	(duplicate_insn_chain): Likewise.
	(cfg_layout_initialize, cfg_layout_finalize): Do not turn scopes to notes.
	* cfgrtl.c (basic_block_for_insn): Kill.
	(delete_insn_and_edges, delete_insn_chain_and_edges): Simplify.
	(create_basic_block_structure): Use reorder_insns.
	(compute_bb_for_insn): Do not use basic_block_for_insn.
	(merge_blocks_nomove): Likewise.
	(update_bb_for_insn): Likewise.
	(verify_flow_info): Likewise.
	(set_block_for_insn): Kill.
	* combine.c (try_combine): Update gen_rtx_INSN call.
	* emit-rtl.c (gen_label_rtx): Update gen_rtx_CODE_LABEL call.
	(mark_insn_raw, make_jump_insn_raw, make_call_insn_raw): Clear
	scopes and BBs.
	(add_insn_after, add_insn_before, remove_insn, reorder_insns): Simplify.
	(emit_note_before, emit_note_after, emit_line_note_after, emit_note):
	Clear BB.
	(emit_insns_after): Simplify.
	(emit_copy_of_insn_after): Copy scope.
	* final.c (final_start_function): Lower scopes.
	* flow.c (check_function_return_warnings): Do not rely on deleted insn.
	* integrate.c (copy_insn_list): Cope scopes.
	* jump.c (duplicate_loop_exit_test): LIkewise; simplify.
	* loop.c (loop_optimize): Do not care block notes.
	* print-rtl.c (print_rtx): Print BB.
	* recog.c (apply_change_group): Simplify.
	* rtl.c (copy_rtx): Handle 'B'.
	* rtl.def (INSN, CALL_INSN, JUMP_INSN, NOTE): Add extra fields.
	* rtl.h (Field accessors): Update indexes.
	* sched-ebb.c (schedule_ebbs): Do not lower notes.
	* sched-rgn.c (schedule_insns): Likewise.
	* toplev.c (rest_of_compilation): Lower notes.
	* unroll.c (unroll_loop): Do not care scoping notes.
	(copy_loop_body): Copy scopes.

From-SVN: r54188
2002-06-02 21:09:54 +00:00
Richard Henderson
818b6b7fb1 rtl.h (CC0_P): New.
* rtl.h (CC0_P): New.
        * gcse.c (cprop_jump): Use it with single_set.  Tweak dump text.
        (cprop_insn): Allow any mode register; use CC0_P.  CSE out single_set.
        (bypass_block): Save old dest block for dump text.
        (bypass_conditional_jumps): Allow any mode register; use CC0_P.
        Allow only true SET insns, not single_set.

From-SVN: r54178
2002-06-02 11:38:04 -07:00
Jan Hubicka
eae4bc56ee cfgrtl.c (commit_one_edge_insertion): Fix warning.
* cfgrtl.c (commit_one_edge_insertion): Fix warning.
	* gcse.c (bypass_conditional_jumps): CSE out single_set call.

From-SVN: r54175
2002-06-02 17:18:58 +00:00
Jan Hubicka
92e34b6718 * gcse.c (bypass_conditional_jumps): Use single set to obtain set.
From-SVN: r54165
2002-06-02 10:21:39 +00:00
Roger Sayle
0e3f022139 gcse.c (cprop_cc0_jump): Function deleted.
* gcse.c (cprop_cc0_jump): Function deleted.
	(cprop_jump): Take an additional argument which is the possibly
	NULL cc setting insn immediately before the conditional jump.
	When a MODE_CC set is present, substitute it into the JUMP_INSN
	before attempting the constant propagation.
	(cprop_insn):  Recognize cc setters followed by conditional jumps
	as a special case.   Use cprop_jump instead of cprop_cc0_jump.
	(cprop_one_pass):  Call bypass_conditional_jumps if altering jumps.
	(find_bypass_set): New function based upon find_avail_set used by
	cprop, but finds constant expressions available at the end of
	basic blocks.
	(bypass_block): New function.  Given a basic block that begins
	with a conditional jump and multiple incoming edges, perform
	the jump bypass optimization.
	(bypass_conditional_jumps): New function.  Call bypass_block with
	each suitable basic block in the CFG using a simple single pass.

From-SVN: r54152
2002-06-01 20:03:08 +00:00
Jan Hubicka
10d1bb3675 gcse.c (gcse_emit_move_after): New.
* gcse.c (gcse_emit_move_after): New.
	(pre_delete, hoist_store): Use it.

	* reload1.c (emit_input_reload_insns): Use constrain_operands
	instead of constraint_accepts_reg_p to verify optimization.
	(constraint_accepts_reg_p): Kill

	* reload1.c (reload_cse_delete_noop_set): Kill.
	(reload_cse_simplify): use delte_insn_and_edges.

From-SVN: r54105
2002-05-31 11:43:18 +00:00
Zdenek Dvorak
d55bc08175 basic-block.h (last_basic_block): Defined as synonym for n_basic_blocks.
* basic-block.h (last_basic_block): Defined as synonym for
	n_basic_blocks.
	* cfganal.c (mark_dfs_back_edges, flow_reverse_top_sort_order_compute,
	flow_depth_first_order_compute, flow_preorder_transversal_compute,
	flow_dfs_compute_reverse_init): Replaced relevant occurences of
	n_basic_blocks with last_basic_block.
	* cfgbuild.c (make_edges): Likewise.
	* cfgloop.c (flow_loop_scan, flow_loops_find): Likewise.
	* cfgrtl.c (verify_flow_info, purge_all_dead_edges): Likewise.
	* combine.c (combine_instructions): Likewise.
	* df.c (df_alloc, df_analyse_1, df_analyse, iterative_dataflow_sbitmap,
	iterative_dataflow_bitmap): Likewise.
	* dominance.c (init_dom_info, calc_dfs_tree_nonrec, calc_dfs_tree,
	calc_idoms, idoms_to_doms): Likewise.
	* flow.c (update_life_info_in_dirty_blocks, free_basic_block_vars):
	Likewise.
	* gcse.c (gcse_main, alloc_gcse_mem, compute_local_properties,
	compute_hash_table, expr_reaches_here_p, one_classic_gcse_pass,
	one_cprop_pass, compute_pre_data, pre_expr_reaches_here_p,
	one_pre_gcse_pass, compute_transpout, delete_null_pointer_checks_1,
	delete_null_pointer_checks, compute_code_hoist_vbeinout,
	hoist_expr_reaches_here_p, hoist_code, one_code_hoisting_pass,
	compute_store_table, build_store_vectors): Likewise.
	* haifa-sched.c (sched_init): Likewise.
	* ifcvt.c (if_convert): Likewise.
	* lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete,
	pre_edge_lcm, compute_available, compute_nearerout,
	compute_rev_insert_delete, pre_edge_rev_lcm, optimize_mode_switching):
	Likewise.
	* predict.c (estimate_probability, process_note_prediction,
	note_prediction_to_br_prob): Likewise.
	* profile.c (GCOV_INDEX_TO_BB, BB_TO_GCOV_INDEX): Likewise.
	* recog.c (split_all_insns, peephole2_optimize): Likewise.
	* regrename.c (copyprop_hardreg_forward): Likewise.
	* resource.c (init_resource_info): Likewise.
	* sched-rgn.c (build_control_flow, find_rgns, compute_trg_info,
	init_regions, schedule_insns): Likewise.
	* ssa-ccp.c (ssa_const_prop): Likewise.
	* ssa-dce.c (ssa_eliminate_dead_code): Likewise.
	* ssa.c (compute_dominance_frontiers,
	compute_iterated_dominance_frontiers, convert_to_ssa): Likewise.

	* df.c (df_refs_unlink): Fix FOR_EACH_BB usage (in #if 0'ed code)
	* gcse.c (alloc_rd_mem, alloc_avail_expr_mem): Use n_blocks for vector
	sizes consistently.

From-SVN: r53924
2002-05-27 13:45:44 +00:00
Zdenek Dvorak
e0082a7265 bb-reorder.c (make_reorder_chain, [...]): Use FOR_EACH_BB macros to iterate over basic block chain.
* bb-reorder.c (make_reorder_chain, make_reorder_chain_1):
	Use FOR_EACH_BB macros to iterate over basic block chain.
	* cfg.c (clear_edges, clear_bb_flags, dump_flow_info,
	alloc_aux_for_blocks, clear_aux_for_blocks, alloc_aux_for_edges):
	Likewise.
	* cfganal.c (set_edge_can_fallthru_flag, flow_call_edges_add,
	find_unreachable_blocks, create_edge_list, verify_edge_list,
	remove_fake_edges, add_noreturn_fake_exit_edges,
	flow_preorder_transversal_compute, flow_dfs_compute_reverse_execute):
	Likewise.
	* cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks,
	find_sub_basic_blocks): Likewise.
	* cfgcleanup.c (try_optimize_cfg, delete_unreachable_blocks):
	Likewise.
	* cfglayout.c (record_effective_endpoints, cleanup_unconditional_jumps):
	Likewise.
	* cfgloop.c (flow_loops_cfg_dump, flow_loops_find):
	Likewise.
	* cfgrtl.c (compute_bb_for_insn, tidy_fallthru_edges,
	commit_edge_insertions, commit_edge_insertions_watch_calls,
	print_rtl_with_bb, verify_flow_info, purge_all_dead_edges): Likewise.
	* combine.c (combine_instructions, reg_dead_at_p): Likewise.
	* conflict.c (conflict_graph_compute): Likewise.
	* df.c (df_bitmaps_alloc, df_bitmaps_free, df_alloc, df_analyse_1,
	df_modified_p, df_refs_unlink, df_dump): Likewise.
	* dominance.c (calc_dfs_tree, calculate_dominance_info): Likewise.
	* final.c (compute_alignments): Likewise.
	* flow.c (update_life_info, update_life_info_in_dirty_blocks,
	delete_noop_moves, calculate_global_regs_live, allocate_bb_life_data,
	count_or_remove_death_notes): Likewise.
	* gcse.c (oprs_unchanged_p, record_last_reg_set_info,
	compute_hash_table, compute_kill_rd, compute_rd, compute_ae_kill,
	classic_gcse, compute_transp, cprop, compute_pre_data,
	compute_transpout, invalidate_nonnull_info,
	delete_null_pointer_checks_1, delete_null_pointer_checks,
	compute_code_hoist_vbeinout, hoist_code, compute_ld_motion_mems,
	compute_store_table, build_store_vectors, store_motion): Likewise.
	* global.c (global_conflicts, mark_elimination): Likewise.
	* graph.c (print_rtl_graph_with_bb): Likewise.
	* haifa-sched.c (sched_init): Likewise.
	* ifcvt.c (if_convert): Likewise.
	* lcm.c (compute_antinout_edge, compute_laterin, compute_insert_delete,
	compute_available, compute_nearerout, compute_rev_insert_delete,
	optimize_mode_switching): Likewise.
	* local-alloc.c (local_alloc, update_equiv_regs): Likewise.
	* predict.c (estimate_probability, note_prediction_to_br_prob,
	propagate_freq, counts_to_freqs, expensive_function_p,
	estimate_bb_frequencies): Likewise.
	* profile.c (instrument_edges, get_exec_counts,
	compute_branch_probabilities, compute_checksum, branch_prob,
	find_spanning_tree): Likewise.
	* recog.c (split_all_insns, peephole2_optimize): Likewise.
	* reg-stack.c (reg_to_stack, convert_regs_entry, convert_regs):
	Likewise.
	* regclass.c (scan_one_insn, regclass): Likewise.
	* regmove.c (mark_flags_life_zones, regmove_optimize,
	record_stack_memrefs): Likewise.
	* regrename.c (regrename_optimize, copyprop_hardreg_forward): Likewise.
	* reload1.c (reload, reload_combine, fixup_abnormal_edges): Likewise.
	* resource.c (find_basic_block): Likewise.
	* sched-ebb.c (schedule_ebbs): Likewise.
	* sched-rgn.c (is_cfg_nonregular, build_control_flow,
	find_single_block_region, find_rgns, schedule_insns)
	* sibcall.c (optimize_sibling_and_tail_recursive_call)
	* ssa-ccp.c (optimize_unexecutable_edges,
	ssa_ccp_df_delete_unreachable_insns): Likewise.
	* ssa-dce.c (ssa_eliminate_dead_code): Likewise.
	* ssa.c (find_evaluations, compute_dominance_frontiers_1,
	rename_block, convert_to_ssa, compute_conservative_reg_partition,
	compute_coalesced_reg_partition, rename_equivalent_regs,
	convert_from_ssa): Likewise.
	* config/ia64/ia64.c (emit_predicate_relation_info, process_epilogue,
	process_for_unwind_directive): Likewise.

	* df.c (FOR_ALL_BBS): Removed.
	* gcse.c (struct null_pointer_info): Type of current_block field
	changed.
	(struct reg_avail_info): Type of last_bb field changed.
	* config/ia64/ia64.c (block_num): Removed.
	(need_copy_state): Type changed.
	(last_block): New.

From-SVN: r53804
2002-05-23 19:23:51 +00:00
Jan Hubicka
d51f363255 * gcse.c (hash_expr): Do not use alias set for hashing.
From-SVN: r53772
2002-05-23 07:29:30 +00:00
Zdenek Dvorak
f6366fc7ad bb-reorder.c (make_reorder_chain_1): Modified.
* bb-reorder.c (make_reorder_chain_1): Modified.
	* cfganal.c (can_fallthru, flow_call_edges_add,
	flow_preorder_transversal_compute): Modified.
	* cfgbuild.c (make_edges, find_basic_blocks, find_many_sub_basic_blocks,
	find_sub_basic_blocks): Modified.
	* cfgcleanup.c (try_simplify_condjump, try_optimize_cfg): Modified.
	* cfglayout.c (skip_insns_after_block, fixup_reorder_chain,
	fixup_fallthru_exit_predecessor, cfg_layout_redirect_edge): Modified.
	* cfgrtl.c (tidy_fallthru_edges, verify_flow_info): Modified.
	* combine.c (this_basic_block): Type changed to basic_block.
	(combine_instructions, set_nonzero_bits_and_sign_copies, try_combine,
	nonzero_bits, num_sign_bit_copies, get_last_value_validate,
	get_last_value, distribute_notes, distribute_links): Modified.
	* final.c (compute_alignments): Modified.
	* flow.c (regno_uninitialized, regno_clobbered_at_setjmp): Modified.
	* function.c (thread_prologue_and_epilogue_insns): Modified.
	* gcse.c (compute_code_hoist_vbeinout): Modified.
	* global.c (build_insn_chain): Modified.
	* ifcvt.c (find_if_block, find_cond_trap): Modified.
	* predict.c (last_basic_block_p, note_prediction_to_br_prob): Modified.
	* regmove.c (regmove_optimize): Modified.
	* resource.c (find_basic_block): Modified.
	* sched-ebb.c (schedule_ebbs): Modified.
	* ssa-dce.c (find_control_dependence, find_pdom): Modified.

From-SVN: r53695
2002-05-21 20:37:43 +00:00
Richard Henderson
0b17ab2f5b Revert "Basic block renumbering removal", and two followup patches.
From-SVN: r53537
2002-05-16 19:31:56 -07:00
Zdenek Dvorak
355e4ec445 Basic block renumbering removal.
From-SVN: r53522
2002-05-16 10:34:53 -07:00
Jakub Jelinek
61ad9a3472 PR optimization/5172, optimization/5200
2002-03-09  Jakub Jelinek  <jakub@redhat.com>

	PR optimization/5172, optimization/5200
	* gcse.c (gcse_main): Disable store_motion.

From-SVN: r53477
2002-05-15 00:46:09 -07:00
Richard Henderson
0fe854a7e0 alias.c (canon_true_dependence): Special case (mem:blk (scratch)).
* alias.c (canon_true_dependence): Special case (mem:blk (scratch)).

        * gcse.c (free_insn_expr_list_list): New.
        (clear_modify_mem_tables): Use it.  Fix bit set usage.
        (canon_list_insert): Use EXPR_LISTs for expressions.
        (record_last_mem_set_info): Factor BLOCK_NUM (insn).

From-SVN: r52624
2002-04-22 11:17:06 -07:00
Alan Modra
a6a063b81c re PR rtl-optimization/6233 (simple loop miscompilation)
PR optimization/6233
	* rtlanal.c (pure_call_p): New function.
	* rtl.h (pure_call_p): Declare.
	* loop.c (prescan_loop): Use it to set has_nonconst_call.
	* gcse.c (store_killed_in_insn): Use pure_call_p here too.

From-SVN: r52110
2002-04-10 13:20:39 +09:30
Richard Henderson
b47374fa9b sbitmap.c (sbitmap_union_of_diff, [...]): Do not return changed status.
* sbitmap.c (sbitmap_union_of_diff, sbitmap_a_and_b, sbitmap_a_xor_b,
        sbitmap_a_or_b, sbitmap_a_or_b_and_c, sbitmap_a_and_b_or_c):
        Do not return changed status.
        (sbitmap_union_of_diff_cg, sbitmap_a_and_b_cg, sbitmap_a_xor_b_cg,
        sbitmap_a_or_b_cg, sbitmap_a_or_b_and_c_cg, sbitmap_a_and_b_or_c_cg):
        New functions that do return changed status.
        * sbitmap.h: Update decls.
        * gcse.c, lcm.c: Use _cg functions as needed.

From-SVN: r52094
2002-04-09 14:15:38 -07:00
Richard Henderson
e7d482b9e4 gcse.c: Include except.h.
* gcse.c: Include except.h.
        * Makefile.in (gcse.o): Update.

From-SVN: r51297
2002-03-24 18:30:22 -08:00
Kaveh R. Ghazi
3b25fbfeaf * gcse.c (insert_insn_end_bb): Fix typo in last change.
From-SVN: r50453
2002-03-08 20:23:55 +00:00
Jan Hubicka
068473ec92 basic-block.h (fixup_abnormal_edges): Declare.
* basic-block.h (fixup_abnormal_edges): Declare.
	* reload1.c (fixup_abnormal_edges): New function.
	* reg-stack.c (convert_regs): Use it.

	* gcse.c (insert_insn_end_bb): Handle trapping insns.

	* gcse.c (hash_scan_set): Refuse instructions with EH edges.

From-SVN: r50405
2002-03-07 15:38:00 +00:00
Jan Hubicka
38c1593d57 basic-block.h (BB_REACHABLE): Renumber.
* basic-block.h (BB_REACHABLE): Renumber.
	(BB_DIRTY, BB_NEW): New flags.
	(clear_bb_flags): Declare.
	(update_life_info_in_dirty_blocks): Declare.
	* cfg.c (clear_bb_flags): New function.
	* cfgrtl.c (create_basic_block_structure): Set flags to BB_NEW.
	* emit-rtl.c (add_insn_after, add_insn_before, remove_insn,
	reorder_insns, emit_insn_after): Mark block as dirty.
	* flow.c (update_life_info): Fix clearing of PROP_LOG_LINKS.
	(update_life_info_in_dirty_blocks): New function.
	* recog.c (apply_change_group): Dirtify block.

	* cse.c (cse_insn): Reorder emitting of jump insn to keep
	cfg consistent.
	* gcse.c (delete_null_pointer_checks): Likewise.

	* toplev.c (dump_file_index): Move cse2 after bp,
	add DFI_null
	(dump_file_info): Similary.
	(rest_of_compilation): Avoid most of CFG rebuilds;
	do first if converision after null pointer checks, do cse2
	after branch prediction; avoid full liveness rebuild after
	initializing subregs.
	* invoke.texi (-d options): Document -du, renumber.

	* cfgcleanup.c (bb_flags): Remove BB_UPDATE_LIFE.
	(notice_new_block): Do not set BB_UPDATE_LIFE.
	(try_forward_edges, merge_blocks_move_predecessor_nojumps,
	 merge_blocks_move_successor_nojumps, merge_blocks,
	 try_crossjump_to_edge): Likewise.
	(try_optimize_cfg): Likewise; use update_life_info_in_dirty_blocks.
	* cfgrtl.c (merge_blocks_nomove): Copy b's flags to a.
	* ifcvt.c (SET_UPDATE_LIFE, UPDATE_LIFE): Kill.
	(merge_of_block): Do not use life_data_ok.
	(find_if_case_1): Do not use SET_UPDATE_LIFE.
	(if_convert): Use BB_DIRTY mechanizm to update life.
	* lcm.c (optimize_mode_switching): Update
	update_life_info_in_dirty_blocks

From-SVN: r50127
2002-02-28 10:11:01 +00:00
Aldy Hernandez
69ef87e2bc i386.md ("mmx_uavgv8qi3"): Use const_vector.
2002-02-19  Aldy Hernandez  <aldyh@redhat.com>

	* config/i386/i386.md ("mmx_uavgv8qi3"): Use const_vector.
	("mmx_uavgv4hi3"): Same.
	("pmulhrwv4hi3"): Same.

	* tree-inline.c (walk_tree): Handle vectors.

	* c-common.c (constant_expression_warning): Handle vectors.
	(overflow_warning): Same.

	* sched-deps.c (sched_analyze_2): Handle vectors.

	* rtlanal.c (rtx_unstable_p): Handle vectors.
	(rtx_varies_p): Same.
	(count_occurrences): Same.
	(regs_set_between_p): Same.
	(modified_between_p): Same.
	(modified_in_p): Same.
	(volatile_insn_p): Same.
	(volatile_refs_p): Same.
	(side_effects_p): Same.
	(may_trap_p): Same.
	(inequality_comparisons_p): Same.
	(replace_regs): Same.
	(computed_jump_p_1): Same.

	* rtl.c (DEF_MACHMODE): Change all definitions to accept 8th
	argument.
	(inner_mode_array): New.
	(copy_rtx): Handle vectors.
	(copy_most_rtx): Same.
	(rtx_equal_p): Same.
	(get_mode_alignment): Adjust for vectors.

	* resource.c (mark_referenced_resources): Handle vectors.
	(mark_set_resources): Same.

	* reload1.c (eliminate_regs): Handle vectors.
	(elimination_effects): Same.
	(scan_paradoxical_subregs): Same.

	* reload.c (subst_reg_equivs): Handle vectors.

	* regrename.c (scan_rtx): Handle vectors.

	* regclass.c (reg_scan_mark_refs): Handle vectors.

	* recog.c (find_single_use_1): Handle vectors.

	* local-alloc.c (equiv_init_varies_p): Handle vectors.
	(contains_replace_regs): Same.
	(memref_referenced_p): Same.

	* integrate.c (copy_rtx_and_substitute): Handle vectors.
	(subst_constants): Same.

	* genattrtab.c (attr_copy_rtx): Handle vectors.
	(encode_units_mask): Same.
	(clear_struct_flag): Same.
	(count_sub_rtxs): Same.

	* gcse.c (want_to_gcse_p): Handle vectors.
	(oprs_unchanged_p): Same.
	(hash_expr_1): Same.
	(oprs_not_set_p): Same.
	(expr_killed_p): Same.
	(compute_transp): Same.
	(store_ops_ok): Same.

	* function.c (purge_addressof_1): Do not allow paradoxical subregs
	of vectors.
	(fixup_var_refs_1): Same.
	(instantiate_virtual_regs_1): Same.

	* fold-const.c (operand_equal_p): Handle vectors.
	(fold): Same.
	(rtl_expr_nonnegative_p): Same.

	* flow.c (mark_used_regs): Handle vectors.

	* df.c (df_uses_record): Handle vectors.

	* cselib.c (cselib_subst_to_values): Handle vectors.
	(cselib_mem_conflict_p): Same.
	(hash_rtx): Same.

	* cse.c (canon_reg): Handle vectors.
	(fold_rt): Same.
	(cse_process_notes): Same.
	(count_reg_usage): Same.
	(canon_hash): Same.

	* alias.c (nonlocal_mentioned_p): Add case for CONST_VECTOR.

	* combine.c (mark_used_regs_combine): Add case for CONST_VECTOR.

	* emit-rtl.c (init_emit_once): Generate const0_rtx for vectors.
	(gen_rtx): Handle CONST_VECTOR.
	(gen_const_vector_0): New.
	(copy_rtx_if_shared): CONST_VECTORs can be shared.
	(reset_used_flags): Same.
	(copy_insn_1): Same.
	(initializer_constant_valid_p): Handle VECTOR_CST.

	* doc/c-tree.texi (Expression trees): Document VECTOR_CST.

	* doc/rtl.texi (Constants): Document const_vector.
	(CONST0_RTX): Update for vectors.
	(RTL sharing): Same.

	* print-tree.c (print_node): Add case for VECTOR_CST.

	* tree.h (TREE_VECTOR_CST_ELTS): New.
	(struct tree_vector): New.
	(union tree_node): Add vector node.
	(build_vector): Add prototype.

	* tree.def (VECTOR_CST): New.

	* tree.c (build_vector): New.

	* expmed.c (make_tree): Handle CONST_VECTOR.

	* rtl.h (CONSTANT_P): CONST_VECTORs are constants too.
	(CONST_VECTOR_ELT): New.
	(CONST_VECTOR_NUNITS): New.

	* machmode.h (GET_MODE_INNER): New.
	(DEF_MACHMODE): Accept 8th arg.

	* machmode.def: Add 8th argument for vector inner mode.
	Add inner vector modes for vectors.

	* rtl.def (VEC_CONST): Remove.
	(CONST_VECTOR): New.

	* expr.c (clear_storage): Allow vectors.
	(is_zeros_p): Handle VECTOR_CST.

	* varasm.c (output_constant_pool): Handle vectors.
	(rtx_const): Add veclo and vechi fields.
	(kind): Add RTX_VECTOR.
	(decode_rtx_const): Add case for vector.

	* config/rs6000/rs6000-protos.h: Add zero_constant.

	* config/rs6000/rs6000.c (rs6000_emit_move): Handle vector
	constants.  Force easy vector constants into memory.
	(easy_vector_constant): New.
	(emit_easy_vector_constant): New.
	(rs6000_legitimize_reload_address): Do not generate bad reloads on
	darwin.

	* config/rs6000/rs6000.md ("altivec_lvx"): Reflect what
	instruction does.
	("altivec_lvxl"): Same.
	(altivec_lvebx): Same.
	(altivec_lvehx): Same.
	(altivec_lvewx): Same.
	("*movv4si_const0"): New.
	("*movv4sf_const0"): New.
	("*movv8hi_const0"): New.
	("*movv16qi_const0"): New.

From-SVN: r49853
2002-02-19 02:53:41 +00:00
Michael Hayes
76ac938bdc gcse.c (compute_pre_data, pre_gcse): Use sbitmap_free.
* gcse.c (compute_pre_data, pre_gcse): Use sbitmap_free.
	* lcm.c (compute_earliest, compute_farthest): Likewise.

From-SVN: r48789
2002-01-12 01:18:42 +00:00
Jan Hubicka
b446e5a266 basic-block.h (update_br_prob_note): Declare.
* basic-block.h (update_br_prob_note): Declare.
	* cfgcleanup.c (try_simplify_condjump): Call update_br_prob_note.
	(try_forward_edges): Care negative frequencies and update note.
	(outgoing_edges_match): Tweek conditional merging heuristics.
	(try_crossjump_to_edge): use update_br_prob_note.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	* cfrtl.c (update_br_prob_note): New.
	* ifcvt.c (dead_or_predicable): Call update_br_prob_note.

	* i386.c (ix86_decompose_address): Return -1 if address contains
	shift.
	(legitimate_address_p): Require ix86_decompose_address to return 1.

	* gcse.c (hash_scan_set): Use CONSTANT_INSN_P.
	(cprop_insn): Likewise.

From-SVN: r48750
2002-01-10 20:37:43 +00:00
Jan Hubicka
7d5ab30eb3 * gcse.c (cprop_jump): Delete insn if simplified jump is no-op.
From-SVN: r48694
2002-01-09 13:49:02 -08:00
Andreas Jaeger
b78237cdee Remove erroneous checkin on wrong branch.
From-SVN: r48646
2002-01-08 17:51:38 +01:00
Andreas Jaeger
90f0738469 * gcse.c (gcse_main): Disable store_motion until it gets fixed.
From-SVN: r48645
2002-01-08 17:44:45 +01:00
Kazu Hirata
8e42ace183 * gcse.c: Fix formatting.
From-SVN: r48502
2002-01-03 06:36:42 +00:00
Graham Stott
a176492c72 gcse.c (gcse_main): Fix typos.
* gcse.c (gcse_main): Fix typos.
	(alloc_gcse_mem): Likewise.

From-SVN: r48406
2001-12-31 03:51:45 +00:00
Jakub Jelinek
1218665b70 gcse.c (store_killed_in_insn): Consider pure calls as potential store killers in addition to normal calls.
* gcse.c (store_killed_in_insn): Consider pure calls
	as potential store killers in addition to normal calls.

	* gcc.c-torture/execute/20011024-1.c: New test.

From-SVN: r47675
2001-12-05 15:17:49 +01:00
Jan Hubicka
9cd56be1b9 gcse.c (delete_null_pointer_checks_1): Do not use delelete_list; call purge_dead_edges after removing.
* gcse.c (delete_null_pointer_checks_1): Do not use delelete_list;
	call purge_dead_edges after removing.
	(delete_null_pointer_checks): Do not handle delete_list.

	* cfgbuild.c (inside_basic_block_p, control_flow_insn_p): Break out from ...
	(count_basic_blocks): ... here.
	(find_basic_blocks, find_bb_boundaries): Cleanup.

	* stor-layout.c (fixup_signed_type, fixup_unsigned_type): Avoid
	overflow for types greater then 2 * HOST_WIDE_INT.

	* reload.c (find_reloads): Update the duplicates after swapingg.

From-SVN: r47551
2001-12-03 15:22:47 +00:00
Joseph Myers
a1f300c0f1 ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.2, ChangeLog.3, ChangeLog.4, ChangeLog,
	FSFChangeLog.10, c-decl.c, cppfiles.c, cppinit.c, cpplex.c,
	cpplib.c, cppmain.c, cse.c, df.c, diagnostic.c, dominance.c,
	dwarf2out.c, dwarfout.c, emit-rtl.c, errors.c, except.c, except.h,
	explow.c, function.c, gcse.c, genrecog.c, predict.c, regmove.c,
	sched-rgn.c, ssa-ccp.c, stmt.c, toplev.c: Fix spelling errors.

From-SVN: r47279
2001-11-23 02:05:19 +00:00
Jeff Law
419fef71cb gcse.c (cprop_jump): Clear JUMP_LABEL field when we create a nop-jump.
* gcse.c (cprop_jump): Clear JUMP_LABEL field when we create
	a nop-jump.

From-SVN: r47183
2001-11-19 14:51:53 -07:00
Jan Hubicka
7fcd721879 gcse.c (try_replace_reg): Copy RTX before creating note.
* gcse.c (try_replace_reg): Copy RTX before creating note.

	* df.h (df_ref_flags): New uenum.
	(DF_REF_FLAGS): New macro.
	(struct ref): Add field "flags".
	* df.c (HANDLE_SUBREG): Remove.
	(df_ref_create): Likewise; set flags field of ref.
	(df_def_record_1): Strip down read_write subreg; remove
	commented out code; set READ_WRITE flag.
	(read_modify_subreg_p): New static function.
	(df_uses_record): Cleanup SET handling; set READ_WRITE flag;
	new argument "flags".
	(df_insn_refs_record): Update call of df_uses_record.
	(df_insn_modify): Avoid #if 0 around comment.
	(df_dump): Dump the read/write flag.

	* predict.c (propagate_freq): Make cyclic_probability and frequency
	volatile

	* i386.c (ix86_cc_mode): Accept USE.

	* cfgrtl.c (purge_dead_edges):  Cleanup EDGE_ABNORMAL flag if computed
	jump is turned into simplejump.

From-SVN: r47175
2001-11-19 17:08:48 +00:00
Jakub Jelinek
3d23824843 emit-rtl.c (set_unique_reg_note): Don't create REG_EQUAL or REG_EQUIV notes for ASM_OPERANDS.
* emit-rtl.c (set_unique_reg_note): Don't create REG_EQUAL or
	REG_EQUIV notes for ASM_OPERANDS.  Return the new note (if any).
	* rtl.h (set_unique_reg_note): Change return value.
	* gcse.c (try_replace_reg): Use set_unique_reg_note.
	* cse.c (cse_insn): Likewise.
	* expr.c (emit_move_insn): Likewise.
	* explow.c (force_reg): Likewise.
	* local-alloc (update_equiv_regs): Likewise.
	* loop.c (move_moveables, load_mems): Likewise.
	* reload (find_reloads): Likewise.

	* gcc.dg/20011029-2.c: New test.

From-SVN: r46636
2001-10-30 13:41:45 +01:00
Jan Hubicka
73991d6ae7 lcm.c (optimize_mode_switching): Do not rebuild liveness information when no changes has been made.
* lcm.c (optimize_mode_switching):  Do not rebuild liveness information
	when no changes has been made.

	* gcse.c (reg_set_bitmap): Turn into reg_set.
	(modify_mem_list_set, canon_modify_mem_list_set)
	(clear_modify_mem_tables, free_modify_mem_tables): New.
	(gcse_main); Use free_modify_mem_tables.
	(free_gcse_mem): Likewise; free the bitmaps.
	(alloc_gcse_main): Initialize the bitmaps.
	(canon_list_insert): Set canon_modify_mem_list_set.
	(record_last_mem_set_info): Likewise; set modify_mem_list_set.
	(compute_hash_table): Use clear_modify_mem_tables.
	(reset_opr_set_tables): Likewise.
	(oprs_not_set_p): reg_set_bitmap is regset.
	(mark_set, mark_clobber): Likewise.

	* df.h (DF_EQUIV_NOTES): New constant.
	(df_insn_refs_record): Record uses inside or REG_EQUIV/EQUAL notes
	when asked for.

	* sched-rgn.c (CHECK_DEAD_NOTES): New constant.
	(init_regions, schedule_insns): Conditionalize the checking
	code by CHECK_DEAD_NOTES; avoid multiple calls to update_life_info.

From-SVN: r46634
2001-10-30 11:13:49 +00:00
Joseph Myers
ff7cc30768 ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4,
	ChangeLog.5, ChangeLog, FSFChangeLog.10, FSFChangeLog.11,
	c-common.c, c-common.h, c-parse.in, c-typeck.c, cfg.c, config.gcc,
	configure, configure.in, except.c, except.h, flow.c, function.c,
	gcc.c, gcse.c, genrecog.c, libgcc2.c, loop.c, loop.h, params.def,
	predict.def, predict.h, reg-stack.c, regmove.c, sched-deps.c,
	sched-int.h, sibcall.c, ssa.c, stringpool.c, toplev.c, tree.c,
	unroll.c: Fix spelling errors.

From-SVN: r46595
2001-10-28 20:09:17 +00:00
Joseph Myers
f63d1bf775 ChangeLog.0, [...]: Fix spelling errors.
* ChangeLog.0, ChangeLog.1, ChangeLog.2, ChangeLog.3, ChangeLog.4,
	ChangeLog.5, ChangeLog, ChangeLog.lib, FSFChangeLog.10, ONEWS,
	c-common.c, caller-save.c, cfg.c, cfgcleanup.c, cfgrtl.c,
	collect2.c, df.h, diagnostic.h, final.c, gcse.c, gthr.h,
	haifa-sched.c, jump.c, local-alloc.c, profile.c, protoize.c,
	regmove.c, reload1.c, rtlanal.c, sched-vis.c, ssa.c, stmt.c,
	system.h, toplev.c: Fix spelling errors.

From-SVN: r46580
2001-10-28 12:42:06 +00:00
Richard Kenner
157bd2bb7d * gcse.c (insert_insn_end_bb): Don't assume PAT is a SET.
From-SVN: r46574
2001-10-27 22:34:18 -04:00
Stan Shebs
b36948478c alias.c: Remove uses of "register" specifier in declarations of arguments and local...
2001-10-10  Stan Shebs  <shebs@apple.com>

        * alias.c: Remove uses of "register" specifier in declarations
        of arguments and local variables.
        * c-common.c: Ditto.
        * c-convert.c: Ditto.
        * c-decl.c: Ditto.
        * c-format.c: Ditto.
        * c-semantics.c: Ditto.
        * c-typeck.c: Ditto.
        * caller-save.c: Ditto.
        * calls.c: Ditto.
        * cfg.c: Ditto.
        * cfgbuild.c: Ditto.
        * cfgrtl.c: Ditto.
        * collect2.c: Ditto.
        * combine.c: Ditto.
        * convert.c: Ditto.
        * cppexp.c: Ditto.
        * cppfiles.c: Ditto.
        * cse.c: Ditto.
        * dbxout.c: Ditto.
        * defaults.h: Ditto.
        * df.c: Ditto.
        * dwarf2out.c: Ditto.
        * dwarfout.c: Ditto.
        * emit-rtl.c: Ditto.
        * explow.c: Ditto.
        * expmed.c: Ditto.
        * expr.c: Ditto.
        * final.c: Ditto.
        * fix-header.c: Ditto.
        * floatlib.c: Ditto.
        * flow.c: Ditto.
        * fold-const.c: Ditto.
        * function.c: Ditto.
        * gcc.c: Ditto.
        * gcse.c: Ditto.
        * gen-protos.c: Ditto.
        * genattrtab.c: Ditto.
        * gencheck.c: Ditto.
        * genconfig.c: Ditto.
        * genemit.c: Ditto.
        * genextract.c: Ditto.
        * genflags.c: Ditto.
        * gengenrtl.c: Ditto.
        * genoutput.c: Ditto.
        * genpeep.c: Ditto.
        * genrecog.c: Ditto.
        * gensupport.c: Ditto.
        * global.c: Ditto.
        * gmon.c: Ditto.
        * graph.c: Ditto.
        * haifa-sched.c: Ditto.
        * hard-reg-set.h: Ditto.
        * hash.c: Ditto.
        * integrate.c: Ditto.
        * jump.c: Ditto.
        * lists.c: Ditto.
        * local-alloc.c: Ditto.
        * loop.c: Ditto.
        * mips-tdump.c: Ditto.
        * mips-tfile.c: Ditto.
        * optabs.c: Ditto.
        * prefix.c: Ditto.
        * print-rtl.c: Ditto.
        * read-rtl.c: Ditto.
        * real.c: Ditto.
        * recog.c: Ditto.
        * reg-stack.c: Ditto.
        * regclass.c: Ditto.
        * regmove.c: Ditto.
        * reload.c: Ditto.
        * reload1.c: Ditto.
        * reorg.c: Ditto.
        * resource.c: Ditto.
        * rtl.c: Ditto.
        * rtlanal.c: Ditto.
        * scan.c: Ditto.
        * sched-deps.c: Ditto.
        * sched-rgn.c: Ditto.
        * sdbout.c: Ditto.
        * simplify-rtx.c: Ditto.
        * stmt.c: Ditto.
        * stor-layout.c: Ditto.
        * toplev.c: Ditto.
        * tradcif.y: Ditto.
        * tradcpp.c: Ditto.
        * tree.c: Ditto.
        * unroll.c: Ditto.
        * varasm.c: Ditto.
        * xcoffout.c: Ditto.

From-SVN: r46173
2001-10-11 03:16:15 +00:00
Kazu Hirata
6d2f888735 calls.c: Fix formatting.
* calls.c: Fix formatting.
	* c-decl.c: Likewise.
	* cfgcleanup.c: Likewise.
	* combine.c: Likewise.
	* cppfiles.c: Likewise.
	* cpplib.c: Likewise.
	* cppmacro.c: Likewise.
	* crtstuff.c: Likewise.
	* cse.c: Likewise.
	* dwarf2out.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* ggc-page.c: Likewise.
	* integrate.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* reload1.c: Likewise.
	* reload.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* sched-rgn.c: Likewise.
	* sdbout.c: Likewise.
	* stmt.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r46145
2001-10-10 11:33:39 +00:00
Kazu Hirata
4fe9b91c45 c-common.c: Fix comment typos.
* c-common.c: Fix comment typos.
	* cfgrtl.c: Likewise.
	* collect2.c: Likewise.
	* cpplex.c: Likewise.
	* doloop.c: Likewise.
	* dwarf2out.c: Likewise.
	* dwarfout.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* gcc.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* global.c: Likewise.
	* ifcvt.c: Likewise.
	* loop.c: Likewise.
	* optabs.c: Likewise.
	* protoize.c: Likewise.
	* regclass.c: Likewise.
	* reorg.c: Likewise.
	* rtl.h: Likewise.
	* stmt.c: Likewise.
	* tree.h: Likewise.
	* doc/cpp.texi: Likewise.
	* doc/c-tree.texi: Likewise.
	* doc/extend.texi: Likewise.
	* doc/invoke.texi: Likewise.
	* doc/objc.texi: Likewise.
	* doc/tm.texi: Likewise.

From-SVN: r46114
2001-10-09 06:03:16 +00:00
Jan Hubicka
49ce134fee gcse.c (replace_store_insn): Use delete_insn.
* gcse.c (replace_store_insn): Use delete_insn.
	* loop.c (move_movables): Likewise; avoid delete_insn
	from clobbering notes moved elsewhere.
	(check_dbra_loop): Use delete_insn.
	* ssa.c (convert_from_ssa): Likewise.
	* cse.c (cse_insn): Use delete_insn.

From-SVN: r45859
2001-09-28 13:01:41 +00:00
Jan Hubicka
ca6c03cabd Makefile.in (cfgrtl.o): Add.
* Makefile.in (cfgrtl.o): Add.
	* basic-block.h (alloc_block, alloc_aux_for_block, alloc_aux_for_blocks,
	free_aux_for_block, alloc_aux_for_edge, alloc_aux_for_edges,
	free_aux_for_edge): Declare.
	* cfg.c
	(HAVE_return): Undefine.
	* basic-block.h (alloc_block, alloc_aux_for_block, alloc_aux_for_blocks,
	free_aux_for_block, alloc_aux_for_edge, alloc_aux_for_edges,
	free_aux_for_edge): New global functions.
	(first_delete_block): New static variable.
	(init_flow): Clear first_delete_block.
	(basic_block_for_insn, label_value_list, tail_recursion_label_list,
	 can_delete_note_p, can_delete_label_p, commit_one_edge_insertion,
	 try_redirect_by_replacing_jump, last_loop_beg_note,
	 back_edge_of_syntactic_loop_p, force_nonfallthru_and_redirect,
	 delete_insn, delete_insn_chain, create_basic_block_structure,
	 create_basic_block, flow_delete_block, compute_bb_for_insn,
	 free_bb_for_insn, update_bb_for_insn, set_block_for_insn,
	 set_block_for_new_insns, split_block, merge_blocks_nomove,
	 block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
	 redirect_edge_and_branch, force_nonfallthru_and_redirect,
	 force_nonfallthru, redirect_edge_and_branch_force, tidy_fallthru_edge,
	 tidy_fallthru_edges, split_edge, insert_insn_on_edge,
	 commit_one_edge_insertion, commit_edge_insertions, dump_bb, debug_bb,
	 debug_bb_n, print_rtl_with_bb, verify_flow_info, purge_dead_edges,
	 purge_all_dead_edges): Move to ....
	* cfgrtl.c: New file; .... Here.

	* bb-reorder.c (fixup_reorder_chain): Use alloc_aux_for_block.
	(reroder_basic_block): Use alloc_aux_for_blocks.
	* predict.c (estimate_bb_frequencies): Likewise; use
	alloc_aux_for_edges.
	* profile.c (compute_branch_probabilities): Likewise.
	(branch_prob): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.

	* emit-rtl.c (emit_insns_after): Never return NULL.

	* basic-block.h (set_block_for_new_insns): Delete.
	* cfgrtl.c (set_block_for_new_insns): Delete.

	* cfgcleanup.c (try_optimize_cfg): Add fake exit edges for noreturn
	calls when crossjumping.

	* cfgcleanup.c (try_simplify_condjump): Cleanup invert_jump call.
	* unroll.c (copy_loop_body): Use delete_insn.

	* final.c (final, final_scan_insn): Use delete_insn/delete_note.
	* function.c (fixup_var_refs_insn, fixup_var_refs_1,
	keep_stack_depressed): Likewise.
	* gcse.c (cprop_cc0_jump): Likewise.
	* local-alloc.c (update_equiv_regs): Likewise.
	* loop.c (scan_loop, loop_delete_insns): Likewise.
	* regmove.c (try_auto_increment, fixup_match_1): Likewise.
	* reload1.c (reload, calculate_needs_all_insns, reload_as_needed,
	delete_output_reload, delete_address_reloads_1,
	reload_cse_delete_noop_set, reload_combine, reload_cse_move2add):
	Likewise.
	* sibcall.c (replace_call_placeholder): Likewise.
	* cse.c (cse_insn): Likewise.

From-SVN: r45807
2001-09-25 15:26:55 +00:00
Jan Hubicka
53c170316f basic-block.h (flow_delete_insn, [...]): Kill.
* basic-block.h (flow_delete_insn, flow_delete_insn_chain): Kill.
	* cfg.c (delete_insn): Rename from ....; use remove_insn; do not
	remove some labels.
	(flow_delete_insn): This one.
	(delete_insn_chain): Rename from ...; do not care labels.
	(flow_delete_insn_chain): ... this one.
	(flow_delete_block): Remove the insns one BB has been expunged.
	(merge_blocks_nomove): Likewise.
	(try_redirect_by_replacing_jump): Use delete_insn[_chain]; do not care
	updating BB boundaries.
	(tidy_fallthru_edge): Likewise.
	(commit_one_edge_insertion): Likewise.
	* cfgbuild.c (find_basic_block): Likewise.
	(find_basic_blocks_1): Likewise.
	* cfgcleanup.c (merge_blocks_move_predecessor_nojumps): Likewise.
	(try_crossjump_to_edge): Likewise.
	(try_optimize_cfg): Likewise.
	* cse.c (delete_trivially_dead_insns): Likewise.
	* df.c (df_insn_delete): Likewise.
	* doloop.c (doloop_modify): Use delete_related_insns.
	* emit-rtl.c (try_split): Likewise.
	(remove_insn): Update BB boundaries.
	* expect.c (connect_post_landing_pads): Use delete_related_insns.
	* flow.c (delete_dead_jumptables): Use delete_insn[_chain]; do not care
	updating BB boundaries.
	(propagate_block_delete_insn): Likewise.
	(propagate_block_delete_libcall): Likewise.
	* function.c (delete_handlers): Use delete_related_insns.
	(thread_prologue_and_epilogue_insns): Likewise.
	* gcse.c (delete_null_pointer_checks): Use delete_related_insns.
	* genpeep.c (gen_peephole): Use delete_related_insns.
	* ifcvt.c (noce_process_if_block): Use delete_insn; do not care updating
	BB boundaries.
	(find_cond_trap): Likewise.
	* integrate.c (save_for_inline): Use delete_related_insns.
	(copy_insn_list): Likewise.
	* jump.c (pruge_linie_number_notes): Likewise.
	(duplicate_loop_exit_test): Likewise.
	(delete_computation): Likewise.
	(delete_related_insn): Rename from ...; use delete_insn
	(delete_insn): ... this one.
	(redirect_jump): Use delete_related_insns.
	* loop.c (scan_loop): Likewise.
	(move_movables): Likewise.
	(find_and_verify_loops): Likewise.
	(check_dbra_loop): Likewise.
	* recog.c (peephole2_optimize): Likewise.
	* reg-stack.c (delete_insn_for_stacker): Remove.
	(move_for_stack_reg): Use delete_insn.
	* regmove.c (combine_stack_adjustments_for_block): Likewise.
	* reload1.c (delete_address_reloads): Use delete_related_insns.
	(fixup_abnormal_edges): Use delete_insn.
	* recog.c (emit_delay_sequence): Use delete_related_insns.
	(delete_from-delay_slot): Likewise.
	(delete_scheduled_jump): likewise.
	(optimize_skip): Likewise.
	(try_merge_delay_insns): Likewise.
	(full_simple_delay_slots): Likewise.
	(fill_slots_from_thread): Likewise.
	(relax_delay_slots): Likewise.
	(make_return_insns): Likewise.
	(dbr_schedule): Likewise.
	* rtl.h (delete_insn): Rename to delete_related_insns.
	(delete_insn, delete_insn_chain): New prototypes.
	* ssa-ccp (sse_fast_dce):  Remove deleting of DEF, as it is done
	by df_insn_delete already.
	* ssa-dce.c (delete_insn_bb): Use delete_insn.
	* ssa.c (convert_from_ssa): Use delete_related_insns.
	* unroll.c (unroll_loop): Likewise.
	(calculate_giv_inc): Likewise.
	(copy_loop_body): Likewise.

	* i386-protos.h (ix86_libcall_value, ix86_function_value,
	ix86_function_arg_regno_p, ix86_function_arg_boundary,
	ix86_return_in_memory, ix86_function_value): Declare.
	* i386.c (x86_64_int_parameter_registers, x86_64_int_return_registers):
	new static valurables.
	(x86_64_reg_class): New enum
	(x86_64_reg_class_name): New array.
	(classify_argument, examine_argument, construct_container,
	 merge_classes): New static functions.
	(optimization_options): Enable flag_omit_frame_pointer and disable
	flag_pcc_struct_return on 64bit.
	(ix86_libcall_value, ix86_function_value,
	ix86_function_arg_regno_p, ix86_function_arg_boundary,
	ix86_return_in_memory, ix86_function_value): New global functions.
	(init_cumulative_args): Refuse regparm on x86_64, set maybe_vaarg.
	(function_arg_advance): Handle x86_64 passing conventions.
	(function_arg): Likewise.
	* i386.h (FUNCTION_ARG_BOUNDARY): New macro.
	(RETURN_IN_MEMORY): Move offline.
	(FUNCTION_VALUE, LIBCALL_VALUE): Likewise.
	(FUNCTION_VALUE_REGNO_P): New macro.
	(FUNCTION_ARG_REGNO_P): Move offline.
	(struct ix86_args): Add maybe_vaarg.
	* next.h (FUNCTION_VALUE_REGNO_P): Delete.
	* unix.h (FUNCTION_VALUE_REGNO_P): Delete.

From-SVN: r45726
2001-09-21 12:55:18 +00:00
Jan Hubicka
3c030e88e7 basic-block.h (free_bb_for_insn): Declare.
* basic-block.h (free_bb_for_insn): Declare.
	* bb-reorder.c (label_for_bb): Use block_label.
	(emit_jump_to_block_after): Remove.
	(insert_intra_1): Do not update block_for_insn.
	(insert_inter_bb_scope_notes): Likewise; update bb->end
	* cfg.c (free_bb_for_insn): New.
	(try_rediret_by_replacing_jump): Avoid set_block_for_new_insns call.
	(force_nonfallthru_and_redirect): Likewise; do not update BB boundaries.
	(commit_one_edge_insertion): Likewise.
	(commit_one_edge_insertion): Do not update BB boundary.
	(commit_edge_insertions): Do not call compute_bb_for_insn.
	* cfgbuild.c (find_basic_blocks): Do not free basic_block_for_insn.
	* cfgcleanup.c (merge_blocks_move_predecessor): Use reorder_insns_nobb.
	(merge_blocks_move_successor_nojumps): Likewise.
	(try_crossjump_to_edge): Do not update block_for_insn.
	* combine.c (combine_instructions): Remove compute_bb_for_insn call.
	* df.c (df_pattern_emit_later): Do not update BB boundary.
	(df_jump_pattern_emit_after): Likewise.
	(df_insn_move_before): Use emit_insn_before.
	* emit-rtl.c (try_split): Emit after trial to get bb boundary updated
	 properly.
	(add_insn_after, add_insn_before, emit_insns_after): Update BB
	boundaries and basic_block_for_insn.
	(reorder_insns_nobb): Rename from reorder_insns.
	(reorder_insns): New.
	(emit_block_insn_before, emit_block_insn_after): Kill.
	* flow.c (check_function_return_warnings): Do not call
	compute_bb_for_insn; Do not free basic_block_for_insn.
	(attempt_auto_inc): Do not update basic_block_for_insn.
	* function.c (emit_return_into_block): Likewise;
	do not update BB boundaries.
	* gcse.c (handle_avail_expr): Do not update basic_block_for_insn.
	(insert_insn_end_bb): Use emit_insn_before; Likewise.
	(pre_insert_copy_insn): Likewise.
	(update_ld_motion_notes): Likewise.
	(insert_insn_start_bb): Likewise.
	(replace_store_insn): Likewise.
	* ifcvt.c (noce_process_if_block): Likewise.
	(if_convert): Do not call compute_bb_for_insn.
	* lcm.c (optimize_mode_switching): Do not update BB boundaries.
	Use emit_insn_before and emit_insn_after.
	* recog.c (split_all_insns): Do not update BB boundaries;
	Do not call compute_bb_for_insn.
	(peephole2_optimize): Do not update BB boundaries.
	* reg-stack.c (emit_pop_insn): Use emit_insn_after and
	emit_insn_before.
	(emit_swap_insn): Likewise.
	(convert_regs_1): Likewise.
	* reload1.c (reload): Call compute_bb_for_insn.
	* rtl.h (reorder_insns_nobb): Declare.
	* ssa.c (rename_equivalent_regs): Use emit_insn_before.
	* toplev.c (rest_of_compilation): Call free_bb_for_insn
	at places CFG is invalidated; do not call compute_bb_for_insn.

	* cfg.c (expunge_block): Invalidate BB structure.

	* (merge_blocks_nomove): Update properly BLOCK_FOR_INSN
	array.

	* cfg.c (verify_flow_info): Verify the basic_block_for_insn array.

From-SVN: r45647
2001-09-16 20:21:30 +00:00
Andreas Jaeger
6b8c9327ed gcse.c (add_label_notes): REG_LABEL is an INSN_LIST.
* gcse.c (add_label_notes): REG_LABEL is an INSN_LIST.
	* loop.c (add_label_notes): Likewise.
	* reload.c (find_reloads): Likewise.
	* config/sh/sh.c (machine_dependent_reorg): Likewise.

From-SVN: r45320
2001-08-31 16:49:37 +02:00
Andrew MacLeod
c63b1ae8a1 gcse.c (compute_hash_table): The SRC part of an insn with a RETVAL note should not be considered outside the...
2001-08-29  Andrew MacLeod  <amacleod@redhat.com>

	* gcse.c (compute_hash_table): The SRC part of an insn with a RETVAL
	note should not be considered outside the libcall block.

From-SVN: r45276
2001-08-29 21:43:41 +00:00
Roman Zippel
80c29cc437 gcse.c (reg_first_set, [...]): Replace with ...
* gcse.c (reg_first_set, reg_last_set): Replace with ...
        (reg_avail_info, current_bb): ... these.
        (oprs_unchanged_p, record_last_reg_set_info): Use them.
        (compute_hash_table): Likewise.

Co-Authored-By: Richard Henderson <rth@redhat.com>

From-SVN: r45213
2001-08-27 15:01:07 -07:00
Lars Brinkhoff
1322177dbd Makefile.in, [...]: replace "GNU CC" with "GCC".
* Makefile.in, alias.c, basic-block.h, bb-reorder.c, bitmap.c,
	bitmap.h, builtin-types.def, builtins.c, builtins.def,
	c-aux-info.c, c-common.c, c-common.def, c-common.h,
	c-convert.c, c-decl.c, c-dump.c, c-dump.h, c-errors.c,
	c-format.c, c-lang.c, c-lex.c, c-lex.h, c-parse.in,
	c-pragma.c, c-pragma.h, c-semantics.c, c-tree.h, c-typeck.c,
	caller-save.c, calls.c, collect2.c, collect2.h, combine.c,
	conditions.h, config.gcc, configure.frag, configure.in,
	conflict.c, convert.c, convert.h, cppspec.c, crtstuff.c,
	cse.c, cselib.c, cselib.h, dbxout.c, dbxout.h, defaults.h,
	dependence.c, df.c, df.h, diagnostic.c, diagnostic.h,
	doloop.c, dominance.c, dwarf.h, dwarf2.h, dwarf2asm.c,
	dwarf2asm.h, dwarf2out.c, dwarf2out.h, dwarfout.c,
	emit-rtl.c, errors.c, errors.h, except.c, except.h,
	exgettext, explow.c, expmed.c, expr.c, expr.h, final.c,
	fixproto, flags.h, flow.c, fold-const.c, fp-test.c,
	function.c, function.h, gbl-ctors.h, gcc.c, gcc.h, gcc.hlp,
	gccspec.c, gcov-io.h, gcse.c, genattr.c, genattrtab.c,
	gencheck.c, gencodes.c, genconfig.c, genemit.c,
	genextract.c, genflags.c, gengenrtl.c, genmultilib,
	genopinit.c, genoutput.c, genpeep.c, genrecog.c,
	gensupport.c, gensupport.h, ggc-callbacks.c, ggc-common.c,
	ggc-none.c, ggc-page.c, ggc-simple.c, ggc.h, global.c,
	graph.c, graph.h, gthr-aix.h, gthr-dce.h, gthr-posix.h,
	gthr-rtems.h, gthr-single.h, gthr-solaris.h, gthr-vxworks.h,
	gthr-win32.h, gthr.h, haifa-sched.c, halfpic.c, halfpic.h,
	hard-reg-set.h, hwint.h, ifcvt.c, input.h, insn-addr.h,
	integrate.c, integrate.h, jump.c, lcm.c, libgcc2.c,
	libgcc2.h, lists.c, local-alloc.c, loop.c, loop.h,
	machmode.def, machmode.h, main.c, mbchar.c, mbchar.h,
	mips-tdump.c, mips-tfile.c, mklibgcc.in, mkmap-flat.awk,
	mkmap-symver.awk, optabs.c, output.h, params.c, params.def,
	params.h, predict.c, predict.def, predict.h, prefix.c,
	prefix.h, print-rtl.c, print-tree.c, profile.c, protoize.c,
	read-rtl.c, real.c, real.h, recog.c, recog.h, reg-stack.c,
	regclass.c, regmove.c, regrename.c, regs.h, reload.c,
	reload.h, reload1.c, reorg.c, resource.c, resource.h, rtl.c,
	rtl.def, rtl.h, rtlanal.c, sbitmap.c, sbitmap.h,
	sched-deps.c, sched-ebb.c, sched-int.h, sched-rgn.c,
	sched-vis.c, sdbout.c, sdbout.h, sibcall.c, simplify-rtx.c,
	ssa-ccp.c, ssa-dce.c, ssa.c, ssa.h, stmt.c, stor-layout.c,
	stringpool.c, system.h, timevar.c, timevar.def, timevar.h,
	tlink.c, toplev.c, toplev.h, tree.c, tree.def, tree.h,
	tsystem.h, unroll.c, unwind-dw2-fde.c, unwind-dw2-fde.h,
	unwind-dw2.c, unwind-pe.h, unwind-sjlj.c, unwind.h,
	unwind.inc, varasm.c, varray.c, varray.h, xcoffout.c,
	xcoffout.h: replace "GNU CC" with "GCC".

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Geoffrey Keating
eb296bd9be gcse.c (hash_scan_set): Expressions that are set as part of jump instructions are not available.
* gcse.c (hash_scan_set): Expressions that are set as part of
	jump instructions are not available.

From-SVN: r44872
2001-08-13 21:42:10 +00:00
Kazu Hirata
dc297297ea gcc.c: Fix comment formatting.
* gcc.c: Fix comment formatting.
	* gccspec.c: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.
	* genemit.c: Likewise.
	* gengenrtl.c: Likewise.
	* genrecog.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-page.c: Likewise.
	* global.c: Likewise.
	* graph.c: Likewise.
	* ifcvt.c: Likewise.
	* integrate.c: Likewise.
	* lcm.c: Likewise.
	* libgcc2.c: Likewise.
	* loop.c: Likewise.
	* mbchar.c: Likewise.
	* optabs.c: Likewise.
	* predict.c: Likewise.
	* prefix.c: Likewise.
	* profile.c: Likewise.
	* protoize.c: Likewise.
	* real.c: Likewise.
	* recog.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* reg-stack.c: Likewise.
	* reload1.c: Likewise.
	* resource.c: Likewise.
	* rtlanal.c: Likewise.
	* rtl.c: Likewise.

From-SVN: r44837
2001-08-12 23:40:53 +00:00
Zack Weinberg
19652adf82 calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY if not already defined.
* calls.c, function.c: Always define PREFERRED_STACK_BOUNDARY
	if not already defined.  Remove all #ifdefs on STACK_BOUNDARY;
	this macro is now required.

	* cselib.c (cselib_process_insn), flow.c (propagate_block),
	loop.c (find_and_verify_loops), reload.c (reload): Check
	for rtx code of CALL_INSN, not CALL, when deciding if we
	need to check for REG_SETJMP note.

	* gcse.c (compute_hash_table, compute_store_table): Update
	the #ifdef NON_SAVING_SETJMP code to the new REG_SETJMP
	logic.

	* config/avr/avr.c: Fix typo.
	* config/convex/convex.c (expand_movstr): Use adjust_address.
	* config/dsp16xx/dsp16xx.c: Define dsp16xx_compare_gen
	variable.
	* config/dsp16xx/dsp16xx.md: Correct calls to replace_equiv_address.
	* config/elxsi/elxsi.c: Include tree.h, expr.h, regs.h, and flags.h.
	Fix typo.
	* config/elxsi/elxsi.h: Don't define Rmode (typo for Pmode?)
	Do define STACK_BOUNDARY.
	* config/i370/i370.c: Include expr.h.
	* config/i860/sysv3.h, config/i860/sysv4.h, config/m32r/m32r.h,
	config/pa/som.h, config/v850/v850.h: Take in_ctors and
	in_dtors out of EXTRA_SECTIONS; take CTORS_SECTION_FUNCTION
	and DTORS_SECTION_FUNCTION out of EXTRA_SECTION_FUNCTIONS.
	* config/m88k/m88k.c: Include c-tree.h after expr.h.
	* config/pdp11/pdp11.c: Include expr.h and toplev.h.
	* config/romp/romp.c: Include expr.h after tree.h.
	Include toplev.h.
	(output_fpop): Use xmalloc, not oballoc.
	* config/we32k/we32k.c: Include expr.h.

From-SVN: r44768
2001-08-10 16:19:22 +00:00
Jan Hubicka
24a2858412 alias.c (nonlocal_mentioned_p): Rename CONST_CALL_P to CONST_OR_PURE_CALL_P
* alias.c (nonlocal_mentioned_p):
	Rename CONST_CALL_P to CONST_OR_PURE_CALL_P
	* calls.c (emit_call_1): Likewise.
	* cse.c (cse_insn, invalidate_skipped_block): Likewise.
	* cselib.c (cselib_process_insn): Likewise.
	* df.c (df_insns_modify): Likewise.
	* flow.c (need_fake_edge_p): Likewise.
	(propagate_one_insn): Likewise.
	* haifa-sched.c (reemit_notes): Likewise.
	* integrate.c (copy_insn_list): Likewise.
	* jump.c (delete_prior_computation): Likewise.
	* local-alloc.c (validate_equiv_mem): Likewise.
	* loop.c (scan_loop): Likewise.
	* predict.c (estimate_probability): Likewise.
	* reload.c (reload): Likewise.
	* sched-deps (sched_analyze): Likewise.
	* rtl.h (CONST_CALL_P): rename to CONST_OR_PURE_CALL_P.
	* gcse.c (compute_hash_table): Likewise.
	(mark_call): Likewise.
	(store_killed_in_insn): Likewise.

From-SVN: r44688
2001-08-07 12:59:58 +00:00
Andreas Jaeger
aaa4ca30d8 As requested by Daniel Berlin since bootstrapping on i686-linux-gnu fails:
As requested by Daniel Berlin since bootstrapping on i686-linux-gnu
	fails:
	* gcse.c: Revert Daniel's last patch.

From-SVN: r44626
2001-08-04 08:08:00 +02:00
Daniel Berlin
adfcce6198 gcse.c: Include df.h for use as a dataflow analyzer.
2001-07-16  Daniel Berlin  <dan@cgsoftware.com>

        * gcse.c: Include df.h for use as a dataflow analyzer.
        Remove regvec.
        Declaration of reg_set_info: gone.
        New df_analyzer variable used by store motion.
        (reg_set_info): Deleted.
        (mark_mem_regs): New function, analyze regs used by a mem.
        (store_ops_ok): Use dataflow analyzer results to determine if
        necessary regs are changed in the block.
        (find_moveable_store): Remove check for symbol ref, we can handle
        much more complex expressions now.
        (compute_store_table): Remove most of the code, it's unnecessary
        now that the dataflow analyzer records the info for us.
        (store_killed_after): Add parameter to say whether to do the
        store_ops_okay test, used to speed up testing when we already know
        the answer, and just want to know if the store itself was killed.
        (build_store_vector): Largely rewritten to calculate the various
        vectors properly, and somewhat optimized.
        (store_motion): Init the df_analyzer, get REG_DEF chains.
        Also handle trapping expressions (since mems almost always trap)
        (simple_mem): Redefine what a simple mem is.

From-SVN: r44603
2001-08-03 16:52:01 +00:00
Andreas Jaeger
57cb6d521a jump.c: Add prototype for mark_modified_reg.
* jump.c: Add prototype for mark_modified_reg.

        * cse.c (set_live_p): Add unused attribute.

        * gcov.c (calculate_branch_probs): Use gcov_type to avoid
        overflow.
        (scan_for_source_files): Use long for count to avoid overflow.
        (output_data): Likewise.
        (output_data): Don't use string concatatenation to silence gcc
        -traditional.

        * predict.c: Fix typos and grammar.

        * gcse.c (insert_insn_end_bb): Remove unused variables.

For cp:
        * decl2.c: Remove unused var global_temp_name_counter.

From-SVN: r44479
2001-07-30 20:04:33 +02:00
Jan Hubicka
833366d6c9 rtlanal.c (parms_set, [...]): Break out from...; handle multiple sets.
* rtlanal.c (parms_set, find_first_parameter_load): Break out from...;
	handle multiple sets.
	* except.c (sjlj_mark_call_sites): .... here.
	* gcse.c (insert_insn_end_bb): Use find_first_parameter_load.

From-SVN: r44465
2001-07-29 21:28:42 +00:00
Jan Hubicka
21715220d5 * gcse.c (cprop_insn): Update call of cprop_cc0_jump.
From-SVN: r44282
2001-07-23 21:35:26 +00:00
Jan Hubicka
0005550b58 basic-block.h (find_sub_basic_block): Declare.
* basic-block.h (find_sub_basic_block): Declare.
	* flow.c (make_edges): New arguments MIN and MAX;
	(find_sub_basic_blocks): Revamp to use make_edges
	and purge_dead_edges.
	(find_basic_blocks): Update call of find_sub_basic_block.

	* recog.c (split_all_insns): Always expect CFG to be consistent;
	call find_sub_basic_blocks in case something has changed.
	* toplev.c (rest_of_compilation): Always call split_all_insns once CFG
	has been built.

	* basic-block.h (delete_noop_moves): Declare.
	* combine.c (combine_instructions): Call it.
	(recog_for_combine): Tolerate noop moves
	(distribute_notes): Force refresh when register dies at noop move.
	* flow.c (delete_noop_moves): Use BB structure; delete JUMP insns
	too.
	(life_analysis): Update delete_noop_moves call.
	(set_noop_p): Move too ...
	* rtlanal.c (noop_move_p): ... here.
	* rtl.h (noop_move_p): Declare.

	* basic-block.h (purge_all_dead_edges, purge_dead_edges): New functions.
	* toplev.c (rest_of_compilation): Conditionally call purge_all_dead_edges
	after combine.
	* gcse.c (cprop_cc0_jump, cprop_insn): New argument "basic_block".
	(cprop_jump): Likewise; call purge_dead_edges if substitution suceeded.

From-SVN: r44267
2001-07-23 14:08:12 +00:00
Jan Hubicka
222f7ba9a4 * gcse.c (pre_insert_copy_insn): Call update_ld_motion_stores.
From-SVN: r44111
2001-07-18 16:29:50 +00:00
Daniel Berlin
ccef9ef510 gcse.c: Update comment at top.
* gcse.c: Update comment at top.
        Update comment on mem handling.
        mem_last_set, mem_first_set, mem_set_in_block: gone.
        Declaration of reg_set_info: gone.
        (oprs_unchanged_p): Don't use mem_*set_* anymore. They are
        pointless with load_killed_in_block_p (they are *more*
        conservative then it, not less, and less accurate).
        (oprs_not_set_p): Ditto.
        (alloc_gcse_mem): Don't allocate mem_set_in_block
        (free_gcse_mem): Don't free it, either.
        (record_last_mem_set_info): Update comment in front, remove
        mem_*set_* stuff. Note the reason we don't handle stores directly
        here.
        (compute_hash_table): Update comments to reflect reality. Remove
        mem_*set_* references.
        (reset_opr_set_tables): Remove mem_*set_* references.
        (mark_call): Ditto.
        (mark_set): Ditto.  Also remove double sets of bitmaps for REG's.
        (mark_clobber): Ditto (on both parts, we double set here too).
        (expr_killed_p): Remove mem_set_in_block test.
        (compute_transp): Remove mem_set_in_block test.

From-SVN: r44055
2001-07-16 14:02:08 -06:00
Richard Henderson
4e2db58460 hard-reg-set.h (regs_invalidated_by_call): Declare.
* hard-reg-set.h (regs_invalidated_by_call): Declare.
        * regclass.c (regs_invalidated_by_call): Move from cse.c.
        (init_reg_sets_1): Move initialization from cse_main.
        * cse.c (regs_invalidated_by_call): Move to regclass.c.
        (cse_main): Move its initialization also.
        * df.c (df_insn_refs_record): Use regs_invalidated_by_call.
        * flow.c (propagate_one_insn): Likewise.
        * gcse.c (compute_hash_table): Likewise.
        (compute_kill_rd, compute_store_table): Likewise.
        * sched-deps.c (sched_analyze_1): Likewise.

From-SVN: r44053
2001-07-16 10:54:34 -07:00
J"orn Rennecke
cccf0ae876 gcse.c (pre_insert_copy_insn): Use gen_move_insn instead of gen_rtx_SET.
* gcse.c (pre_insert_copy_insn): Use gen_move_insn instead of
	gen_rtx_SET.

From-SVN: r44048
2001-07-16 18:18:48 +01:00
Daniel Berlin
5a660bff9a gcse.c, [...]: s/free on sbitmap vectors/sbitmap_vector_free on sbitmap vectors/g
* gcse.c, lcm.c, sched-deps.c:
        s/free on sbitmap vectors/sbitmap_vector_free on sbitmap vectors/g

        * flow.c (flow_loops_find): Free dom if we found no loops, since
        we aren't going to save it.

        * lcm.c (pre_edge_rev_lcm): Free st_antin, st_antout when we are
        done.

From-SVN: r43938
2001-07-11 10:11:47 -06:00
Daniel Berlin
740f35a0a1 invoke.texi: Add description of max-gcse-passes param.
2001-06-26  Daniel Berlin  <dan@cgsoftware.com>

	* doc/invoke.texi: Add description of max-gcse-passes param.

	* gcse.c (gcse_main): Use MAX_GCSE_PASSES instead of MAX_PASSES.
	(MAX_PASSES): Remove now unneeded macro.

	* params.h (MAX_GCSE_PASSES): New macro, to get parameter value of
	max-gcse-passes param.

	* params.def (PARAM_MAX_GCSE_PASSES): New parameter, controlling
	maximum number of GCSE passes to run. Defaults to 1 (which is what
	MAX_PASSES in gcse.c used to be).

From-SVN: r43610
2001-06-27 14:35:24 +00:00
Jan Hubicka
0631e0bfb7 rtlanal.c (operand_preference): Fix preference for objects.
* rtlanal.c (operand_preference): Fix preference for objects.

	* gcse.c (handle_avail_expr): Be prepared to handle single_set
	parallels.

	* combine.c (if_then_else_cond): Use simplify_subreg instead
	of operand_subword.
	* integreate.c (sub_constants): Likewise.

	* emit-rtl.c (constant_subword): Deprecate; remove most of code
	and use simplify_gen_subreg.

Mon Jun  4 19:55:23 CEST 2001  Lars Brinkhoff  <lars@nocrew.org>

	* sibcall.c (skip_copy_to_return_value): recognize the situation
	when the called function's return value is copied into an
	intermediate pseudo, and then into the calling functions return
	value register.

From-SVN: r42864
2001-06-04 18:04:36 +00:00
Jan Hubicka
9e71c818a1 gcse.c (try_replace_reg): First try global replace, later try to simplify the expression.
* gcse.c (try_replace_reg): First try global replace, later try to
	simplify the expression.

	* gcse.c (find_used_regs): Change calling convention; work via
	note_uses.
	(cprop_insn): Update call of find_used_regs; work for CALL_INSNs too.

From-SVN: r42264
2001-05-18 13:43:27 +00:00
Jeffrey A Law
8598a9a232 gcse.c (insert_insn_end_bb): Do not search for assignments to non-argumment registers that are mentioned in...
* gcse.c (insert_insn_end_bb): Do not search for assignments to
        non-argumment registers that are mentioned in CALL_INSN_FUNCTION_USAGE.

From-SVN: r41976
2001-05-11 16:07:58 -06:00
Kaveh R. Ghazi
9714cf4399 c-lex.c: NULL_PTR -> NULL.
* c-lex.c: NULL_PTR -> NULL.
	* cse.c: Likewise.
	* emit-rtl.c: Likewise.
	* gcse.c: Likewise.
	* genpeep.c: Likewise.
	* jump.c: Likewise.
	* mips-tdump.c: Likewise.
	* reload1.c: Likewise.
	* rtlanal.c: Likewise.
	* stmt.c: Likewise.
	* stor-layout.c: Likewise.
	* toplev.c: Likewise.

From-SVN: r41761
2001-05-02 14:31:45 +00:00
Kaveh R. Ghazi
6496a589df bitmap.c: Change NULL_PTR to NULL or "(rtx*)0".
* bitmap.c: Change NULL_PTR to NULL or "(rtx*)0".
	* c-common.c: Likewise.
	* c-decl.c: Likewise.
	* combine.c: Likewise.
	* rs6000.c: Likewise.
	* except.c: Likewise.
	* explow.c: Likewise.
	* expr.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* gcc.c: Likewise.
	* gcse.c: Likewise.
	* integrate.c: Likewise.
	* loop.c: Likewise.
	* objc/objc-act.c: Likewise.
	* recog.c: Likewise.
	* reg-stack.c: Likewise.
	* reload.c: Likewise.
	* reload1.c: Likewise.
	* simplify-rtx.c: Likewise.
	* stmt.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r41722
2001-05-01 12:11:35 +00:00
Jakub Jelinek
43e720723f gcse.c (gcse_main): Fix comment typo.
* gcse.c (gcse_main): Fix comment typo.
	(delete_null_pointer_check): Likewise.
	(hash_scan_set): Don't consider sets with REG_EQUIV MEM notes.
	* cse.c (cse_insn): Likewise.
	* function.c (fixup_var_refs_insns_with_hash): The sequence is
	toplevel.

	* gcc.c-torture/execute/20010403-1.c: New test.

From-SVN: r41444
2001-04-20 09:56:50 +02:00
Alexandre Oliva
f54104df4e gcse.c (compute_ld_motion_mems): ASM outputs aren't moveable.
* gcse.c (compute_ld_motion_mems): ASM outputs aren't moveable.
(find_moveable_store): Likewise.

From-SVN: r41363
2001-04-15 16:50:51 +00:00
Mark Mitchell
f1fa37ff6b Makefile.in (gcse.o): Depend on params.h.
* Makefile.in (gcse.o): Depend on params.h.
	* gcse.c: Include params.h.
	(gcse_main): Don't do GCSE if doing so will take inordinate
	amounts of memory.
	* params.def (PARAM_MAX_GCSE_MEMORY): New  parameter.
	* params.h (MAX_GCSE_MEMORY): New macro.

From-SVN: r41260
2001-04-11 18:22:46 +00:00
Richard Kenner
c57718d3fe gcse.c (update_ld_motion_stores): Don't use variable I for an insn.
* gcse.c (update_ld_motion_stores): Don't use variable I for an insn.
	* flow.c (set_block_for_new_insns): Remove needless cast and
	properly check for unset block number.

From-SVN: r41227
2001-04-10 17:45:12 -04:00
Andrew MacLeod
e2d2ed72a7 gcse.c (oprs_unchanged_p): Pass basic_block to load_killed_in_block_p.
2001-04-09  Andrew MacLeod  <amacleod@redhat.com>

	* gcse.c (oprs_unchanged_p): Pass basic_block to load_killed_in_block_p.
	(load_killed_in_block_p): Change bb parameter from int to basic_block.
	(oprs_not_set_p): Pass basic_blocks instead of ints as parameters.
	(handle_rd_kill_set): Change bb parameter from int to basic_block.
	(compute_kill_rd): Pass basic_blocks instead of ints as parameters.
	(expr_killed_p): Change bb parameter from int to basic_block, pass
	basic_blocks instead of ints as parameters.
	(compute_ae_kill): Pass basic_blocks instead of ints as parameters.
	(expr_reaches_here_p_work, expr_reaches_here_p): Change bb parameter
	from int to basic_block, pass basic_blocks instead of ints as parms.
	(pre_expr_reaches_here_p_work, pre_expr_reaches_here_p): Change bb
	parameter from int to basic_block, pass basic_blocks instead of ints.
	(process_insert_insn): Pass basic_blocks instead of ints as parameters.
	(insert_insn_end_bb): Change bb parameter from int to basic_block,
	pass basic_blocks instead of ints.
	(pre_edge_insert, pre_insert_copy_insn, pre_insert_copies): Pass
	basic_blocks instead of ints as parameters.
	(pre_delete): Pass basic_blocks instead of ints as parameters.
	(hoist_expr_reaches_here_p): Change bb parameter from int to
	basic_block, pass basic_blocks instead of ints.
	(hoist_code): Pass basic_blocks instead of ints as parameters.
	(reg_set_info, store_ops_ok, store_killed_after, store_killed_before):
	Change bb parameter from int to basic_block.
	(build_store_vectors): Pass basic_blocks instead of ints as parameters.
	(insert_insn_start_bb): Change bb parameter from int to basic_block,
	pass basic_blocks instead of ints.
	(insert_store): Pass basic_blocks instead of ints as parameters.
	(replace_store_insn, delete_store): Change bb parameter from int to
	basic_block, pass basic_blocks instead of ints.
	(store_motion): Pass basic_blocks instead of ints as parameters.

From-SVN: r41209
2001-04-09 15:20:26 +00:00
Andrew MacLeod
ccbaf064ff basic-block.h (set_new_block_for_insns): New Prototype.
2001-04-09  Andrew MacLeod  <amacleod@redhat.com>

	* basic-block.h (set_new_block_for_insns): New Prototype.
	(set_block_num): Delete prototype.
	* flow.c (set_block_num): Remove obsolete function.
	(set_block_for_new_insns): Set BB for single or multiple insns.
	* gcse.c (handle_avail_expr): Use set_block_for_new_insns.
	(process_insn_end_bb): Use set_block_for_new_insns or
	set_block_for_insn instead of set_block_num.
	(pre_insert_copy_insn): Use set_block_for_new_insns.
	(update_ld_motion_stores): Use set_block_for_new_insns.
	(insert_insn_start_bb): Use set_block_for_new_insns.
	(replace_store_insn): Use set_block_for_new_insns.

From-SVN: r41208
2001-04-09 15:17:08 +00:00
Andrew MacLeod
a13d4ebfc3 alias.c (get_addr): Externalize.
2001-04-09  Andrew MacLeod  <amacleod@redhat.com>
	    Jeff Law  <law@cygnus.com>

	* alias.c (get_addr): Externalize.
	(canon_true_dependence): New function. Behaves like true_dependance
	except it already assumes a MEM has been canonicalized.
	* flags.h (flag_gcse_lm, flag_gcse_sm): New optimization flags.
	* gcse.c (struct ls_expr): Add load/store expressions structure.
	(modify_mem_list, canon_modify_mem_list): New variable.
	(gcse_main): Initialize & finalize alias analysis. Use enhanced
	load motion and store motion if requested.
	(alloc_gcse_mem): Allocate space for modify_mem_list array.
	(free_gcse_mem): Free the modify_mem_list array.
	(oprs_unchanged_p): Use load_killed_in_block_p.
	(gcse_mems_conflict_p, gcse_mem_operand): New variables.
	(mems_conflict_for_gcse_p): New function.  Don't kill loads
	with stores to themselves if its in the load/store expression list.
	(load_killed_in_block_p): New function.
	(canon_list_insert): New Function.
	(record_last_mem_set_info): Keep a list of all instructions which
	can modify memory for each basic block.
	(compute_hash_table, reset_opr_set_tables): Clear modify_mem_list.
	(oprs_not_set_p): Use load_killed_in_block_p.
	(mark_call, mark_set, mark_clobber): Use record_last_mem_set_info.
	(expr_killed_p): Use load_killed_in_block_p.
	(compute_transp): Do not pessimize memory references.
	(pre_edge_insert): Update stores for a load motion expression.
	(one_pre_gcse_pass): Check loads/stores for extra load motion.
	(ldst_entry): Find or create a ldst_expr structure.
	(free_ldst_entry): Free memory for an individual item.
	(free_ldst_mems): Free entire load/store expression list.
	(print_ldst_list): Print debug info.
	(find_rtx_in_ldst): Try to find an rtx expression in the ldst list.
	(enumerate_ldsts): Assign integer values to each entry in list.
	(first_ls_expr): First expression in the list.
	(next_ls_expr): Next expression in the list.
	(simple_mem): Check if expression qualifies for ld/st expression list.
	(invalidate_any_buried_refs): Remove from expression list if its
	used in some other way we dont understand.
	(compute_ld_motion_mems): Find all potential enhanced load motion
	expression.
	(trim_ld_motion_mems): Remove any expressions which are invalid.
	(update_ld_motion_stores): Copy store values to registers for loads
	which have been moved.
	(regvec, st_antloc, num_store): New global statics.
	(reg_set_info): Marks registers as set.
	(store_ops_ok): Verfies registers expressions are valid in a block.
	(find_moveable_store): Look for moveable stores in a pattern.
	(compute_store_table): Find stores in a function worth moving, maybe.
	(load_kills_store): Check dependance of a load and store.
	(find_loads): Find any loads in a pattern.
	(store_killed_in_insn): Check if a store is killed in an insn.
	(store_killed_after): Check is store killed after an insn in a block.
	(store_killed_before): Check is store killed before an insn in a block.
	(build_store_vectors): Generate the antic and avail vectors.
	(insert_insn_start_bb): Insert at the start of a BB, update BLOCK_HEAD.
	(insert_store): Add a store to an edge.
	(replace_store_insn): Replace a store with a SET insn.
	(delete_store): Delete a store insn.
	(free_store_memory): Free memory.
	(store_motion): Perform store motion.
	* invoke.texi: Add documentation for -fcse-lm and -fgcse-sm.
	* rtl.h (get_addr, canon_true_dependence): Add prototypes.
	* toplev.c (flag_gcse_lm, flag_gcse_sm): New Variables.
	(f_options): Add gcse-lm and gcse-sm.

Co-Authored-By: Jeff Law <law@redhat.com>

From-SVN: r41207
2001-04-09 14:27:05 +00:00
Jakub Jelinek
8e184d9cc1 gcse.c (delete_null_pointer_checks_1): Add delete_list argument, push insns to delete to it instead of deleting them.
* gcse.c (delete_null_pointer_checks_1): Add delete_list argument,
	push insns to delete to it instead of deleting them.
	(delete_null_pointer_checks): Delete insns from delete_list after
	all delete_null_pointer_checks_1 passes are done.

From-SVN: r41092
2001-04-04 22:19:23 +02:00
John Wehle
7142e31845 rtl.h (set_noop_p): Declare.
* rtl.h (set_noop_p): Declare.
	* flow.c (set_noop_p): Move from here ...
	* rtlanal.c (set_noop_p): ... to here and enhance.
	* cse.c (delete_trivially_dead_insns): Use it.
	* gcse.c (hash_scan_set): Likewise.
	* jump.c (delete_noop_moves): Likewise.
	* recog.c (split_all_insns): Likewise.

From-SVN: r41077
2001-04-04 05:03:29 +00:00
Richard Kenner
52d76e1128 gcse.c (hash_scan_set): An expression is not anticipatible if it is part of a multi-SET insn.
* gcse.c (hash_scan_set): An expression is not anticipatible if it
	is part of a multi-SET insn.

From-SVN: r40722
2001-03-21 19:21:16 -05:00
Richard Kenner
8d444206b1 Fix typo in last change
From-SVN: r39869
2001-02-18 22:19:23 -05:00
Richard Kenner
fb0c0a1270 Makefile.in (gcse.o): Now includes ggc.h.
* Makefile.in (gcse.o): Now includes ggc.h.
	* gcse.c: Include ggc.h.
	(want_to_gcse_p): Verify expression can be in SET as valid insn.
	(try_replace_reg): Remove warning of uninitialize variable.
	(process_insert_insn): Call invalid_insn_p to validate insn.
	* recog.c (insn_invalid_p): Now global.
	See if can make valid by adding CLOBBERs of SCRATCH only and do if so.
	* recog.h (insn_invalid_p): New declaration.

From-SVN: r39857
2001-02-18 18:56:34 -05:00
Richard Kenner
172890a2dd gcse.c (hash_scan_set): If cprop, see if REG_EQUAL or REG_EQUIV.
* gcse.c (hash_scan_set): If cprop, see if REG_EQUAL or REG_EQUIV.
	Don't CSE a nop.
	(hash_scan_insn): Clean up calls to hash_scan_set.
	(compute_kill_rd): REGNO now unsigned.
	(try_replace_reg): Rework to use simplify_replace_rtx.
	(cprop_jump, cprop_cc0_jump): Likewise.
	(cprop_insn): Call find_reg_equal_equiv_note.
	Reflect changes to cprop_jump and cprop_cc0_jump.

From-SVN: r39774
2001-02-16 14:29:49 -05:00
Jan Hubicka
848e0190fb cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to conditionals.
* cse.c (cse_main): Converts ifdefs on PIC_OFFSET_TABLE_REGNUM to
	conditionals.
	* defaults.h (PIC_OFFSET_TABLE_REGNUM): Default to INVALID_REGNUM.
	* emit-rtl.c (init_emit_once): Convert ifdefs to conditionals.
	* flow.c (mark_regs_live_at_end): Likewise.
	(calculate_global_regs_live): Likewise.
	* gcse.c (compute_hash_table): Likewise.
	(compute_kill_rd): Likewise.
	* resource.c (mark_target_live_regs): Likewise.
	* rtl.h (INVALID_REGNUM): New macro.

From-SVN: r39643
2001-02-13 20:17:45 +00:00
John David Anglin
5b1ef59457 loop.c (add_label_notes): Increment the label usage count when a note is added to an insn which refers to...
* loop.c (add_label_notes): Increment the label usage count when
        a note is added to an insn which refers to a CODE_LABEL.
        * gcse.c (add_label_notes): Likewise.

From-SVN: r38603
2001-01-01 17:58:27 -07:00
Michael Matz
b614171efe gcse.c (compute_pre_data): Kill trapping expressions in destination blocks of abnormal edges.
* gcse.c (compute_pre_data): Kill trapping expressions in
        destination blocks of abnormal edges.

From-SVN: r38068
2000-12-06 10:45:31 -08:00
Diego Novillo
d1cc928a7b gcse.c (hoist_expr_reaches_here_p): Do not mark expr_bb as visited before visiting it.
2000-11-21  Diego Novillo  <dnovillo@redhat.com>

	* gcse.c (hoist_expr_reaches_here_p): Do not mark expr_bb as
	visited before visiting it.

From-SVN: r37627
2000-11-21 16:00:20 -05:00
Michael Matz
f80326884c Michael Matz <matzmich@cs.tu-berlin.de>
* dominance.c: New file.
        * Makefile.in (OBJS): Add dominance.o.

        * flow.c (compute_flow_dominators): Remove.
        (compute_immediate_dominators): Remove.
        (compute_immediate_postdominators): Remove.
        * basic-block.h: Remove their prototypes.
        (calculate_dominance_info): Add prototype.

        * dce.c (eliminate_dead_code): Change calls to above functions.
        Don't compute dominators but only immediate dominators.
        * flow.c (flow_loops_find): Change callers.
        * gcse.c (compute_code_hoist_data): Likewise.
        * haifa-sched.c (schedule_insns): Likewise.
        * ifcvt.c (if_convert): Likewise.
        * ssa.c (convert_to_ssa): Likewise, and only compute immediate
        dominators.

From-SVN: r37449
2000-11-14 01:58:40 -08:00
Joseph Myers
961192e1dd alias.c [...] (init_alias_analysis, [...]): Use memset () instead of bzero ().
* alias.c (init_alias_analysis), calls.c (expand_call,
	emit_library_call_value_1), combine.c (init_reg_last_arrays),
	cse.c (new_basic_block), dbxout.c (dbxout_type), diagnostic.c
	(init_output_buffer, set_diagnostic_context), dwarf2out.c
	(equate_decl_number_to_die, build_abbrev_table), emit-rtl.c
	(init_emit_once), fold-const.c (mul_double, div_and_round_double),
	function.c (assign_parms), gcse.c (compute_can_copy,
	alloc_gcse_mem, alloc_reg_set_mem, record_one_set,
	compute_hash_table, compute_set_hash_table,
	compute_expr_hash_table), genattrtab.c (optimize_attrs), global.c
	(global_alloc, global_conflicts), haifa-sched.c (compute_trg_info,
	clear_units, schedule_block), integrate.c (initialize_for_inline,
	expand_inline_function), jump.c (thread_jumps), local-alloc.c
	(local_alloc), loop.c (combine_movables, count_loop_regs_set,
	load_mems_and_recount_loop_regs_set), print-tree.c (debug_tree),
	regclass.c (init_reg_sets, init_reg_sets_1, regclass,
	record_reg_classes, allocate_reg_info), reload.c
	(get_secondary_mem, remove_address_replacements, find_reloads),
	reload1.c (reload, set_initial_label_offsets, finish_spills,
	reload_as_needed, choose_reload_regs_init,
	reload_cse_simplify_operands), reorg.c (dbr_schedule), sbitmap.c
	(sbitmap_zero), simplify-rtx.c (simplify_plus_minus), ssa.c
	(rename_registers), stmt.c (expand_end_case), unroll.c
	(unroll_loop), varray.c (varray_grow), objc/objc-act.c: Use memset
	() instead of bzero ().

ch:
	* actions.c (check_missing_cases), typeck.c (build_chill_slice,
	build_chill_cast): Use memset () instead of bzero ().

cp:
	* class.c (duplicate_tag_error, build_vtbl_initializer), decl.c
	(push_binding_level), error.c (cp_tree_printer), pt.c
	(process_partial_specialization, tsubst_template_arg_vector),
	search.c (lookup_member): Use memset () instead of bzero ().

java:
	* expr.c (note_instructions), jcf-io.c (find_class), jcf-parse.c
	(init_outgoing_cpool), lex.c (java_init_lex): Use memset ()
	instead of bzero ().

From-SVN: r37303
2000-11-07 22:50:06 +00:00
Aldy Hernandez
d7836e38b7 do not propagate constants into jump_insn's for machines with CC0, more than once
From-SVN: r37039
2000-10-24 22:49:39 +00:00
Richard Kenner
ebb13e7eb8 gcse.c (set_hash_table_size): Now unsigned.
* gcse.c (set_hash_table_size): Now unsigned.
	* sdbout.c (template_name_p): Add "const" to avoid warnings.
	(sdbout_record_type_name, plain_type_1, sdbout_symbol): Likewise.
	(sdbout_one_type, sdbout_parms, sdbout_reg_parms): Likewise.
	(sdbout_end_epilogue): Remove variable NAME.
	* system.h (getopt): Add default definition.
	* config/alpha/alpha.c (print_operand): Don't continue processing
	after issuing error.
	(summarize_insn): Avoid use of UL in constant.

From-SVN: r36974
2000-10-20 15:17:41 -04:00
Mark Mitchell
1f8f4a0b31 Remove obstacks.
* Makefile.in (ggc-callbacks.o): Remove target.
	(flow.o): Depend on GGC_H.
	* alias.c (init_alias_analysis):
	Remove ggc_p conditionals.
	(end_alias_analysis): Likewise.
	* basic-block.h (init_flow): New function.
	(allocate_reg_life_data): Declare.
	* bb-reorder.c	(function_obstack): Replace with ...
	(flow_obstack): ... new variable.
	(fixup_reorder_chain): Use it.
	* c-decl.c (ggc_p): Remove.
	(caller-save.c): Don't call oballoc/obfree.
	* combine.c (struct
	undobuf): Remove storage.
	(try_combine): Don't call oballoc.
	(undo_all): Don't call obfree.
	* cse.c (insert): Use xmalloc, not
	oballoc.
	(cse_main): Adjust accordingly.
	* dwarf2out.c (save_rtx): Remove
	obstack code.
	(dwarf2out_init): Remove ggc_p conditionals.
	* emit-rtl.c (rtl_obstack): Remove.
	(gen_rtx_CONST_INT): Remove ggc_p conditionals.
	(make_insn_raw): Likewise.
	(emit_insn_before): Likewise.
	(emit_insn_after): Likewise.
	(emit_insn): Likewise.
	(gen_sequence): Likewise.
	(copy_insn_1): Remove handling of `b' RTL components.
	(init_emit_once): Remove ggc_p conditionals.
	* except.c (create_rethrow_ref): Don't fool with obstacks.
	(add_partial_entry): Likewise.
	(call_get_eh_context): Likewise.
	(begin_protect_partials): Likewise.
	(protect_with_terminate): Likewise.
	* explow.c
	(plus_constant_wide): Likewise.
	* expr.c (init_expr_once):
	Likewise.
	(emit_block_move): Likewise.
	(clear_storage): Likewise.
	(expand_expr): Likewise.
	* flow.c (function_obstack): Remove.
	(flow_obstack): New variable.
	(flow_firstobj): Likewise.
	(create_base_block): Use the flow_obstack.
	(split_block): Likewise.
	(split_edge): Likewise.
	(calculate_global_regs_live): Likewise.
	(allocate_bb_life_data): Make it static.  Likewiwse.
	(init_flow): New function.
	(size_int_type_wide): Remove ggc_p conditionals.
	* function.c
	(push_function_context_to): Don't call save_tree_status.
	(pop_function_context_from): Or restore_tree_status.
	(assign_stack_local_1): Don't call push_obstacks.
	(find_fixup_replacement): Use xmalloc.
	(fixup_var_refs_insns): Free the storage.
	(insns_for_mem_walk): Don't mess with obstacks.
	(instantiate_decls): Likewise.
	(trampoline_address): Likewise.
	(expand_function_end): Likewise.
	* function.h (sturct function):
	Remove obstack-related variables.
	(save_tree_status): Don't declare.
	(restore_tree_status): Likewise.
	* gcse.c (compute_can_copy):
	Don't call oballoc/obfree.
	* genattrtab.c (operate_exp): Remove
	ggc_p conditionals.
	(simplify_cond): Likewise.
	(simplify_test_exp): Don't mess with obstacks.
	(optimize_attrs): Likewise.
	* gengenrtl.c (gendef): Don't include
	ggc_p conditionals.
	* ggc-callbacks.c (ggc_p): Remove.
	* ggc-none.c (ggc_p): Remove.
	* ggc.h (ggc_p): Don't declare.
	* integrate.c (save_for_inline): Don't mess with obstacks.
	(integrate_decl_tree): Likewise.
	(output_inline_function): Likewise.
	* lists.c
	(init_EXPR_INSN_LIST_cache): Likewise.
	* loop.c (temp_obstack):
	Remove.
	(rtl_obstack): Likewise.
	(init_loop): Don't mess with obstacks.
	(reg_address_cost): Free BIVs and GIVs.
	(check_insns_for_bivs): Use xmalloc, not oballoc.
	(find_mem_givs): Likewise.
	(record_biv): Likewise.
	(general_induction_var): Likewise.
	(product_cheap_p): Likewse.
	* optabs.c (init_one_libfunc): Remove
	ggc_p conditional.
	* print-tree.c (debug_tree): Don't use
	oballoc/obfree.
	(print_node): Likewise.
	* profile.c (output_func_start_profiler):
	Remove call to temporary_allocation.
	* reload1.c
	(eliminate_regs_in_insn): Don't mess with obstacks.
	* resource.c
	(mark_target_live_regs): Use xmalloc.
	(free_resource_info): Free the memory.
	* rtl.c (rtl_obstack):
	Remove.
	(rtvec_alloc): Don't mess with obstacks.
	(rtx_alloc): Likewise.
	(rtx_free): Remove.
	(copy_rtx): Don't handle `b' cases.
	(read_rtx): Use a local rtl_obstack.
	* rtl.h (oballoc): Remove.
	(obfree): Likewise.
	(pop_obstacks): Likewise.
	(push_obstacks): Likewise.
	(allocate_bb_life_data): Likewise.
	(allocate_reg_life_data): Likewise.
	(rtx_free): Likewise.
	* sdbout.c (sdbout_queue_anonymous_type):
	Use tree_cons, not saveable_tree_cons.
	* simplify-rtx.c
	(cselib_init): Don't mess with obstacks.
	* stmt.c
	(mark_block_nesting): Mark the label_chain.
	(epxand_label): Use ggc_alloc, not oballoc.
	(clear_last_expr): Don't mess with obstacks.
	(expand_decl_cleanup): Likewise.
	(expand_dcc_cleanup): Likewise.
	(expand_dhc_cleanup): Likewise.
	(expand_anon_union_decl): Likewise.
	(add_case_node): Use xmalloc, not oballoc.
	(free_case_nodes): New function.
	(expand_end_case): Call it.
	* stor-layout.c (layout_type): Don't
	mess with obstacks.
	(layout_type): Likewise.
	* toplev.c (wrapup_global_declarations):
	Likewise.
	(compile_file): Remove ggc_p conditionals.
	(rest_of_compilation): Call init_flow.  Remove ggc_p conditionals.
	(decode_f_option): Remove ggc_p conditionals.
	* tree.c
	(function_maybepermanent_obstack): Remove.
	(maybepermanent_obstack): Likewise.
	(function_obstack): Likewise.
	(tmeporary_obstack): Likewise.
	(momentary_obstack): Likewise.
	(temp_decl_obstack): Likewise.
	(saveable_obstack): Likewise.
	(rtl_obstack): Likewise.
	(current_obstack): Likewise.
	(expression_obstack): Likewise.
	(struct obstack_stack): Likewise.
	(obstack_stack): Likewise.
	(obstack_stack_obstack): Likewise.
	(maybepermanent_firstobj): Likewise.
	(temporary_firstobj): Likewise.
	(momentary_firstobj): Likewise.
	(temp_decl_firstobj): Likewise.
	(momentary_function_firstobj): Likewise.
	(all_types_permanent): Likewise.
	(struct momentary_level): Likewise.
	(momentary_stack): Likewise.
	(init_obstacks): Remove initialization of removed obstacks.
	(save_tree_status): Remove.
	(restore_tree_status): Likewise.
	(temporary_allocation): Liekwise.
	(end_temporary_allocation): Liekwise.
	(resume_temporary_allocation): Likewise.
	(saveable_allocation): Likewise.
	(push_obstacks): Likewise.
	(push_obstacks_nochange): Likewise.
	(pop_obstacks): Likewise.
	(allocation_temporary_p): Likewise.
	(permanent_allocation): Likewise.
	(preserve_data): Likewise.
	(preserve_initializer): Likewise.
	(rtl_in_current_obstack): Likewise.
	(rtl_in_saveable_obstack): Likewise.
	(oballoc): Likewise.
	(obfree): Likewise.
	(savealloc): Likewise.
	(expralloc): Likewise.
	(print_obstack_name): Likewise.
	(debug_obstack): Likewise.
	(object_permanent_p): Likewise.
	(push_momentary): Likewise.
	(perserve_momentary): Likewise.
	(clear_momentary): Likewise.
	(pop_momentary): Likewise.
	(pop_momentary_nofree): Likewise.
	(suspend_momentary): Likewise.
	(resume_momentary): Likewise.
	(make_node): Don't set TREE_PERMANENT.
	(copy_node): Remove ggc_p conditionals.  Don't set TYPE_OBSTACK.
	Don't set TREE_PERMANENT.
	(get_identifier): Remove ggc_p conditionals.
	(build_string): Likewise.
	(make_tree_vec): Likewise.
	(build_decl_list): Remove.
	(build_expr_list): Likewise.
	(tree_cons): Remove ggc_p conditionals.
	(decl_tree_cons): Remove.
	(expr_tree_cons): Likewise.
	(perm_tree_cons): Likewise.
	(temp_tree_cons): Likewise.
	(saveable_tree_cons): Likewise.
	(build1): Remove ggc_p conditionals.
	(build_parse_node): Likewise.
	(build_type_attribute_variant): Don't mess with obstacks.
	(build_type_copy): Likewise.
	(type_hash_canon): Likewise.
	(build_pointer_type): Likewise.
	(build_reference_type): Likewise.
	(build_index_type): Likewise.
	(build_range_type): Likewise.
	(dump_tree_statistics): Don't print obstack information.
	* tree.h
	(struct tree_common): Remove permanent_flag.
	(TREE_PERMANENT): Remove.
	(TREE_SET_PERMANENT): Likewise.
	(TYPE_OBSTACK): Likewise.
	(struct tree_type): Remove obstack.
	(oballoc): Remove.
	(savealloc): Likewise.
	(build_decl_list): Likewise.
	(build_expr_list): Likewise.
	(perm_tree_cons): Likewise.
	(temp_tree_cons): Likewise.
	(saveable_tree_cons): Likewise.
	(decl_tree_cons): Likewise.
	(expr_tree_cons): Likewise.
	(suspend_momentary): Likewise.
	(allocation_temporary_p): Likewise.
	(resume_momentary): Likewise.
	(push_obstacks_nochange): Likewise.
	(permanent_allocation): Likewise.
	(push_momentary): Likewise.
	(clear_momentary): Likewise.
	(pop_momentary): Likewise.
	(end_temporary_allocation): Likewise.
	(pop_obstacks): Likewise.
	(push_obstacks): Likewise.
	(pop_momentary_nofree): LIkewise.
	(preserve_momentary): Likewise.
	(saveable_allocation): Likewise.
	(temporary_allocation): Likewise.
	(resume_temporary_allocation): Likewise.
	(perserve_initializer): Likewise.
	(debug_obstack): Likewise.
	(rtl_in_current_obstack): Likewise.
	(rtl_in_saveable_obstack): Likewise.
	(obfree): Likewise.
	* varasm.c (current_obstack): Remove.
	(saveable_obstack): Remove.
	(rtl_obstack): Remove.
	(immed_double_const): Don't mess with obstacks.
	(immed_real_cons): Likewise.
	(output_constant_def): Likewise.
	(init_varasm_status): Use xcalloc.
	(mark_pool_constant): Mark the pool constant itself.
	(free_varasm_status): Free memory.
	(decode_rtx_const): Call bzero directly, rather than expanding it
	inline.
	(record_rtx_const): Don't mess with obstacks.
	(force_const_mem): Likewise.
	* config/arm/arm.c (arm_encode_call_attribute): Remove ggc_p
	conditionals.
	(aof_pic_entry): Likewise.
	* config/ia64/ia64.c (ia64_encode_section_info): Likewise.
	* config/m32r/m32r.c (m32r_encode_section_info): Likewise.
	* config/pa/pa.c (saveable_obstack): Remove.
	(rtl_obstack): Likewise.
	(current_obstack): Likewise.
	(output_call): Don't mess with obstacks.
	(hppa_encode_label): Remove ggc_p conditionals.
	* config/romp/romp.c (get_symref): Don't mess with obstacks.
	* config/rs6000/rs6000.c (output_toc): Remove ggc_p conditional.
	(rs6000_encode_section_info): Likewise.
	* config/sh/sh.c (get_fpscr_rtx): Likewise.

From-SVN: r36856
2000-10-13 06:26:46 +00:00
Brad Lucier
18424ae17a toplev.c (warn_disabled_optimization): Declare new warning flag.
* toplev.c (warn_disabled_optimization): Declare new warning flag.
        * flags.h (warn_disabled_optimization): Add it here.
        * gcse.c (gcse_main): Add warning when disabled.
        * invoke.texi: Document -Wdisabled-optimization

Co-Authored-By: Mark Mitchell <mark@codesourcery.com>

From-SVN: r36568
2000-09-22 07:22:07 +00:00
Alexandre Oliva
c0712acbc7 gcse.c (hash_string_1): Add prototype.
* gcse.c (hash_string_1): Add prototype.
* cse.c (canon_hash_string): Likewise.

From-SVN: r36154
2000-09-05 06:04:09 +00:00
Alexandre Oliva
6462bb432f rtl.h (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): New macro.
* rtl.h (ASM_OPERANDS_INPUT_CONSTRAINT_EXP): New macro.
* gcse.c (hash_string_1): New function.
(hash_expr_1) <ASM_OPERANDS>: Disregard filename and line number.
(expr_equiv_p) <ASM_OPERANDS>: Likewise.
* cse.c (rtx_cost): Don't increase the cost of ASM_OPERANDS.
(canon_hash_string): New function.
(canon_hash) <ASM_OPERANDS>: Disregard filename and line number.
(exp_equiv_p) <ASM_OPERANDS>: Likewise.
(fold_rtx): Use ASM_OPERANDS accessor macros.
* emit-rtl.c (copy_insn_1): Likewise.
* integrate.c (copy_rtx_and_substitute): Likewise.
* stmt.c (expand_asm_operands): Likewise.  Give an
ASM_OPERANDS rtx the mode of the output reg being set from it.

From-SVN: r36110
2000-09-02 02:54:55 +00:00
Rodney Brown
2c3c49dec3 alias.c (mark_constant_function): Use INSN_P.
* alias.c (mark_constant_function): Use INSN_P.
	(init_alias_analysis): Likewise.
	* combine.c (combine_instructions): Use INSN_P.
	(can_combine_p): Likewise.
	(try_combine): Likewise.
	(distribute_notes): Likewise.
	(distribute_links): Likewise.
	* cse.c (cse_around_loop): Use INSN_P.
	(invalidate_skipped_block): Likewise.
	(cse_set_around_loop): Likewise.
	(cse_end_of_basic_block): Likewise.
	(delete_trivially_dead_insns): Likewise.
	* emit-rtl.c (unshare_all_rtl_again): Use INSN_P.
	(unshare_all_rtl_1): Likewise.
	(next_cc0_user): Likewise.
	(try_split make_insn_raw): Likewise.
	(remove_unnecessary_notes): Likewise.
	* final.c (shorten_branches): Use INSN_P.
	(leaf_renumber_regs): Likewise.
	(leaf_renumber_regs_insn): Likewise.
	* flow.c (find_label_refs): Use INSN_P.
	(verify_wide_reg): Likewise.
	(notice_stack_pointer_modification): Likewise.
	(count_or_remove_death_notes): Likewise.
	(verify_flow_info): Likewise.
	(clear_log_links): Likewise.
	* function.c (fixup_var_refs_insns): Use INSN_P.
	(compute_insns_for_mem): Likewise.
	* gcse.c (alloc_gcse_mem): Use INSN_P.
	(compute_sets): Likewise.
	(compute_hash_table): Likewise.
	(classic_gcse): Likewise.
	(cprop): Likewise.
	(insert_insn_end_bb): Likewise.
	(delete_null_pointer_checks_1): Likewise.
	* global.c (expand_preferences): Use INSN_P.
	(build_insn_chain): Likewise.
	* graph.c (node_data): Use INSN_P.
	* haifa-sched.c (priority): Use INSN_P.
	(rm_line_notes): Likewise.
	(rm_other_notes): Likewise.
	(find_insn_reg_weight): Likewise.
	(init_target_units): Likewise.
	(schedule_block): Likewise.
	(compute_block_forward_dependences): Likewise.
	(debug_dependencies): Likewise.
	(set_priorities): Likewise.
	* integrate.c (function_cannot_inline_p): Use INSN_P.
	(save_parm_insns): Likewise.
	(copy_insn_list): Likewise.
	* jump.c (mark_all_labels): Use INSN_P.
	(never_reached_warning): Likewise.
	* lcm.c (optimize_mode_switching): Use INSN_P.
	* local-alloc.c (validate_equiv_mem): Use INSN_P.
	(memref_used_between_p): Likewise.
	(update_equiv_regs): Likewise.
	(block_alloc): Likewise.
	(no_conflict_p): Likewise.
	* loop.c (scan_loop): Use INSN_P.
	(find_and_verify_loops): Likewise.
	(count_loop_regs_set): Likewise.
	(loop_reg_used_before_p): Likewise.
	(strength_reduce): Likewise.
	(recombine_givs): Likewise.
	(check_dbra_loop): Likewise.
	(load_mems): Likewise.
	(try_copy_prop): Likewise.
	* print-rtl.c (print_rtx): Use INSN_P.
	* recog.c (find_single_use): Use INSN_P.
	* reg-stack.c (stack_regs_mentioned): Use INSN_P.
	(next_flags_user): Likewise.
	(swap_rtx_condition): Likewise.
	* regmove.c (mark_flags_life_zones): Use INSN_P.
	(optimize_reg_copy_1): Likewise.
	(optimize_reg_copy_2): Likewise.
	(optimize_reg_copy_3): Likewise.
	(reg_is_remote_constant_p): Likewise.
	(fixup_match_2): Likewise.
	(regmove_optimize): Likewise.
	(fixup_match_1): Likewise.
	* regrename.c (build_def_use): Use INSN_P.
	(replace_reg_in_block): Likewise.
	(consider_use): Likewise.
	* reload.c (find_equiv_reg): Use INSN_P.
	* reload1.c (reload): Use INSN_P.
	(maybe_fix_stack_asms): Likewise.
	(calculate_needs_all_insns): Likewise.
	(reload_as_needed): Likewise.
	(emit_output_reload_insns): Likewise.
	(delete_address_reloads_1): Likewise.
	(reload_cse_regs_1): Likewise.
	(reload_combine): Likewise.
	(reload_cse_move2add): Likewise.
	* reorg.c (redundant_insn): Use INSN_P.
	(dbr_schedule): Likewise.
	* resource.c (find_dead_or_set_registers): Use INSN_P.
	(mark_target_live_regs): Likewise.
	* rtlanal.c (reg_used_between_p): Use INSN_P.
	(reg_referenced_between_p): Likewise.
	(reg_set_between_p): Likewise.
	(reg_set_p): Likewise.
	(single_set): Likewise.
	(multiple_sets): Likewise.
	(find_last_value): Likewise.
	(reg_set_last): Likewise.
	(find_reg_note): Likewise.
	(find_regno_note): Likewise.
	* sibcall.c (sequence_uses_addressof): Use INSN_P.
	* simplify-rtx.c (cselib_process_insn): Use INSN_P.
	* ssa.c (find_evaluations): Use INSN_P.
	(rename_block): Likewise.
	(rename_equivalent_regs): Likewise.
	* unroll.c (loop_find_equiv_value): Use INSN_P.
	(set_dominates_use): Likewise.
	* varasm.c (mark_constant_pool): Use INSN_P.
	(mark_constants): Likewise.
	* config/alpha/alpha.c (alpha_does_function_need_gp): Use INSN_P.
	(alphaev4_next_group): Likewise.
	(alphaev5_next_group): Likewise.
	* config/c4x/c4x.c (c4x_process_after_reload): Use INSN_P.
	(c4x_rptb_rpts_p): Likewise.
	* config/mips/mips.c (mips16_optimize_gp): Use INSN_P.
	* config/rs6000/rs6000.c (uses_TOC): Use INSN_P.
	(rs6000_adjust_priority): Likewise.
	* config/sh/sh.c (sh_loop_align): Use INSN_P.
	(machine_dependent_reorg): Likewise.
	(split_branches): Likewise.
	* config/tahoe/tahoe.c (tahoe_cmp_check): Use INSN_P.

From-SVN: r35494
2000-08-04 14:28:08 -06:00
Jan Hubicka
e251e2a27f gcse.c (try_replace_reg): Use validate_replace_rtx_subexp instead of replace_rtx.
* gcse.c (try_replace_reg): Use validate_replace_rtx_subexp
	instead of replace_rtx.
	* recog.c (validate_replace_rtx_subexp): New function.
	* recog.h (validate_replace_rtx_subexp): Declare.

From-SVN: r35349
2000-07-30 18:44:13 +00:00
Richard Henderson
4b983fdc50 cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY.
* cse.c (canon_hash): Handle PRE_MODIFY/POST_MODIFY.
	(cse_insn): Likewise.
	(addr_affects_sp_p): Likewise.
	* expr.c (move_by_pieces): Likewise.
	(clear_by_pieces): Likewise.
	* gcse.c (oprs_unchanged_p): Likewise.
	* haifa-sched.c (sched_analyze_2): Likewise.
	* recog.c (offsettable_address_p): Likewise.
	* regclass.c (record_address_regs): Likewise.
	* reload.c (find_reusable_reload): Likewise.
	(push_reload): Likewise.
	(operands_match_p): Likewise.
	(decompose): Likewise.
	(find_reloads_address_1): Likewise.
	(find_inc_amount): Likewise.
	* reload1.c (elimination_effects): Likewise.
	* resource.c (mark_set_resources): Likewise.
	* flow.c (attempt_auto_inc): New function; mostly broken out
	of find_auto_inc.
	(find_auto_inc): Split into two functions and enhanced to
	generate POST_MODIFY.
	* rtl.def (PRE_MODIFY, POST_MODIFY): Adjust comment.
	* rtl.h (count_all_occurrences):  Declare.
	(HAVE_{PRE,POST}_MODIFY_{DISP,REG}): Provide default of 0 if not
	defined.
	* rtlanal.c (count_all_occurrences): New function.
	* tm.texi (HAVE_POST_MODIFY_DISP, HAVE_PRE_MODIFY_DISP,
	HAVE_POST_MODIFY_REG, HAVE_PRE_MODIFY_REG): Document.

	* config/ia64/ia64-protos.h (destination_operand): Declare.
	* config/ia64/ia64.c (destination_operand): New function.
	(ia64_print_operand): Handle POST_MODIFY.
	(rtx_needs_barrier): Likewise.
	* config/ia64/ia64.h (HAVE_POST_MODIFY_DISP): Define to 1.
	(HAVE_POST_MODIFY_REG): Define to 1.
	(MAX_REGS_PER_ADDRESS): Change to 2.
	(GO_IF_LEGITIMATE_ADDRESS): Accept POST_MODIFY too.
	(LEGITIMATE_ADDRESS_REG): New helper macro.
	(LEGITIMATE_ADDRESS_DISP): Likewise.
	(PREDICATE_CODES): Add entry for destination_operand.
	* config/ia64/ia64.md (all mov patterns): Use destination_operand
	predicate for operand 0.

From-SVN: r35321
2000-07-28 10:46:18 -07:00
Kaveh R. Ghazi
63bc1d05cc dwarf2out.c: Indent #error directive.
* dwarf2out.c: Indent #error directive.

	* gbl-ctors.h: Fix typo in comment.
	(__do_global_ctors): Prototype.

	* gcse.c (record_one_set, pre_delete): Remove unused variables.

	* rs6000.c (rs6000_maybe_dead): Delete unused prototype.
	(print_operand): Initialize variable `t'.

From-SVN: r35319
2000-07-28 16:08:54 +00:00
Mark Mitchell
589ca5cb10 Put phi nodes after NOTE_INSN_BASIC_BLOCK.
* rtl.h (NOTE_INSN_BASIC_BLOCK_P): New macro.
	* bb-reorder.c (get_next_bb_note): Use NOTE_INSN_BASIC_BLOCK_P.
	(get_prev_bb_note): Likewise.
	(remove_scope_notes): Likewise.
	* flow.c (commit_one_edge_insertion): Likewise.
	(merge_blocks_nomove): Likewise.
	(verify_flow_info): Likewise.
	* gcse.c (insert_insn_end_bb): Likewise.
	* reg-stack.c (emit_swap_insn): Likewise.
	* ssa.c (first_insn_after_basic_block_note): New function.
	(insert_phi_node): Use it.
	(rename_block): Likewise.
	(eliminate_phi): Likewise.
	(make_regs_equivalent_over_bad_edges): Likewise.
	(make_equivalent_phi_alternatives_equivalent): Likewise.
	(for_each_successor_phi): Likewise.
	(convert_from_ssa): Modify phi-node deletion algorithm.

From-SVN: r35296
2000-07-27 17:25:14 +00:00
Jeffrey A Law
55d3f91712 gcse.c (alloc_pre_mem): Do not alloc TRANSPOUT, it is not needed by our gcse pass anymore.
* gcse.c (alloc_pre_mem): Do not alloc TRANSPOUT, it is not
        needed by our gcse pass anymore.
        (free_pre_mem): Corresponding changes.
        (compute_pre_data): Do not call compute_transpout anymore.

From-SVN: r35226
2000-07-24 09:47:06 -06:00
Jeffrey A Law
68e866451e gcse.c (alloc_avail_expr_mem): Kill unused 'u_bitmap'.
* gcse.c (alloc_avail_expr_mem): Kill unused 'u_bitmap'.
        (free_avail_expr_mem, alloc_pre_mem, free_pre_mem): Corresponding
        changes.

From-SVN: r35225
2000-07-24 09:32:05 -06:00
Jeffrey A Law
bd3675fcf1 gcse.c (free_pre_mem): Do not free ANTLOC and AE_KILL here.
* gcse.c (free_pre_mem): Do not free ANTLOC and AE_KILL here.
        (compute_pre_data): Do it here instead.

From-SVN: r35224
2000-07-24 09:21:16 -06:00
Jeffrey A Law
e20dccadaf gcse.c (alloc_pre_mem, [...]): Delete unused bitmap 'temp_bitmap'.
* gcse.c (alloc_pre_mem, free_pre_mem): Delete unused bitmap
        'temp_bitmap'.
        (pre_delete): Corresponding changes.

From-SVN: r35222
2000-07-24 02:05:03 -06:00
Michael Matz
274969ea8e gcse.c (record_one_set): Prepend instead of append onto reg_set_table, making it O(n) instead O(n^2).
* gcse.c (record_one_set): Prepend instead of append onto
        reg_set_table, making it O(n) instead O(n^2).
        * lcm.c (compute_antinout_edge,compute_laterin,compute_available):
        Use a queue instead of a stack as worklist.

From-SVN: r35158
2000-07-20 18:07:33 -06:00
Bernd Schmidt
b86db3ebc2 Additional ENABLE_CHECKING code.
From-SVN: r35136
2000-07-19 17:22:01 +00:00
Jeff Law
a2e90653d0 Fix typo in comment.
From-SVN: r34840
2000-07-03 00:50:29 -06:00
Jeffrey A Law
c66e8ae9da gcse.c (compute_pre_data): Compute ae_kill using other local properties instead of calling compute_ae_kill.
* gcse.c (compute_pre_data): Compute ae_kill using other local
        properties instead of calling compute_ae_kill.

From-SVN: r34839
2000-07-03 00:49:31 -06:00
Richard Kenner
0a37799771 * gcse.c (insert_insn_end_bb): Always put after NOTE_INSN_BASIC_BLOCK.
From-SVN: r34592
2000-06-18 21:40:32 -04:00
Jan Hubicka
7f1c097d36 combine.c (try_combine): Use any_condjump_p...
* combine.c (try_combine): Use any_condjump_p, any_uncondjump_p
        and pc_set at the place of simplejump_p and condjump_p.
        * cse.c (record_jump_equiv): Likewise.
        * emit-rtl.c (emit): Likewise.
        * explow.c (find_next_ref): Likewise.
        * flow.c (tidy_fallthru_edge): Likewise.
        (init_propagate_block_info): Likewise.
        * gcse.c (delete_null_pointer_checks): Likewise.
        * ifcvt.c (cond_exec_get_condition, noce_get_condition,
        dead_or_predicable): Likewise.
        * integrate.c (copy_insn_list): Likewise.
        * loop.c (scan_loop, verify_dominator, find_and_verify_loops,
        for_each_insn_in_loop, check_dbra_loop, get_condition,
        insert_bct, load_mems): Likewise.
        * resource.c (find_dead_or_set_registers): Likewise.
        * sibcalls.c (simplejump_p): Likewise.
        * unroll.c (copy_loop_body, reg_dead_after_loop): Likewise.

From-SVN: r34175
2000-05-25 14:38:49 -07:00
Jason Merrill
f9e158c377 simplify-rtx.c (simplify_ternary_operation): Cast to unsigned.
* simplify-rtx.c (simplify_ternary_operation): Cast to unsigned.
        * stor-layout.c (place_field): Likewise.
        * integrate.h (struct inline_remap): Make regno_pointer_align unsigned.
        * expr.c (store_expr): Make align unsigned.
        * explow.c (plus_constant_wide): Make low words unsigned.
        * expmed.c (choose_multiplier): Likewise.
        * fold-const.c (fold):  Likewise.
        * tree.h (build_int_2): Likewise.
        * tree.c (build_int_2_wide, tree_int_cst_msb): Likewise.
        * emit-rtl.c (gen_reg_rtx): Add cast to unsigned char*.
        (init_emit): Change cast to unsigned char*.
        * varasm.c (compare_constant_1): Add cast to char*.
        * gcse.c (delete_null_pointer_checks): Change cast to unsigned int*.
        * reload1.c (reload): Likewise.

        * rtl.h (MEM_SET_IN_STRUCT_P): Use do { } while (0).

From-SVN: r33684
2000-05-04 17:15:05 -04:00
Richard Kenner
2e653e3965 gcse.c (expr_hash_table_size): Now unsigned.
* gcse.c (expr_hash_table_size): Now unsigned.
	(compute_ae_gen): Local variable `i' now unsigned.
	(compute_ae_kill, pre_insert_copies, pre_delete, pre_gcse): Likewise.
	(compute_transout, hoist_code): Likewise.
	(compute_local_properties): Likewise, also hash_table_size.
	(alloc_expr_hash_table): N_INSNS now unsigned.
	(delete_null_pointer_checks): Mark arg F as unused.

From-SVN: r33054
2000-04-10 07:33:18 -04:00
Richard Henderson
a18820c64c gcse.c (gcse_main): Don't rebuild the CFG here.
* gcse.c (gcse_main): Don't rebuild the CFG here.
        (delete_null_pointer_checks): Likewise.
        * ssa.c (convert_to_ssa): Likewise.
        * toplev.c (rest_of_compilation): Do it here instead.  Combine
        sequential calls to TIMEVAR.  Consistently use `insns' instead of
        `get_insns()'.  Always split insns after reload when optimizing.

From-SVN: r32995
2000-04-07 02:23:29 -07:00
Richard Kenner
770ae6cc71 * Rework fields used to describe positions of bitfields and
modify sizes to be unsigned and use HOST_WIDE_INT.
	* alias.c (reg_known_value_size): Now unsigned.
	* c-typeck.c (build_unary_op, case ADDR_EXPR): Use byte_position.
	(really_start_incremental_init): Use bitsize_zero_node.
	(push_init_level, pop_init_level, output_init_element): Likewise.
	Use bitsize_unit_node and bitsize_one_node.
	(output_pending_init_elements, process_init_element): Likewise.
	* combine.c (combine_max_regno, reg_sign_bit_copies): Now unsigned.
	(make_extraction): Position and length HOST_WIDE_INT and unsigned
	HOST_WIDE_INT, respectively.
	(get_pos_from_mask): Passed in value is unsigned HOST_WIDE_INT.
	(num_sign_bit_copies): Returns unsigned.
	BITWIDTH now unsigned; rework arithmetic.
	Remove recursive call from arg to MAX.
	(combine_instructions, init_reg_last_arrays): NREGS now unsigned.
	(setup_incoming_promotions, can_combine_p, try_combine, simplify_set):
	REGNO now unsigned.
	(set_nonzero_bit_and_sign_copies): NUM now unsigned.
	(find_split_point, expand_compound_operation, make_extraction): LEN
	now unsigned HOST_WIDE_INT, POS now HOST_WIDE_INT.
	(make_field_assignment): Likewise.
	(combine_simplify_rtx): Add cast.
	(expand_compound_operation): MODEWIDTH now unsigned; rework arithmetic.
	(force_to_mode): WIDTH now unsigned; add cast.
	(if_then_else_cond): SIZE now unsigned.
	(nonzero_bits): MODE_WIDTH, RESULT_WIDTH, and WIDTH now unsigned.
	(extended_count): Now returns unsigned.
	(simplify_shift_const): COUNT unsigned; arg is now INPUT_COUNT.
	Add SIGNED_COUNT variable; MODE_WORDS and FIRST_COUNT now unsigned.
	(simplify_comparison): MODE_WIDTH now unsigned.
	(update_table_tick): REGNO and ENDREGNO now unsigned; new var R.
	(mark_used_regs_combine): Likewise; rework arithmetic.
	(record_value_for_reg): REGNO, ENDREGNO, and I now unsigned.
	(record_dead_and_set_regs, reg_dead_at_p, distribute_notes): Likewise.
	(record_promoted_value): REGNO now unsigned.
	(get_last_value_validate): REGNO, ENDREGNO, and J now unsigned.
	(get_last_value): REGNO now unsigned.
	(use_crosses_set_p): REGNO and ENDREGNO now unsigned.
	(reg_dead_regno, reg_dead_endregno): Now unsigned.
	(remove_death): Arg REGNO now unsigned.
	(move_deaths):  REGNO, DEADREGNO, DEADEND, OUREND, and I now unsigned.
	(reg_bitfield_target_p): REGNO, REGNO, ENDREGNO, and ENDTREGNO
	now unsigned.
	* convert.c (convert_to_integer): INPREC and OUTPREC now unsigned.
	* cse.c (struct qty_table_elem): FIRST_REG and LAST_REG now unsigned.
	(struct cse_reg_info): REGNO now unsigned.
	(cached_regno): Now unsigned.
	(REGNO_QTY_VALID_P): Add cast.
	(make_new_qty, make_regs_eqv, delete_reg_eqiv): Regno args unsigned.
	(remove_invalid_regs): Likewise.
	(remove_invalid_subreg_refs): Likewise; arg WORD also unsigned
	as are variables END and I.
	(get_cse_reg_info, insert): Likewise.
	(mention_regs, invalidate_for_call): REGNO, ENDREGNO, and I unsigned.
	(canon_hash): Likewise.
	(insert_regs, lookup_for_remove): REGNO now unsigned.
	(invalidate): REGNO, ENDREGNO, TREGNO, and TENDREGNO now unsigned.
	New variable RN.
	* dbxout.c (dbxout_parms, dbxout_reg_parms): Don't check for REGNO < 0.
	* dwarf2out.c (dwarf2ou_frame_debug_expr): Remove cast.
	* emit-rtl.c (subreg_realpart_p): Add cast.
	(operand_subword): Arg I is now unsigned as is var PARTWORDS.
	(operand_subword_force): Arg I is now unsigned.
	* except.c (eh_regs): Variable I is now unsigned.
	* explow.c (hard_function_value): BYTES is unsigned HOST_WIDE_INT.
	* expmed.c (store_fixed_bit_field): Position is HOST_WIDE_INT;
	length is unsigned HOST_WIDE_INT; likewise for internal variables.
	(store_split_bit_field, extract_fixed_bit_field): Likewise.
	(extract_split_bit_field, store_bit_field, extract_bit_field):
	Likewise.
	* expr.c (store_constructor_fields, store_constructor, store_field):
	Positions are HOST_WIDE_INT and lengths are unsigned HOST_WIDE_INT.
	(expand_assignment, expand_expr, expand_expr_unaligned): Likewise.
	(do_jump): Likewise.
	(move_by_pieces, move_by_pieces_ninsns, clear_by_pieces):
	MAX_SIZE is now unsigned.
	(emit_group_load): BYTEPOS is HOST_WIDE_INT; BYTELEN is unsigned.
	(emit_group_store): Likewise.
	(emit_move_insn): I now unsigned.
	(store_constructor): Use host_integerp, tree_low_cst, and
	bitsize_unit_node.
	(get_inner_reference): Return bitpos and bitsize as HOST_WIDE_INT.
	Rework all calculations to use trees and new fields.
	* expr.h (promoted_input_arg): Regno now unsigned.
	(store_bit_field, extract_bit_field): Adjust types of pos and size.
	(mark_seen_cases): Arg is HOST_WIDE_INT.
	* flow.c (verify_wide_reg_1): REGNO now unsigned.
	* fold-const.c (decode_field_reference): Size and pos HOST_WIDE_INT;
	precisions and alignments are unsigned.
	(optimize_bit_field_compare, fold_truthop): Likewise.
	(int_const_binop): Adjust threshold for size_int_type_wide call.
	(fold_convert): Likewise.
	(size_int_type_wide): Make table larger and fix thinko that only
	had half of table used.
	(all_ones_mask_p, fold): Precisions are unsigned.
	* function.c (put_reg_info_stack): REGNO is unsigned.
	(instantiate_decl): Size is HOST_WIDE_INT.
	(instantiate_virtual_regs): I is unsigned.
	(assign_parms): REGNO, REGNOI, and REGNOR are unsigned.
	(promoted_input_arg): REGNO is unsigned.
	* function.h (struct function): x_max_parm_reg is now unsigned.
	* gcse.c (max_gcse_regno): Now unsigned.
	(struct null_pointer_info): min_reg and max_reg now unsigned.
	(lookup_set, next_set): REGNO arg now unsigned.
	(compute_hash_table): REGNO and I now unsigned.
	(handle_avail_expr): regnum_for_replacing now unsigned.
	(cprop_insn): REGNO now unsigned.
	(delete_null_pointer_checks_1): BLOCK_REG now pointer to unsigned.
	* ggc-common.c (ggc_mark_tree_children, case FIELD_DECL): New case.
	* global.c (set_preference): SRC_REGNO, DEST_REGNO, and I now unsigned.
	* hard-reg-set.h (reg_class_size): Now unsigned.
	* integrate.c (mark_stores): LAST_REG and I now unsigned; new UREGNO.
	* jump.c (mark_modified_reg): I now unsigned; add cast.
	(rtx_equal_for_thread_p): Add cast.
	* loop.c (max_reg_before_loop): Now unsigned.
	(struct_movable): REGNO now unsigned.
	(try_copy_prop): REGNO arg unsigned.
	(regs_match_p): XN and YN now unsigned.
	(consec_sets_invariant_p, maybe_eliminate_biv): REGNO now unsigned.
	(strength_reduce): Likewise; NREGS also unsigned.
	(first_increment_giv, last_increment_giv unsigned): Now unsigned.
	* loop.h (struct iv_class): REGNO now unsigned.
	(max_reg_before_loop, first_increment_giv, last_increment_giv):
	Now unsigned.
	* machmode.h (mode_size, mode_unit_size): Now unsigned.
	(mode_for_size, smallest_mode_for_size): Pass size as unsigned.
	* optabs.c (expand_binop): I and NWORDS now unsigned.
	(expand_unop): I now unsigned.
	* print-tree.c (print_node): Don't print DECL_FIELD_BITPOS, but do
	print DECL_FIELD_OFFSET and DECL_FIELD_BIT_OFFSET.
	* real.c (significand_size): Now returns unsigned.
	* real.h (significand_size): Likewise.
	* regclass.c (reg_class_size): Now unsigned.
	(choose_hard_reg_mode): Both operands now unsigned.
	(record_reg_classes): REGNO and NR now unsigned.
	(reg_scan): NREGS now unsigned.
	(reg_scan_update): old_max_regno now unsigned.
	(reg_scan_mark_refs): Arg MIN_REGNO and var REGNO now unsigned.
	* reload.c (find_valid_class): BEST_SIZE now unsigned.
	(find_dummy_reload): REGNO, NWORDS, and	I now unsigned.
	(hard_reg_set_here_p): Args BEG_REGNO and END_REGNO now unsigned.
	Likewise for variable R.
	(refers_to_regno_for_reload_p): Args REGNO and END_REGNO now unsigned,
	as are variables INNER_REGNO and INNER_ENDREGNO; add new variable R.
	(find_equiv_reg): Add casts.
	(regno_clobbered_p): Arg REGNO now unsigned.
	* reload.h (struct reload): NREGS now unsigned.
	(refers_to_regno_for_reload_p): Regno args are unsigned.
	(regno_clobbered_p): Likewise.
	* reload1.c (reg_max_ref_width, spill_stack_slot_width): Now unsigned.
	(compute_use_by_pseudos): REGNO now unsigned.
	(find_reg): I and J now unsigned, new variable K, and change loop
	variables accordingly; THIS_NREGS now unsigned.
	(alter_reg): INHERENT_SIZE and TOTAL_SIZE now unsigned.
	(spill_hard_reg): REGNO arg now unsigned; add casts.
	(forget_old_reloads_1): REGNO, NR, and I now unsigned.
	(mark_reload_reg_in_use): Arg REGNO and vars NREGS and I now unsigned.
	(clear_reload_reg_in_use): Arg REGNO and vars NREGS, START_REGNO,
	END_REGNO, CONFLICT_START, and CONFLICT_END now unsigned.
	(reload_reg_free_p, reload_reg_reaches_end_p): Arg REGNO now unsigned.
	(choose_reload_regs): MAX_GROUP_SIZE now unsigned.
	(emit_reload_insns): REGNO now unsigned.
	(reload_cse_move2add): Add cast.
	(move2add_note_store): REGNO and I now unsigned; new variable ENDREGNO
	and rework loop.
	* resource.c (mark_referenced_resources, mark_set_resources): New
	variable R; REGNO and LAST_REGNO now unsigned.
	(mark_target_live_regs): J and REGNO now unsigned.
	* rtl.c (mode_size, mode_unit_size): Now unsigned.
	* rtl.h (union rtunion_def): New field rtuint.
	(XCUINT): New macro.
	(ADDRESSOF_REGNO, REGNO, SUBREG_WORD): New XCUINT.
	(operand_subword, operand_subword_force): Word number is unsigned.
	(choose_hard_reg_mode): Operands are unsigned.
	(refers_to-regno_p, dead_or_set_regno_p): Regno arg is unsigned.
	(find_regno_note, find_regno_fusage, replace_regs): Likewise.
	(regno_use_in, combine_instructions, remove_death): Likewise.
	(reg_scan, reg_scan_update): Likewise.
	(extended_count): Return is unsigned.
	* rtlanal.c (refers_to_regno_p): Args REGNO and ENDREGNO and vars I,
	INNER_REGNO, and INNER_ENDREGNO now unsigned; new variable X_REGNO.
	(reg_overlap_mentioned_p): REGNO and ENDREGNO now unsigned.
	(reg_set_last_first_regno, reg_set_last_last_regno): Now unsigned.
	(reg_reg_last_1): FIRS and LAST now unsigned.
	(dead_or_set_p): REGNO, LAST_REGNO, and I now unsigned.
	(dead_or_set_regno_p): Arg TEST_REGNO and vars REGNO and ENDREGNO
	now unsigned.
	(find_regno_note, regno_use_in): Arg REGNO now unsigned.
	(find_regno_fusage): Likewise; also var REGNOTE now unsigned.
	(find_reg_fusage): Variables REGNO, END_REGNO, and I now unsigned.
	(replace_regs): Arg NREGS now unsigned.
	* sdbout.c (sdbout_parms, sdbout_reg_parms): Don't check REGNO < 0.
	* simplify-rtx.c (simplify_unary_operation): WIDTH now unsigned.
	(simplify_binary_operation): Likewise.
	(cselib_invalidate_regno): Arg REGNO and variables ENDREGNO, I, and
	THIS_LAST now unsigned.
	(cselib_record_set): Add cast.
	* ssa.c (ssa_max_reg_num): Now unsigned.
	(rename_block): REGNO now unsigned.
	* stmt.c (expand_return): Bit positions unsigned HOST_WIDE_INT;
	sizes now unsigned.
	(all_cases_count): Just return -1 not -2.
	COUNT, MINVAL, and LASTVAL now HOST_WIDE_INT.
	Rework tests to use trees whenever possible.
	Use host_integerp and tree_low_cst.
	(mark_seen_cases): COUNT arg now HOST_WIDE_INT;
	Likewise variable NEXT_NODE_OFFSET; XLO now unsigned.
	(check_for_full_enumeration_handing): BYTES_NEEDED, I to HOST_WIDE_INT.
	* stor-layout.c (mode_for_size): SIZE arg now unsigned.
	(smallest_mode_for_size): Likewise.
	(layout_decl): Simplify handing of a specified DECL_SIZE_UNIT.
	KNOWN_ALIGN is now an alignment, so simplify code.
	Don't turn off DECL_BIT_FIELD if field is BLKmode, but not type.
	(start_record_layout): Renamed from new_record_layout_info.
	Update to new fields.
	(debug_rli, normalize_rli, rli_size_unit_so_far, rli_size_so_far):
	New functions.
	(place_union_field): Renamed from layout_union_field.
	Update to use new fields in rli.
	(place_field): Renamed from layout_field.
	Major rewrite to use new fields in rli; pass alignment to layout_decl.
	(finalize_record_size): Rework to use new fields in rli and handle
	union.
	(compute_record_mode): Rework to simplify and to use new DECL fields.
	(finalize_type_size): Make rounding more consistent.
	(finish_union_layout): Deleted.
	(layout_type, case VOID_TYPE): Don't set TYPE_SIZE_UNIT either.
	(layout_type, case RECORD_TYPE): Call new function names.
	(initialize_sizetypes): Set TYPE_IS_SIZETYPE.
	(set_sizetype): Set TYPE_IS_SIZETYPE earlier.
	(get_best_mode): UNIT is now unsigned; remove casts.
	* tree.c (bit_position): Compute from new fields.
	(byte_position, int_byte_position): New functions.
	(print_type_hash_statistics): Cast to remove warning.
	(build_range_type): Use host_integerp and tree_low_cst to try to hash.
	(build_index_type): Likewise; make subtype of sizetype.
	(build_index_2_type): Pass sizetype to build_range_type.
	(build_common_tree_nodes): Use size_int and bitsize_int to
	initialize nodes; add bitsize_{zero,one,unit}_node.
	* tree.h (DECL_FIELD_CONTEXT): Use FIELD_DECL_CHECK.
	(DECL_BIT_FIELD_TYPE, DECL_QUALIFIER, DECL_FCONTEXT): Likewise.
	(DECL_PACKED, DECL_BIT_FIELD): Likewise.
	(DECL_FIELD_BITPOS): Deleted.
	(DECL_FIELD_OFFSET, DECL_FIELD_BIT_OFFSET): New fields.
	(DECL_RESULT, DECL_SAVED_INSNS): Use FUNCTION_DECL_CHECK.
	(DECL_FRAME_SIZE, DECL_FUNCTION_CODE, DECL_NO_STATIC_CHAIN): Likewise.
	(DECL_INLINE, DECL_BUILT_IN_NONANSI, DECL_IS_MALLOC): Likewise.
	(DECL_BUILT_IN_CLASS, DECL_STATIC_CONSTRUCTOR): Likewise.
	(DECL_STATIC_DESTRUCTOR, DECL_NO_CHECK_MEMORY_USAGE): Likewise.
	(DECL_NO_INSTRUMENT_FUNCTION_ENTRY_EXIT, DECL_NO_LIMIT_STACK) Likewise.
	(DECL_ORIGINAL_TYPE, TYPE_DECL_SUPPRESS_DEBUG): Use TYPE_DECL_CHECK.
	(DECL_ARG_TYPE_AS_WRITEN, DECL_ARG_TYPE): Use PARM_DECL_CHECK.
	(DECL_INCOMING_RTL, DECL_TRANSPARENT_UNION): Likewise.
	(DECL_ALIGN): Adjust to new field in union.
	(DECL_OFFSET_ALIGN): New field.
	(DECL_ERROR_ISSUED, DECL_TOO_LATE): Use LABEL_DECL_CHECK.
	(DECL_IN_TEXT_SECTION): Use VAR_DECL_CHECK.
	(union tree_decl): Add struct for both aligns.
	(enum tree_index): Add TI_BITSIZE_{ZERO,ONE,UNIT}.
	(bitsize_zero_node, bitsize_one_node, bitsize_unit_node): Added.
	(struct record_layout_info): Rework fields to have offset
	alignment and byte and bit position.
	(start_record_layout, place_field): Renamed from old names.
	(rli_size_so_far, rli_size_unit_so_far, normalize_rli): New decls.
	(byte_position, int_byte_position): Likewise.
	(get_inner_reference): Change types of position and length.
	* unroll.c (unroll_loop): New variable R; use for some loops.
	MAX_LOCAL_REGNUM and MAXREGNUM now unsigned.
	(calculate_giv_inc): Arg REGNO now unsigned.
	(copy_loop_body): REGNO and SRC_REGNO now unsigned.
	* varasm.c (assemble_variable): Clean up handling of size using
	host_integerp and tree_low_cst.
	(decode_addr_const): Use byte, not bit, position.
	(output_constructor): bitpos and offsets are HOST_WIDE_INT;
	use tree_low_cst and int_bit_position.
	* objc/objc-act.c (build_ivar_list_initializer): Use byte_position.
	* ch/actions.c (check_missing_cases): BYTES_NEEDED is HOST_WIDE_INT.
	* ch/typeck.c (expand_constant_to_buffer): Use int_byte_position.
	(extract_constant_from_buffer): Likewise.
	* cp/class.c (build_vbase_pointer_fields): layout_field now
	place_field.
	(get_vfield_offset): Use byte_position.
	(set_rtti_entry): Set OFFSET to ssizetype zero.
	(get_binfo_offset_as_int): Deleted.
	(dfs_record_base_offsets): Use tree_low_cst.
	(dfs_search_base_offsets): Likewise.
	(layout_nonempty_base_or_field): Reflect changes in RLI format
	and call byte_position.
	(layout_empty_base): Convert offset to ssizetype.
	(build_base_field): use rli_size_unit_so_far.
	(dfs_propagate_binfo_offsets): Do computation in proper type.
	(layout_virtual_bases): Pass ssizetype to propagate_binfo_offsets.
	(layout_class_type): Reflect changes in RLI names and fields.
	(finish_struct_1): Set DECL_FIELD_OFFSET.
	* cp/dump.c (dequeue_and_dump): Call bit_position.
	* cp/expr.c (cplus_expand_constant): Use byte_position.
	* cp/rtti.c (expand_class_desc): Use bitsize_one_node.
	* cp/typeck.c (build_component_addr): Use byte_position and don't
	special case for zero offset.
	* f/com.c (ffecom_tree_canonize_ptr_): Use bitsize_zero_node.
	(ffecom_tree_canonize_ref_): Likewise.
	* java/class.c (make_field_value): Use byte_position.
	* java/expr.c (JAVA_ARRAY_LENGTH_OFFSET): Use byte_position.
	(java_array_data_offset): Likewise.
	* java/java-tree.h (MAYBE_CREATE_TYPE_TYPE_LANG_SPECIFIC): Add case to
	bzero call.

From-SVN: r32742
2000-03-25 13:34:13 -05:00
Kaveh R. Ghazi
3cce094dd9 rtl.h (rtunion_def): Constify member `rtstr'.
* rtl.h (rtunion_def): Constify member `rtstr'.
	(emit_line_note_after, emit_line_note, emit_line_note_force,
	emit_note, decode_asm_operands): Constify.

	* cse.c (canon_hash): Likewise.

	* dbxout.c (dbxout_block): Likewise.

	* diagnostic.c (file_and_line_for_asm, v_error_for_asm,
	v_warning_for_asm): Likewise.

	* dwarfout.c (function_start_label): Likewise.

	* emit-rtl.c (emit_line_note_after, emit_line_note, emit_note,
	emit_line_note_force): Likewise.

	* final.c (last_filename, asm_insn_count, final_scan_insn,
	output_source_line): Likewise.

	* function.h (struct emit_status): Likewise.

	* gcse.c (hash_expr_1): Likewise.

	* genattr.c (gen_attr, main): Likewise.

	* genattrtab.c (struct function_unit, current_alternative_string,
	write_attr_valueq, n_comma_elts, next_comma_elt, attr_eq,
	attr_numeral, check_attr_test, check_attr_value,
	convert_set_attr_alternative, convert_set_attr,
	compute_alternative_mask, simplify_by_exploding, gen_attr,
	gen_unit): Likewise.

	* genflags.c (gen_insn): Likewise.

	* gengenrtl.c (type_from_format): Likewise.

	* genopinit.c (gen_insn): Likewise.

	* genoutput.c (n_occurrences, process_template, process_template):
	Likewise.

	* ggc-page.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size):
	Likewise.

	* ggc-simple.c (ggc_set_mark, ggc_mark_if_gcable, ggc_get_size):
	Likewise.

	* ggc.h (ggc_mark_string, ggc_mark, ggc_mark_if_gcable,
	ggc_set_mark, ggc_get_size): Likewise.

	* objc/objc-act.c (build_module_descriptor, finish_objc): Likewise.

	* optabs.c (init_one_libfunc): Likewise.

	* output.h (assemble_start_function): Likewise.

	* recog.c (decode_asm_operands): Likewise.

	* toplev.c (rest_of_compilation): Likewise.

	* tree.h (emit_line_note_after, emit_line_note,
	emit_line_note_force): Likewise.

	* varasm.c (asm_output_bss, asm_output_aligned_bss,
	asm_emit_uninitialised, assemble_start_function,
	assemble_variable, const_hash, compare_constant_1,
	find_pool_constant, mark_constant_pool, assemble_alias): Likewise.

	* xcoffout.h (DBX_FINISH_SYMBOL): Likewise.

	* alpha/alpha.md (call_vms, call_value_vms): Likewise.

	* arm/aof.h (ASM_OUTPUT_ASCII): Likewise.

	* arm/aout.h (ASM_OUTPUT_ASCII): Likewise.

	* arm/arm-protos.h (output_ascii_pseudo_op, arm_dllexport_name_p,
	arm_dllimport_name_p): Likewise.

	* arm/arm.c (arm_encode_call_attribute, output_ascii_pseudo_op):
	Likewise.

	* arm/arm.h (ASM_OUTPUT_MI_THUNK): Likewise.

	* arm/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* arm/pe.c (arm_dllexport_name_p, arm_dllimport_name_p,
	arm_mark_dllexport, arm_mark_dllimport,
	arm_pe_encode_section_info): Likewise.

	* arm/telf.h (ASM_OUTPUT_DEF_FROM_DECLS,
	ASM_FINISH_DECLARE_OBJECT): Likewise.

	* arm/thumb.c (thumb_function_prologue): Likewise.

	* arm/thumb.h (ASM_OUTPUT_ASCII): Likewise.

	* avr/avr.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* clipper/clix.h (ASM_OUTPUT_ASCII): Likewise.

	* fx80/fx80.h (ASM_OUTPUT_ASCII): Likewise.

	* i386/cygwin.h (ASM_OUTPUT_SECTION_NAME): Likewise.

	* i386/freebsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* i386/i386-interix.h (ASM_OUTPUT_LIMITED_STRING,
	ASM_OUTPUT_ASCII, ASM_OUTPUT_SECTION_NAME): Likewise.

	* i386/i386-protos.h (asm_output_function_prefix): Likewise.

	* i386/i386.c (asm_output_function_prefix): Likewise.

	* i386/i386elf.h (ASM_OUTPUT_ASCII): Likewise.

	* i386/osfrose.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* i386/ptx4-i.h (ASM_OUTPUT_ASCII): Likewise.

	* i386/sco5.h (ASM_FINISH_DECLARE_OBJECT,
	ASM_OUTPUT_LIMITED_STRING, ASM_OUTPUT_ASCII,
	ASM_OUTPUT_SECTION_NAME): Likewise.

	* i386/sysv4.h (ASM_OUTPUT_ASCII): Likewise.

	* i860/paragon.h (ASM_OUTPUT_ASCII): Likewise.

	* i860/sysv3.h (ASM_OUTPUT_ASCII): Likewise.

	* m32r/m32r.c (m32r_encode_section_info): Likewise.

	* mcore-elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* mcore/mcore.c (mcore_encode_section_info): Likewise.

	* mips/elf.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* mips/elf64.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* mips/iris6.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* mips/mips.h (ASM_OUTPUT_IDENT): Likewise.

	* mips/mips.md (movdi, movsi): Likewise.

	* mips/netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* netbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* openbsd.h (ASM_FINISH_DECLARE_OBJECT): Likewise.

	* ptx4.h (ASM_FINISH_DECLARE_OBJECT, ASM_OUTPUT_LIMITED_STRING,
	ASM_OUTPUT_ASCII): Likewise.

	* rs6000/rs6000.c (rs6000_allocate_stack_space, output_epilog,
	output_mi_thunk, output_toc): Likewise.

	* rs6000/rs6000.md (movsi): Likewise.

	* rs6000/sysv4.h (ASM_OUTPUT_INT, ASM_OUTPUT_SECTION_NAME): Likewise.

	* tahoe/harris.h (ASM_OUTPUT_ASCII): Likewise.

	* v850/v850.c (print_operand, print_operand_address,
	v850_encode_data_area): Likewise.

ch:
	* grant.c (globalize_decl): Constify a char*.

cp:
	* decl2.c (finish_objects): Constify a char*.

	* method.c (emit_thunk): Likewise.

From-SVN: r32388
2000-03-07 20:39:10 +00:00
Alexandre Oliva
141b581084 gcse.c (compute_can_copy): Adjust if/else blocks from rth's patch from 2000-01-28.
* gcse.c (compute_can_copy): Adjust if/else blocks from rth's
patch from 2000-01-28.

From-SVN: r32375
2000-03-07 03:43:03 +00:00
Jason Merrill
a0ac9e5a4a * gcse.c (dump_hash_table): Really fix error in last change.
From-SVN: r32306
2000-03-03 03:28:43 -05:00
Richard Kenner
21318741bb c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink reference the language-equivalent of sizetype.
* c-common.c (c_common_nodes_and_builtins): Make sizetype_endlink
	reference the language-equivalent of sizetype.
	* c-typeck.c (comptypes): Treat sizetype like its language equivalent.
	* fold-const.c (size_binop, size_diffop): Put back checks.
	* gcse.c (dump_hash_table): Fix minor error in last change.
	* stor-layout.c (set_sizetype): Set TYPE_DOMAIN of sizetype.
	Clear TYPE_{NEXT,MAIN}_VARIANT and TYPE_{POINTER,REFERENCE}_to of
	all sizetypes.
	* cp/typeck.c (comptypes): Treat sizetype like its language equivalent.

From-SVN: r32291
2000-03-02 13:29:56 -05:00
Richard Kenner
c4c8160189 gcse.c: Cleanups throughout: mostly white-space, but also some minor rearrangement of code.
* gcse.c: Cleanups throughout: mostly white-space, but also
	some minor rearrangement of code.

From-SVN: r32264
2000-02-29 15:08:52 -05:00
Richard Henderson
19d3c25c9a flow.c (find_basic_blocks): Remove do_cleanup argument.
* flow.c (find_basic_blocks): Remove do_cleanup argument.
        Break out that code ...
        (cleanup_cfg): ... here.
        (commit_one_edge_insertion): Detect a return instruction being
        emitted to an edge.  Emit a barrier following; clear fallthru.
        (commit_edge_insertions): Verify CFG consistency.
        * function.c (expand_function_start): Kill unused variable.
        (expand_function_end): Likewise.
        (thread_prologue_and_epilogue_insns): Use insert_insn_on_edge
        to insert the epilogue.

        * gcse.c (gcse_main): Adjust for find_basic_blocks change.
        (delete_null_pointer_checks): Likewise.
        * output.h: Likewise.
        * reg-stack.c (reg_to_stack): Likewise.
        * toplev.c (rest_of_compilation): Likewise.  Run
        thread_prologue_and_epilogue_insns after rebuilding the CFG.

From-SVN: r31676
2000-01-28 14:22:50 -08:00
John Wehle
b522962825 gcse.c (insert_insn_end_bb): Use emit_block_insn_before instead of emit_insn_before.
* gcse.c (insert_insn_end_bb): Use emit_block_insn_before
	instead of emit_insn_before.  Also handle NOTE_INSN_BASIC_BLOCK
	when walking backwards to find all the parameter loads when
	the basic block ends in a call.

From-SVN: r31437
2000-01-15 20:46:21 +00:00
Kaveh R. Ghazi
711d877c9e eh-common.h: PROTO -> PARAMS.
* eh-common.h: PROTO -> PARAMS.
	* emit-rtl.c: Likewise.
	* errors.c: Likewise.
	* errors.h: Likewise.
	* except.c: Likewise.
	* except.h: Likewise.
	* explow.c: Likewise.
	* expmed.c: Likewise.
	* expr.c: Likewise.
	* expr.h: Likewise.
	* final.c: Likewise.
	* fix-header.c: Likewise.
	* flow.c: Likewise.
	* fold-const.c: Likewise.
	* function.c: Likewise.
	* function.h: Likewise.
	* gcc.c: Likewise.
	* gcov-io.h: Likewise.
	* gcov.c: Likewise.
	* gcse.c: Likewise.

From-SVN: r31419
2000-01-14 17:14:43 +00:00
Nick Burrett
40d7a3fece gcse.c (delete_null_pointer_checks_1): Cope when get_condition cannot determine the condition.
* gcse.c (delete_null_pointer_checks_1): Cope when
	get_condition cannot determine the condition.

From-SVN: r31347
2000-01-12 03:16:04 -07:00
Jeff Law
dd1bd86318 cse.c (cse_insn): Missing cast added.
* cse.c (cse_insn): Missing cast added.
	* loop.c (loop_reg_used_before_p): Ditto.
	* gcse.c (Pre_gcse, hoist_code): Ditto.
	* varasm.c (decode_rtx_const): Ditto.
	* except.c (push_ehqueue): Ditto.
	* cccp.c (index0): Ditto.
	* toplev.c (main): Useless `&' removed before function name.

From-SVN: r31229
2000-01-04 23:55:02 -07:00
Jan Hubicka
833fc3ad23 gcse.c (try_replace_reg): Do replacements in REG_EQUAL/REG_EQUIV notes too...
* gcse.c (try_replace_reg): Do replacements in REG_EQUAL/REG_EQUIV
	notes too, create one when replacement failed, attempt to simplify
	resulting notes.
	(cprop_insn): Propagate even to registers mentioned only in REG_EQUAL
	or REG_EQUIV notes.

From-SVN: r30992
1999-12-17 11:10:58 +00:00
Jeffrey A Law
6b8cf0c57c basic-block.h: Remove all #defines and prototypes related to integer lists.
* basic-block.h: Remove all #defines and prototypes related to
        integer lists.
        (free_bb_mem, compute_preds_succs): Remove prototype.
        * rtl.h (free_bb_mem): Remove prototype.
        * flow.c (alloc_int_list_node); Remove function.
        (add_inst_list_node, free_int_list, add_pred_succ): Likewise.
        (compute_preds_succs, free_bb_mem): Likewise.
        * gcse.c (gcse_main): Do not call free_bb_mem anymore.
        * toplev.c (rest_of_compilation): Likewise.
        * haifa-sched.c (build_control_flow): Use flow generated edge
        list to build the haifa specific edge list.
        (find_rgns): Use new CFG data structures instead of pred/succ lists.
        (schedule_insns): Do not build pred/succ lists anymore.  Instead
        build the edge table.

From-SVN: r30531
1999-11-15 01:12:29 -07:00
Jeffrey A Law
b71a2ff8fc gcse.c (delete_null_pointer_checks_1): Kill unused s_preds argument.
* gcse.c (delete_null_pointer_checks_1): Kill unused s_preds
        argument.  All callers changed.
        (delete_null_pointer_checks_1): No longer need to compute the
        pred/succ lists.

From-SVN: r30529
1999-11-14 23:18:36 -07:00
Jeffrey A Law
89e606c966 gcse.c (pre_expr_reaches_here_p): Kill CHECK_PRE_COM argument.
* gcse.c (pre_expr_reaches_here_p): Kill CHECK_PRE_COM argument.
        All callers changed.
        (pre_expr_reaches_here_p_work): Likewise.
        (pre_edge_insert): No longer call pre_expr_reaches_here_p.
        * lcm.c (compute_laterin): Fix initialization of LATER.
        (compute_nearerout): Similarly for NEARER.

From-SVN: r30528
1999-11-14 23:12:50 -07:00
Jeffrey A Law
ce72425040 flow.c (compute_flow_dominators): Initially put all blocks on the worklist.
* flow.c (compute_flow_dominators): Initially put all blocks on
        the worklist.
        * lcm.c (compute_antinout_edge, compute_available): Similarly.
        * gcse.c (compute_cprop_avinout): Remove.
        (compute_cprop_data): Use compute_available.
        (delete_null_pointer_checks_1): Use compute_available.

From-SVN: r30484
1999-11-11 02:21:12 -07:00
Jeffrey A Law
bd0eaec24a basic-block.h (compute_available): Returns a void now.
* basic-block.h (compute_available): Returns a void now.
        * gcse.c (one_classic_gcse_pass): Do not expect compute_available
        to return a value anymore.
        * lcm.c (compute_available, compute_antinout_edge): Revamp to use
        worklists.  Fix boundary cases. Compute maximal solutions.
        (compute_laterin, compute_nearerout): Similarly.

From-SVN: r30482
1999-11-10 23:38:15 -07:00
Mark Mitchell
4da896b292 cse.c (delete_trivially_dead_insns): Replace alloca with xmalloc/xcalloc.
* cse.c (delete_trivially_dead_insns): Replace alloca with
	xmalloc/xcalloc.
	* except.c (update_rethrow_references): Likewise.
	(init_eh_nesting_info): Likewise.
	* function.c (identify_blocks): Likewise.
	* gcse.c (dump_hash_table): Likewise.
	* graph.c (print_rtl_graph_with_bb): Likewise.
	* loop.c (combine_movables): Likewise.
	(move_movables): Likewise.
	(count_loop_regs_set): Likewise.
	(strength_reduce): Likewise.
	* profile.c (compute_branch_probabilities): New function, split
	out from ...
	(branch_prob): Here.  Replace alloca with xmalloc/xcalloc.
	* regclass.c (regclass): Likewise.
	* regmove.c (regmove_optimize): Likewise.
	* toplev.c (compile_file): Likewise.
	(main): Don't mess with the stack rlimit.

From-SVN: r30445
1999-11-08 04:56:18 +00:00
Jeffrey A Law
092ae4ba98 gcse.c (post_dominators): Kill.
* gcse.c (post_dominators): Kill.
        (alloc_code_hoist_mem, free_code_hoist_mem); Kill post_dominators.
        (compute_code_hoist_data): Use compute_flow_dominators.  Do not
        pass in a pdom array since we do not need pdoms.
        * haifa-sched.c (schedule_insns): Similarly.
        * flow.c (compute_dominators): Remove dead function.
        (compute_flow_dominators): Do not compute doms or pdoms if the
        caller does not request them.  Split up loop to build doms and
        pdoms.  Use a worklist to compute doms and pdoms.
        * basic-block.h (compute_dominators): Remove prototype.

From-SVN: r30437
1999-11-06 17:36:35 -07:00
Mark Mitchell
0511851c7b gcse.c (struct null_pointer_info): New type.
* gcse.c (struct null_pointer_info): New type.
	(get_bitmap_width): New function.
	(current_block): Remove.
	(nonnull_local): Likewise.
	(nonnull_killed): Likewise.
	(invalidate_nonnull_info): Take a null_pointer_info as input.
	(delete_null_pointer_checks_1): New function.
	(delete_null_pointer_checks): Use it.

From-SVN: r30384
1999-11-03 22:45:45 +00:00
Kaveh R. Ghazi
a8f227e703 flow.c (debug_flow_info): Add prototype.
* flow.c (debug_flow_info): Add prototype.

        * gcc.c (main): Likewise.

        * gcse.c (expr_reaches_here_p_work, pre_expr_reaches_here_p_work):
        Likewise.

        * reload1.c (failed_reload, set_reload_reg): Likewise.

        * mips-tfile.c (main): Likewise.
        (pfatal_with_name, fancy_abort, botch, fatal, catch_signal): Mark
        with ATTRIBUTE_NORETURN.

From-SVN: r30262
1999-10-29 17:51:38 +00:00
Mark Mitchell
5faf03ae77 except.c (free_eh_nesting_info): Free the info itself.
* except.c (free_eh_nesting_info): Free the info itself.
	* function.c (free_after_compilation): Don't free NULL.
	* gcse.c (alloc_pre_mem): Free the temp_bitmap, too.
	(pre_edge_insert): Free inserted.
	* stmt.c (free_stmt_status): Don't free NULL.

From-SVN: r30255
1999-10-29 09:49:23 +00:00
Mark Mitchell
9ed5879d10 gcse.c (delete_null_pointer_checks): Fix typo in this change: Thu Oct 28 02:15:22 1999 Jeffrey A Law (law@cygnus.com).
* gcse.c (delete_null_pointer_checks): Fix typo in this change:
	Thu Oct 28 02:15:22 1999  Jeffrey A Law  (law@cygnus.com).

From-SVN: r30243
1999-10-28 16:42:14 +00:00
Jeffrey A Law
5ae520d023 gcse.c (delete_null_pointer_checks): Only record non-null info for pseudos when examining stores.
* gcse.c (delete_null_pointer_checks): Only record non-null info
        for pseudos when examining stores.

From-SVN: r30231
1999-10-28 03:08:43 -06:00
Mark Mitchell
848323170b rtl.h (note_stores): Add additional paramter.
* rtl.h (note_stores): Add additional paramter.
	* rtlanal.c (reg_set_p_1): Take additional paramter.
	(reg_set_last_1): Likewise.
	(reg_set_p): Adjust call to note_stores.
	(reg_set_last): Likewise.
	(note_stores): Pass data parameter to worker function.
	* alias.c (record_set): Take additional parameter.
	(init_alias_analysis): Pass it.
	* caller-save.c (mark_set_regs): Take additional parameter.
	(save_call_clobbered_regs): Pass NULL to note_stores.
	* combine.c (set_nonzero_bits_and_sign_copies): Take additional
	parameter.
	(record_dead_and_set_regs_1): Likewise.
	(reg_dead_at_p_1): Likewise.
	(combine_instructions): Adjust calls to note_stores.
	(try_combine): Likewise.
	(record_dead_insn): Remove.
	(record_dead_and_set_regs): Adjust calls to note_stores.
	(reg_dead_at_p): Likewise.
	* cse.c (invalidate_skipped_set): Take additional parameter.
	(cse_check_loop_start): Likewise.
	(cse_check_loop_start_value): Remove.
	(cse_set_around_loop): Adjust calls to note_stores.
	* flow.c (notice_stack_pointer_modification): Take additional
	parameter.  Remove duplicate declaration.
	(record_volatile_insns): Adjust calls to note_stores.
	* gcse.c (record_set_info): Take additional parameter.
	(record_last_set_info): Likewise.
	(invalidate_nonnull_info): Likewise.
	(record_set_insn): Remove.
	(compute_sets): Adjust calls to note_stores.
	(last_set_insn): Remove.
	(compute_hash_table): Adjust calls to note_stores.
	(insert_insn_end_bb): Likewise.
	(delete_null_pointer_checks): Likewise.
	* global.c (mark_reg_store): Take additional parameter.
	(mark_reg_clobber): Likewise.
	(reg_becomes_live): Likewise.
	(global_conflicts): Adjust calls to note_stores.
	(build_insn_chain): Likewise.
	* integrate.c (note_modified_parmregs): Take additional parameter.
	(mark_stores): Likewise.  Make it static.
	(save_for_inline_nocopy): Adjust calls to note_stores.
	(try_constants): Likewise.
	* integrate.h (mark_stores): Remove declaration.
	* jump.c (mark_modified_reg): Take additional parameter.
	(thread_jumps): Adjust calls to note_stores.
	* local-alloc.c (validate_equiv_mem_from_store): Take additional
	parameter.
	(no_equiv): Likewise.
	(reg_is_set): Likewise.
	(validate_equiv_mem): Adjust calls to note_stores.
	(update_equiv_regs): Likewise.
	(block_alloc): Likewise.
	* loop.c (note_set_pseudo_multiple_uses_retval): Remove.
	(note_addr_stored): Take additional parameter.
	(note_set_pseudo_multiple_uses): Likewise.
	(record_initial): Likewise.
	(prescan_loop): Adjust calls to note_stores.
	(strength_reduce): Likewise.
	(check_dbra_loop): Likewise.
	* regmove.c (flags_set_1): Take additional paramter.
	(mark_flags_life_zones): Adjust calls to note_stores.
	* reload1.c (mark_not_eliminable): Take additional parameter.
	(forget_old_reloads_1): Likewise.
	(reload_cse_invalidate_rtx): Likewise.
	(reload_cse_check_clobber): Likewise.
	(reload_combine_note_store): Likewise.
	(move2add_note_store): Likewise.
	(reload): Adjust calls to note_stores.
	(reload_as_needed): Likewise.
	(emit_reload_insns): Likewise.
	(reload_cse_regs_1): Likewise.
	(reload_cse_record_set): Adjust calls to reload_cse_invalidate_rtx.
	(reload_combine): Adjust calls to note_stores.
	* resource.c (update_live_status): Take additional paramter.
	(mark_target_live_regs): Adjust calls to note_stores.
	* stupid.c (find_clobbered_regs): Take additional parameter.
	(stupid_life_analysis): Adjust calls to note_stores.

From-SVN: r30221
1999-10-27 19:27:41 +00:00