Commit Graph

7 Commits

Author SHA1 Message Date
Kaveh R. Ghazi ce1cc601f5 Warning fixes:
* builtins.c (c_getstr): Constify variable.
	* gmon-sol2.c (_mcleanup): Comment out #endif labels.
	* conflict.c (const_conflict_graph_arc): New typedef.
	(arc_hash, arc_eq): Avoid needlessly casting away const-ness.
	* cppmacro.c (builtin_macro): Likewise.
	* dwarf2out.c (output_comp_unit): Constify variable.
	* fix-header.c (v_fatal): Add ATTRIBUTE_PRINTF.
	* protoize.c (IS_SAME_PATH_CHAR): Use TOUPPER, not toupper.
	* ssa.c (ssa_rename_from_hash_function): Avoid needlessly casting
	away const-ness.
	* tradcpp.c (rescan, do_line, macroexpand, macarg): Use
	ISALNUM/ISDIGIT/ISPRINT, not isalnum/isdigit/isprint.
	* varasm.c (const_str_htab_hash, const_str_htab_eq,
	compare_constant_1, record_constant_1): Constify.

From-SVN: r37565
2000-11-19 13:15:51 +00:00
Richard Henderson d98a8d38dd conflict.c (conflict_graph_compute): Don't look for REG_INC.
* conflict.c (conflict_graph_compute): Don't look for REG_INC.

        * config/ia64/ia64.c (ia64_setup_incoming_varargs): Don't emit
        auto-inc code.

From-SVN: r34557
2000-06-14 14:08:15 -07:00
Richard Kenner efc9bd412d cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.
* cse.c (cse_basic_block): Only call find_reg_note if REG_NOTES not 0.
	* reload.c (find_equiv_reg): Likewise.
	* alias.c (init_alias_analysis): Likewise.
	Only call prologue_epilogue_contains on insns.
	* basic-block.h (REG_SET_TO_HARD_REG_SET): Call new function.
	* bb-reorder.c (hard-reg-set.h): Include earlier.
	* haifa-sched.c (hard-reg-set.h): Likewise.
	* ifcvt.c (hard-reg-set.h): Likewise.
	* local-alloc.c (hard-reg-set.h): Likewise.
	* loop.c (hard-reg-set.h): Likewise.
	* predict.c (hard-reg-set.h): Likewise.
	* regrename.c (hard-reg-set.h): Likewise.
	* flow.c (hard-reg-set.h): Likewise.
	(reg_set_to_hard_reg_set): New function.
	* bitmap.c (regs.h, basic-block.h): No longer include.
	(bitmap.h): Now include.
	* conflict.c (hard-reg-set.h): Include.
	* profile.c (hard-reg-set.h): Likewise.
	* print-rtl.c (hard-reg-set.h): Likewise.
	* sbitmap.c (hard-reg-set.h): Likewise.
	* toplev.c (hard-reg-set.h): Likewise.
	* unroll.c (hard-reg-set.h, basic-block.h): Likewise.
	* hard-reg-set.h (reg_names): Now constant.
	* regs.h (reg_names): Likewise.
	* regclass.c (reg_names): Likewise.
	* loop.h (basic-block.h): No longer include.
	(bitmap.h): Now include.
	* reload1.c (order_regs_for_reload): Avoid loop over reg sets.
	* Makefile.in (LOOP_H, sbitmap.o, profile.o): Reflect above changes.
	(toplev.o, print-rtl.o, conflict.o, unroll.o, bitmap.o): Likewise.

From-SVN: r34039
2000-05-19 18:27:28 -04:00
Richard Kenner f64bedbd7d conflict.c (conflict_graph_add): Pass enum type to htab_find_slot.
* gcc/conflict.c (conflict_graph_add): Pass enum type to
	htab_find_slot.
	* gcc/cpperror.c (hashtab.h): Now include.
	* gcc/cppexp.c (hashtab.h): Likewise.
	* gcc/cpplex.c (hashtab.h): Likewise.
	* gcc/cppfiles.c (hashtab.h): Likewise.
	(find_include_file, _cpp_calc_hash, cpp_read_file): Pass enum type
	to htab_find_slot_with_hash.
	* gcc/cpphash.c (hashtab.h): Now include.
	(_cpp_lookup_slot): INSERT is now enum insert_option.
	* gcc/cpphash.h (_cpp_lookup_slot): Likewise.
	* gcc/cppinit.c (hashtab.h): Include earlier.
	(initialize_builtins): Pass enum to htab_find_slot.
	* gcc/cpplib.c (hashtab.h): Now include.
	(do_define, do_undef): Pass enum type to _cpp_lookup_slot.
	(do_pragma_poison, do_assert): Likewise.
	* gcc/emit-rtl.c (gen_rtx_CONST_INT): Pass enum to
	htab_find_slot_with_hash.
	* gcc/simplify-rtx.c (cselib_lookup_mem, cselib_lookup): Likewise.
	* gcc/tree.c (type_hash_add): Likewise.
	(build1): Minor cleanup.
	* include/hashtab.h (enum insert_option): New type.
	(htab_find_slot, htab_find_slot_with_hash): Use it.
	* libiberty/hashtab.c: Various minor cleanups.
	(htab_find_slot_with_hash): INSERT is now enum insert_option.
	(htab_find_slot): Likewise.

From-SVN: r33260
2000-04-19 12:04:14 -04:00
Richard Kenner 749a2da1ba c-decl.c (mark_binding_level): Use 'for' instead of `while'.
* c-decl.c (mark_binding_level): Use 'for' instead of `while'.
	* conflict.c: Minor cleanups.
	* optabs.c: Add blank line
	* simplify-rtx.c:

From-SVN: r33226
2000-04-18 14:14:10 -04:00
Alex Samuel 62771d5186 ssa.c (compute_conservative_reg_partition): Declare with void arguments.
* ssa.c (compute_conservative_reg_partition): Declare with
	void arguments.
	* toplev.c (clean_dump_file): Remove previously-deleted function
	inadvertantly merged back in.
	* conflict.c (conflict_graph_add): Use a single call to
	htab_find_slot to look up and insert.

From-SVN: r32992
2000-04-07 08:16:31 +00:00
Alex Samuel 4e872036e8 rtl.h (INSN_P): New macro.
* rtl.h (INSN_P): New macro.
	(successor_phi_fn): New typedef.
	(for_each_successor_phi): New prototype.
	(in_ssa_form): New variable.
	(PHI_NODE_P): Likewise.
	* flow.c (calculate_global_regs_live): Add to new_live_at_end from
	phi nodes in successors.
	(mark_used_regs): Add PHI case.
	(set_phi_alternative_reg): New function.
	(life_analysis): Assert that dead code elimination is not selected
	when in SSA form.
	* toplev.c (to_ssa_time): New variable.
	(from_ssa_time): Likewise.
	(compile_file): Zero to_ssa_time and from_ssa_time.
	Print time to convert to and from SSA.
	(rest_of_compilation): Time convert_to_ssa and convert_from_ssa.
	(print_time): Compute percent fraction as integer.
	* ssa.c (PHI_NODE_P): Moved to rtl.h.
	(convert_to_ssa): Check if we're already in SSA.
	Don't eliminate dead code in life_analysis.
	Rerun flow and life analysis at bottom.
	(eliminate_phi): Use canonical regnos when adding nodes.
	(mark_reg_in_phi): New function.
	(mark_phi_and_copy_regs): Likewise.
	(convert_from_ssa): Rerun life analysis at top.
	Use coalesced partition.
	Check for removing a phi node at the end of the block.
	(compute_coalesced_reg_partition): New function.
	(coalesce_regs_in_copies): Likewise.
	(coalesce_reg_in_phi): Likewise.
	(coalesce_regs_in_sucessor_phi_nodes): Likewise.
	(for_each_successor_phi): Likewise.
	(rename_context): New struct.
	(rename_block): Use a rename_context with rename_insn_1.  When
	renaming sets of a subreg, emit a copy of the entire reg first.
	(rename_insn_1): Treat data as a rename_context *.  Save current
	insn in set_data.
	(rename_set_data): Add field set_insn.
	* Makefile.in (HASHTAB_H): Move up in file.
	(OBSTACK_H): New macro.
	(collect2.o): Use OBSTACK_H in dependencies.
	(sdbout.o): Likewise.
	(emit-rtl.o): Likewise.
	(simplify-rtx.o): Likewise.
	(fix-header.o): Likewise.
	(OBJS):	Add conflict.o.
	(conflict.o): New rule.
	* basic-block.h: Include partition.h.
	(conflict_graph): New typedef.
	(conflict_graph_enum_fn): Likewise.
	(conflict_graph_new): New prototype.
	(conflict_graph_delete): Likewise.
	(conflict_graph_add): Likewise.
	(conflict_graph_conflict_p): Likewise.
	(conflict_graph_enum): Likewise.
	(conflict_graph_merge_regs): Likewise.
	(conflict_graph_print): Likewise.
	(conflict_graph_compute): Likewise.
	* conflict.c: New file.

From-SVN: r32979
2000-04-06 21:22:49 +00:00