Commit Graph

210 Commits

Author SHA1 Message Date
Kazu Hirata f7448d502c reg-stack.c (move_for_stack_reg): Remove local variable push_insn.
* reg-stack.c (move_for_stack_reg): Remove local variable
	push_insn.
	(compare_for_stack_reg): Remove local variable flags_user.
	(convert_regs_1): Remove local variable deleted.

From-SVN: r96345
2005-03-12 18:34:42 +00:00
Richard Henderson 5ad85f7dc8 re PR rtl-optimization/17186 (ICE in move_for_stack_reg, at reg-stack.c:1065)
PR rtl-opt/17186
        * reg-stack.c (move_nan_for_stack_reg): New.
        (subst_stack_regs_pat): Use it.
        (move_for_stack_reg): Handle source register not live with a nan.

From-SVN: r92073
2004-12-12 18:32:06 -08:00
Kazu Hirata 3d5eef4c94 * reg-stack.c (convert_regs_2): Free stack.
From-SVN: r92049
2004-12-12 15:59:31 +00:00
Roger Sayle 00fc055e05 reg-stack.c (change_stack): Avoid placing the new top-of-stack in its correct location during popping if...
* reg-stack.c (change_stack): Avoid placing the new top-of-stack in
	its correct location during popping if we need to permute the stack
	afterwards.  Attempt to preserve the original stack ordering.

From-SVN: r92043
2004-12-12 01:41:27 +00:00
Roger Sayle 0cc5dec18a reg-stack.c (change_stack): Improve algorithm used to pop regs off the stack to maximize ffreep usage and...
* reg-stack.c (change_stack): Improve algorithm used to pop regs
	off the stack to maximize ffreep usage and reduce fxch count.

From-SVN: r91506
2004-11-30 02:34:56 +00:00
Steven Bosscher d67fb775b3 cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and HARD_REGISTER_NUM_P.
* cse.c (CHEAP_REGNO): Redefine using REGNO_PTR_FRAME_P and
	HARD_REGISTER_NUM_P.

	* cselib.c (new_cselib_val): Make comment correct and more detailed.
	* flow.c (mark_set_1): Likewise.

	* except.c (duplicate_eh_region_1, duplicate_eh_region_2,
	duplicate_eh_regions): Remove.
	* except.h (duplicate_eh_regions): Remove prototype.
	* integrate.c (get_label_from_map, copy_rtx_and_substitute,
	global_const_equiv_varray): Remove.
	* integrate.h (get_label_from_map, copy_rtx_and_substitute,
	global_const_equiv_varray, set_label_in_map): Remove prototypes,
	extern declaration, and #define.
	(MAYBE_EXTEND_CONST_EQUIV_VARRAY, SET_CONST_EQUIV_DATA): Remove.
	(struct inline_remap): Remove.
	* varray.c (struct element): Remove entry for const_equiv_data.
	* varray.h (struct const_equiv_data): Remove.
	(enum varray_data_enum) <VARRAY_DATA_CONST_EQUIV>: Remove.
	(union varray_data_tag) <const_equiv>: Remove.
	(VARRAY_CONST_EQUIV_INIT, VARRAY_CONST_EQUIV,
	VARRAY_PUSH_CONST_EQUIV, VARRAY_TOP_CONST_EQUIV): Remove.

	* regstack.c (record_label_references): Remove unused function.

	* rtl.def (VALUE): Update comment.
	(LABEL_REF): Remove unused operand 2.
	* rtl.h (struct rtx_def): Update for removed accessor macros.
	(XCADVFLAGS, INSN_DEAD_CODE_P, LINE_NUMBER, CONTAINING_INSN,
	REG_LOOP_TEST_P): Remove.
	(ADDR_DIFF_VEC_FLAGS, CSELIB_VAL_PTR, LABEL_NEXTREF): Add comments.
	* web.c (entry_register): Don't copy REG_LOOP_TEST_P.
	* doc/rtl.texi (INSN_DEAD_CODE_P, REG_LOOP_TEST_P): Remove.

From-SVN: r90580
2004-11-13 14:18:04 +00:00
Joseph Myers 9e637a2679 builtins.c, [...]: Avoid "`" as left quote, using "'" or %q, %< and %> as appropriate.
* builtins.c, c-common.c, c-decl.c, c-format.c, c-format.h,
	c-parse.in, c-pch.c, c-pragma.c, collect2.c, final.c, gcc.c,
	gcov.c, opts.c, pretty-print.h, protoize.c, reg-stack.c, rtl.c,
	tlink.c, config/alpha/alpha.c, config/arc/arc.c, config/arm/arm.c,
	config/avr/avr.c, config/c4x/c4x.c, config/darwin.c,
	config/frv/frv.c, config/h8300/h8300.c, config/i386/i386.c,
	config/i386/winnt.c, config/ia64/ia64.c, config/ip2k/ip2k.c,
	config/iq2000/iq2000.c, config/m32r/m32r.c,
	config/m68hc11/m68hc11.c, config/m68k/m68k.c, config/m68k/m68k.h,
	config/mcore/mcore.c, config/mips/mips.c, config/mmix/mmix.c,
	config/ns32k/ns32k.c, config/rs6000/host-darwin.c,
	config/rs6000/rs6000.c, config/s390/s390.c, config/sh/sh.c,
	config/sh/symbian.c, config/stormy16/stormy16.c,
	config/v850/v850.c: Avoid "`" as left quote, using "'" or %q, %<
	and %> as appropriate.  Use %' as apostrophe in diagnostics where
	applicable.  Use %< and %> in place of '' quotes where applicable.
	Use %qs in place of %<%s%>.  Consistently quote __builtin function
	names.

ada:
	* misc.c (gnat_handle_option): Use %< and %> for quoting in
	warning message.

cp:
	* call.c, class.c, decl.c, decl2.c, error.c, mangle.c, parser.c,
	pt.c, search.c, semantics.c, typeck.c: Use %q, %< and %> for
	quoting in diagnostics.
	* parser.c (cp_parser_sizeof_operand): Use '' instead of `' for
	quoting in printf format.
	* decl.c (duplicate_decls, start_decl): Use %qD instead of
	unquoted %D.

objc:
	* objc-act.c: Use %q, %< and %> for quoting in diagnostics.

testsuite:
	* gcc.dg/builtin-prefetch-1.c: Adjust expected messages.

From-SVN: r90337
2004-11-09 10:13:30 +00:00
Ben Elliston 628f6a4e7c backport: basic-block.h: Include vec.h, errors.h.
2004-09-24  Ben Elliston  <bje@au.ibm.com>
	    Steven Bosscher  <stevenb@suse.de>
	    Andrew Pinski  <pinskia@physics.uc.edu>

	Merge from edge-vector-branch:
	* basic-block.h: Include vec.h, errors.h. Instantiate a VEC(edge).
	(struct edge_def): Remove pred_next, succ_next members.
	(struct basic_block_def): Remove pred, succ members.  Add preds
	and succs members of type VEC(edge).
	(FALLTHRU_EDGE): Redefine using EDGE_SUCC.
	(BRANCH_EDGE): Likewise.
	(EDGE_CRITICAL_P): Redefine using EDGE_COUNT.
	(EDGE_COUNT, EDGE_I, EDGE_PRED, EDGE_SUCC): New.
	(edge_iterator): New.
	(ei_start, ei_last, ei_end_p, ei_one_before_end_p): New.
	(ei_next, ei_prev, ei_edge, ei_safe_edge): Likewise.
	(FOR_EACH_EDGE): New.
	* bb-reorder.c (find_traces): Use FOR_EACH_EDGE and EDGE_* macros
	where applicable.
	(rotate_loop): Likewise.
	(find_traces_1_route): Likewise.
	(bb_to_key): Likewise.
	(connect_traces): Likewise.
	(copy_bb_p): Likewise.
	(find_rarely_executed_basic_blocks_and_crossing_edges): Likewise.
	(add_labels_and_missing_jumps): Likewise.
	(fix_up_fall_thru_edges): Likewise.
	(find_jump_block): Likewise.
	(fix_crossing_conditional_branches): Likewise.
	(fix_crossing_unconditional_branches): Likewise.
	(add_reg_crossing_jump_notes): Likewise.
	* bt-load.c (augment_live_range): Likewise.
	* cfg.c (clear_edges): Likewise.
	(unchecked_make_edge): Likewise.
	(cached_make_edge): Likewise.
	(make_single_succ_edge): Likewise.
	(remove_edge): Likewise.
	(redirect_edge_succ_nodup): Likewise.
	(check_bb_profile): Likewise.
	(dump_flow_info): Likewise.
	(alloc_aux_for_edges): Likewise.
	(clear_aux_for_edges): Likewise.
	(dump_cfg_bb_info): Likewise.
	* cfganal.c (forwarder_block_p): Likewise.
	(can_fallthru): Likewise.
	(could_fall_through): Likewise.
	(mark_dfs_back_edges): Likewise.
	(set_edge_can_fallthru_flag): Likewise.
	(find_unreachable_blocks): Likewise.
	(create_edge_list): Likewise.
	(verify_edge_list): Likewise.
	(add_noreturn_fake_exit_edges): Likewise.
	(connect_infinite_loops_to_exit): Likewise.
	(flow_reverse_top_sort_order_compute): Likewise.
	(flow_depth_first_order_compute): Likewise.
	(flow_preorder_transversal_compute): Likewise.
	(flow_dfs_compute_reverse_execute): Likewise.
	(dfs_enumerate_from): Likewise.
	(compute_dominance_frontiers_1): Likewise.
	* cfgbuild.c (make_edges): Likewise.
	(compute_outgoing_frequencies): Likewise.
	(find_many_sub_basic_blocks): Likewise.
	(find_sub_basic_blocks): Likewise.
	* cfgcleanup.c (try_simplify_condjump): Likewise.
	(thread_jump): Likewise.
	(try_forward_edges): Likewise.
	(merge_blocks_move): Likewise.
	(outgoing_edges_match): Likewise.
	(try_crossjump_to_edge): Likewise.
	(try_crossjump_bb): Likewise.
	(try_optimize_cfg): Likewise.
	(merge_seq_blocks): Likewise.
	* cfgexpand.c (expand_gimple_tailcall): Likewise.
	(expand_gimple_basic_block): Likewise.
	(construct_init_block): Likewise.
	(construct_exit_block): Likewise.
	* cfghooks.c (verify_flow_info): Likewise.
	(dump_bb): Likewise.
	(delete_basic_block): Likewise.
	(split_edge): Likewise.
	(merge_blocks): Likewise.
	(make_forwarder_block): Likewise.
	(tidy_fallthru_edges): Likewise.
	(can_duplicate_block_p): Likewise.
	(duplicate_block): Likewise.
	* cfglayout.c (fixup_reorder_chain): Likewise.
	(fixup_fallthru_exit_predecessor): Likewise.
	(can_copy_bbs_p): Likewise.
	(copy_bbs): Likewise.
	* cfgloop.c (flow_loops_cfg_dump): Likewise.
	(flow_loop_entry_edges_find): Likewise.
	(flow_loop_exit_edges_find): Likewise.
	(flow_loop_nodes_find): Likewise.
	(mark_single_exit_loops): Likewise.
	(flow_loop_pre_header_scan): Likewise.
	(flow_loop_pre_header_find): Likewise.
	(update_latch_info): Likewise.
	(canonicalize_loop_headers): Likewise.
	(flow_loops_find): Likewise.
	(get_loop_body_in_bfs_order): Likewise.
	(get_loop_exit_edges): Likewise.
	(num_loop_branches): Likewise.
	(verify_loop_structure): Likewise.
	(loop_latch_edge): Likewise.
	(loop_preheader_edge): Likewise.
	* cfgloopanal.c (mark_irreducible_loops): Likewise.
	(expected_loop_iterations): Likewise.
	* cfgloopmanip.c (remove_bbs): Likewise.
	(fix_bb_placement): Likewise.
	(fix_irreducible_loops): Likewise.
	(remove_path): Likewise.
	(scale_bbs_frequencies): Likewise.
	(loopify): Likewise.
	(unloop): Likewise.
	(fix_loop_placement): Likewise.
	(loop_delete_branch_edge): Likewise.
	(duplicate_loop_to_header_edge): Likewise.
	(mfb_keep_just): Likewise.
	(create_preheader): Likewise.
	(force_single_succ_latches): Likewise.
	(loop_split_edge_with): Likewise.
	(create_loop_notes): Likewise.
	* cfgrtl.c (rtl_split_block): Likewise.
	(rtl_merge_blocks): Likewise.
	(rtl_can_merge_blocks): Likewise.
	(try_redirect_by_replacing_jump): Likewise.
	(force_nonfallthru_and_redirect): Likewise.
	(rtl_tidy_fallthru_edge): Likewise.
	(commit_one_edge_insertion): Likewise.
	(commit_edge_insertions): Likewise.
	(commit_edge_insertions_watch_calls): Likewise.
	(rtl_verify_flow_info_1): Likewise.
	(rtl_verify_flow_info): Likewise.
	(purge_dead_edges): Likewise.
	(cfg_layout_redirect_edge_and_branch): Likewise.
	(cfg_layout_can_merge_blocks_p): Likewise.
	(rtl_flow_call_edges_add): Likewise.
	* cse.c (cse_cc_succs): Likewise.
	* df.c (hybrid_search): Likewise.
	* dominance.c (calc_dfs_tree_nonrec): Likewise.
	(calc_dfs_tree): Likewise.
	(calc_idoms): Likewise.
	(recount_dominator): Likewise.
	* domwalk.c (walk_dominator_tree): Likewise.
	* except.c (emit_to_new_bb_before): Likewise.
	(connect_post_landing_pads): Likewise.
	(sjlj_emit_function_enter): Likewise.
	(sjlj_emit_function_exit): Likewise.
	(finish_eh_generation): Likewise.
	* final.c (compute_alignments): Likewise.
	* flow.c (calculate_global_regs_live): Likewise.
	(initialize_uninitialized_subregs): Likewise.
	(init_propagate_block_info): Likewise.
	* function.c (thread_prologue_and_epilogue_insns): Likewise.
	* gcse.c (find_implicit_sets): Likewise.
	(bypass_block): Likewise.
	(bypass_conditional_jumps): Likewise.
	(compute_pre_data): Likewise.
	(insert_insn_end_bb): Likewise.
	(insert_store): Likewise.
	(remove_reachable_equiv_notes): Likewise.
	* global.c (global_conflicts): Likewise.
	(calculate_reg_pav): Likewise.
	* graph.c (print_rtl_graph_with_bb): Likewise.
	* ifcvt.c (mark_loop_exit_edges): Likewise.
	(merge_if_block): Likewise.
	(find_if_header): Likewise.
	(block_jumps_and_fallthru_p): Likewise.
	(find_if_block): Likewise.
	(find_cond_trap): Likewise.
	(block_has_only_trap): Likewise.
	(find_if_case1): Likewise.
	(find_if_case_2): Likewise.
	* lambda-code.c (lambda_loopnest_to_gcc_loopnest): Likewise.
	(perfect_nestify): Likewise.
	* lcm.c (compute_antinout_edge): Likewise.
	(compute_laterin): Likewise.
	(compute_available): Likewise.
	(compute_nearerout): Likewise.
	* loop-doloop.c (doloop_modify): Likewise.
	* loop-init.c (loop_optimizer_init): Likewise.
	* loop-invariant.c (find_exits): Likewise.
	* loop-iv.c (simplify_using_initial_values): Likewise.
	(check_simple_exit): Likewise.
	(find_simple_exit): Likewise.
	* loop-unroll.c (peel_loop_completely): Likewise.
	(unroll_loop_constant_iterations): Likewise.
	(unroll_loop_runtime_iterations): Likewise.
	* loop-unswitch.c (may_unswitch_on): Likewise.
	(unswitch_loop): Likewise.
	* modulo-sched.c (generate_prolog_epilog): Likewise.
	(sms_schedule): Likewise.
	* postreload-gcse.c (eliminate_partially_redundant_load):
	Likewise.
	* predict.c (can_predict_insn_p): Likewise.
	(set_even_probabilities): Likewise.
	(combine_predictions_for_bb): Likewise.
	(predict_loops): Likewise.
	(estimate_probability): Likewise.
	(tree_predict_by_opcode): Likewise.
	(tree_estimate_probability): Likewise.
	(last_basic_block_p): Likewise.
	(propagate_freq): Likewise.
	(estimate_loops_at_level): Likewise.
	(estimate_bb_frequencies): Likewise.
	* profile.c (instrument_edges): Likewise.
	(get_exec_counts): Likewise.
	(compute_branch_probabilities): Likewise.
	(branch_prob): Likewise.
	* ra-build.c (live_in): Likewise.
	* ra-rewrite.c (rewrite_program2): Likewise.
	* ra.c (reg_alloc): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.
	(convert_regs_entry): Likewise.
	(compensate_edge): Likewise.
	(convert_regs_1): Likewise,
	(convert_regs_2): Likewise.
	(convert_regs): Likewise.
	* regrename.c (copyprop_hardreg_forward): Likewise.
	* reload1.c (fixup_abnormal_edges): Likewise.
	* sbitmap.c (sbitmap_intersection_of_succs): Likewise.
	(sbitmap_insersection_of_preds): Likewise.
	(sbitmap_union_of_succs): Likewise.
	(sbitmap_union_of_preds): Likewise.
	* sched-ebb.c (compute_jump_reg_dependencies): Likewise.
	(fix_basic_block_boundaries): Likewise.
	(sched_ebbs): Likewise.
	* sched-rgn.c (build_control_flow): Likewise.
	(find_rgns): Likewise.
	* tracer.c (find_best_successor): Likewise.
	(find_best_predecessor): Likewise.
	(tail_duplicate): Likewise.
	* tree-cfg.c (make_edges): Likewise.
	(make_ctrl_stmt_edges): Likewise.
	(make_goto_expr_edges): Likewise.
	(tree_can_merge_blocks_p): Likewise.
	(tree_merge_blocks): Likewise.
	(cfg_remove_useless_stmts_bb): Likewise.
	(remove_phi_nodes_and_edges_for_unreachable_block): Likewise.
	(tree_block_forwards_to): Likewise.
	(cleanup_control_expr_graph): Likewise.
	(find_taken_edge): Likewise.
	(dump_cfg_stats): Likewise.
	(tree_cfg2vcg): Likewise.
	(disband_implicit_edges): Likewise.
	(tree_find_edge_insert_loc): Likewise.
	(bsi_commit_edge_inserts): Likewise.
	(tree_split_edge): Likewise.
	(tree_verify_flow_info): Likewise.
	(tree_make_forwarder_block): Likewise.
	(tree_forwarder_block_p): Likewise.
	(thread_jumps): Likewise.
	(tree_try_redirect_by_replacing_jump): Likewise.
	(tree_split_block): Likewise.
	(add_phi_args_after_copy_bb): Likewise.
	(rewrite_to_new_ssa_names_bb): Likewise.
	(dump_function_to_file): Likewise.
	(print_pred_bbs): Likewise.
	(print_loop): Likewise.
	(tree_flow_call_edges_add): Likewise.
	(split_critical_edges): Likewise.
	(execute_warn_function_return): Likewise.
	(extract_true_false_edges_from_block): Likewise.
	* tree-if-conv.c (tree_if_conversion): Likewise.
	(if_convertable_bb_p): Likewise.
	(find_phi_replacement_condition): Likewise.
	(combine_blocks): Likewise.
	* tree-into-ssa.c (compute_global_livein): Likewise.
	(ssa_mark_phi_uses): Likewise.
	(ssa_rewrite_initialize_block): Likewise.
	(rewrite_add_phi_arguments): Likewise.
	(ssa_rewrite_phi_arguments): Likewise.
	(insert_phi_nodes_for): Likewise.
	(rewrite_into_ssa): Likewise.
	(rewrite_ssa_into_ssa): Likewise.
	* tree-mudflap.c (mf_build_check_statement_for): Likewise.
	* tree-outof-ssa.c (coalesce_abnormal_edges): Likewise.
	(rewrite_trees): Likewise.
	* tree-pretty-print.c (dump_bb_header): Likewise.
	(dump_implicit_edges): Likewise.
	* tree-sra.c (insert_edge_copies): Likewise.
	(find_obviously_necessary_stmts): Likewise.
	(remove_data_stmt): Likewise.
	* tree-ssa-dom.c (thread_across_edge): Likewise.
	(dom_opt_finalize_block): Likewise.
	(single_incoming_edge_ignoring_loop_edges): Likewise.
	(record_equivalences_from_incoming_edges): Likewise.
	(cprop_into_successor_phis): Likewise.
	* tree-ssa-live.c (live_worklist): Likewise.
	(calculate_live_on_entry): Likewise.
	(calculate_live_on_exit): Likewise.
	* tree-ssa-loop-ch.c (should_duplicate_loop_header_p): Likewise.
	(copy_loop_headers): Likewise.
	* tree-ssa-loop-im.c (loop_commit_inserts): Likewise.
	(fill_always_executed_in): Likewise.
	* tree-ssa-loop-ivcanon.c (create_canonical_iv): Likewise.
	* tree-ssa-loop-ivopts.c (find_interesting_uses): Likewise.
	(compute_phi_arg_on_exit): Likewise.
	* tree-ssa-loop-manip.c (add_exit_phis_edge): Likewise.
	(get_loops_exit): Likewise.
	(split_loop_exit_edge): Likewise.
	(ip_normal_pos): Likewise.
	* tree-ssa-loop-niter.c (simplify_using_initial_conditions):
	Likewise.
	* tree-ssa-phiopt.c (candidate_bb_for_phi_optimization): Likewise.
	(replace_phi_with_stmt): Likewise.
	(value_replacement): Likewise.
	* tree-ssa-pre.c (compute_antic_aux): Likewise.
	(insert_aux): Likewise.
	(init_pre): Likewise.
	* tree-ssa-propagate.c (simulate_stmt): Likewise.
	(simulate_block): Likewise.
	(ssa_prop_init): Likewise.
	* tree-ssa-threadupdate.c (thread_block): Likewise.
	(create_block_for_threading): Likewise.
	(remove_last_stmt_and_useless_edges): Likewise.
	* tree-ssa.c (verify_phi_args): Likewise.
	(verify_ssa): Likewise.
	* tree_tailcall.c (independent_of_stmt_p): Likewise.
	(find_tail_calls): Likewise.
	(eliminate_tail_call): Likewise.
	(tree_optimize_tail_calls_1): Likewise.
	* tree-vectorizer.c (vect_transform_loop): Likewise.
	* var-tracking.c (prologue_stack_adjust): Likewise.
	(vt_stack_adjustments): Likewise.
	(vt_find_locations): Likewise.
	* config/frv/frv.c (frv_ifcvt_modify_tests): Likewise.
	* config/i386/i386.c (ix86_pad_returns): Likewise.
	* config/ia64/ia64.c (ia64_expand_prologue): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_prologue): Likewise.

Co-Authored-By: Andrew Pinski <pinskia@physics.uc.edu>
Co-Authored-By: Steven Bosscher <stevenb@suse.de>

From-SVN: r88222
2004-09-28 17:59:54 +10:00
Kazu Hirata 454ff5cbf0 alias.c, [...]: Fix comment typos.
* alias.c, crtstuff.c, dbxout.c, domwalk.c, domwalk.h, gcc.c,
	gcse.c, global.c, lambda-code.c, loop.c, mips-tdump.c,
	optabs.h, predict.c, reg-stack.c, regclass.c, sched-rgn.c,
	tree-optimize.c, tree-ssa-dom.c, tree-ssa-forwprop.c,
	tree-ssa-operands.c, tree-ssa-phiopt.c,
	tree-ssa-threadupdate.c: Fix comment typos.

From-SVN: r87707
2004-09-18 19:47:10 +00:00
Nathan Sidwell 41374e13ac ra-build.c (copy_insn_p, [...]): Use gcc_assert and gcc_unreachable instead of abort.
* ra-build.c (copy_insn_p, remember_move, defuse_overlap_p_1,
	live_out_1, prune_hardregs_for_mode, init_one_web_common,
	reinit_one_web, add_subweb, add_subweb_2, init_web_parts,
	record_conflict, compare_and_free_webs, init_webs_defs_uses,
	parts_to_webs_1, parts_to_webs, reset_conflicts,
	check_conflict_numbers, remember_web_was_spilled, handle_asm_insn,
	ra_build_free): Use gcc_assert and gcc_unreachable instead of abort.
	* ra-colorize.c (push_list, put_web, reset_lists, put_web_at_end,
	put_move, remove_move, combine, select_spill, colorize_one_web,
	try_recolor_web, insert_coalesced_conflicts, check_colors,
	break_precolored_alias, restore_conflicts_from_coalesce,
	sort_and_combine_web_pairs, check_uncoalesced_moves): Likewise.
	* ra-rewrite.c (spill_coalescing, slots_overlap_p, emit_loads,
	reloads_to_loads, rewrite_program2, emit_colors): Likewise.
	* ra.c (first_hard_reg, create_insn_info, find_subweb, init_ra,
	check_df): Likewise.
	* real.c (do_add, do_multiply, do_divide, do_compare, do_fix_trunc,
	real_arithmetic, real_compare, real_exponent, real_ldexp,
	real_identical, real_to_integer, real_to_integer2, real_to_decimal,
	real_to_hexadecimal, real_from_integer, ten_to_ptwo, ten_to_mptwo,
	real_digit, real_nan, real_maxval, round_for_format, real_convert,
	real_to_target, real_from_target, real_hash, encode_ieee_single,
	encode_ieee_double, encode_ieee_extended, encode_ieee_quad,
	encode_vax_f, encode_vax_d, encode_vax_g, encode_i370_single,
	encode_i370_double, encode_c4x_single, encode_c4x_extended): Likewise.
	* recog.c (validate_change, validate_replace_rtx_1, asm_operand_ok,
	extract_insn, peep2_next_insn, peep2_reg_dead_p,
	peep2_find_free_register, peephole2_optimize, store_data_bypass_p,
	if_test_bypass_p): Likewise.
	* reg-stack.c (record_label_references, get_asm_operand_n_inputs,
	stack_result, remove_regno_note, get_hard_regnum, emit_pop_insn,
	emit_swap_insn, swap_to_top, move_for_stack_reg,
	subst_stack_regs_pat, subst_asm_stack_regs, change_stack,
	compensate_edge, convert_regs_1): Likewise.
	* regclass.c (init_reg_sets, init_reg_sets_1,
	memory_move_secondary_cost): Likewise.
	* regrename.c (note_sets, clear_dead_regs, scan_rtx_reg, scan_rtx):
	Likewise.
	* reload.c (push_secondary_reload, find_valid_class, push_reload,
	operands_match_p, decompose, immune_p, find_reloads,
	find_reloads_toplev, find_reloads_address_1, subst_reloads,
	copy_replacements, refers_to_regno_for_reload_p,
	reg_overlap_mentioned_for_reload_p): Likewise.
	* reload1.c (compute_use_by_pseudos, replace_pseudos_in, reload,
	count_pseudo, find_reg, eliminate_regs, eliminate_regs_in_insn,
	verify_initial_elim_offsets, finish_spills, clear_reload_reg_in_use,
	reload_reg_free_p, reload_reg_reaches_end_p, reloads_conflict,
	choose_reload_regs, merge_assigned_reloads, emit_input_reload_insns,
	do_output_reload, fixup_abnormal_edges): Likewise.
	* reorg.c (stop_search_p, emit_delay_sequence, get_jump_flags,
	fill_slots_from_thread, relax_delay_slots): Likewise.
	* resource.c (mark_referenced_resources, mark_set_resources):
	Likewise.
	* rtl.c (copy_rtx, rtx_equal_p): Likewise.
	* rtlanal.c (insn_dependent_p, reg_overlap_mentioned_p,
	dead_or_set_p, find_reg_fusage, remove_note, replace_rtx,
	subreg_lsb_1, subreg_regno_offset, subreg_offset_representable_p,
	find_first_parameter_load, can_hoist_insn_p, hoist_update_store,
	hoist_insn_after, hoist_insn_to_edge, nonzero_bits1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sbitmap.c (sbitmap_difference): Likewise.
	* sched-deps.c (add_dependence, sched_analyze_1, sched_analyze_2,
	sched_analyze, add_forward_dependence): Likewise.
	* sched-ebb.c (fix_basic_block_boundaries, schedule_ebb): Likewise.
	* sched-rgn.c (debug_regions, compute_trg_info, schedule_region,
	schedule_insns): Likewise.
	* sched-vis.c (print_pattern): Likewise.
	* sdbout.c (sdbout_symbol, sdbout_toplevel_data): Likewise.
	* simplify-rtx.c (simplify_unary_operation, simplify_binary_operation,
	simplify_const_relational_operation, simplify_ternary_operation,
	simplify_immed_subreg, simplify_subreg, simplify_gen_subreg):
	Likewise.
	* sreal.c (copy, sreal_sub, sreal_div): Likewise.
	* stmt.c (force_label_rtx, expand_goto, expand_asm_operands,
	resolve_operand_name_1, expand_return, expand_decl,
	expand_anon_union_decl, emit_case_bit_tests, expand_case): Likewise.
	* stor-layout.c (put_pending_size, smallest_mode_for_size,
	int_mode_for_mode, layout_decl, finish_builtin_struct, layout_type,
	set_sizetype, get_mode_bounds): Likewise.

From-SVN: r87244
2004-09-09 17:19:16 +00:00
Uros Bizjak edeacc1415 builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L} using rint_optab.
2004-09-04  Uros Bizjak  <uros@kss-loka.si>

	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_RINT{,F,L}
	using rint_optab.
	(expand_builtin): Expand BUILT_IN_RINT{,F,L} using
	expand_builtin_mathfn.
	* genopinit.c (optabs): Rename trunc_optab to btrunc_optab. Use
	btrunc?f patterns for btrunc_optab. Implement rint_optab using
	rint?f patterns.
	* optabs.c (init_optabs): Initialize rint_optab.
	* optabs.h (enum optab_index): Rename OTI_trunc to OTI_btrunc.
	Add new OTI_rint.
	(btrunc_optab): Rename macro from trunc_optab.
	(rint_optab): Define corresponding macro.

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT_FLOOR,
	UNSPEC_FRNDINT_CEIL, UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM.

	* config/i386/i386-protos.h (emit_i387_cw_initialization):
	Change prototype. Add new int parameter.
	* config/i386/i386.c (emit_i387_cw_initialization):
	Handle new rounding modes.

	* config/i386/i386.h (enum fp_cw_mode): Delete.
	(MODE_NEEDED): Handle new rounding modes.
	(EMIT_MODE_SET): Change condition to handle new rounding modes.

	* config/i386/i386.md (UNSPEC_FRNDINT_FLOOR, UNSPEC_FRNDINT_CEIL,
	UNSPEC_FRNDINT_TRUNC, UNSPEC_FRNDINT_MASK_PM): New unspecs to
	represent different rounding modes of frndint insn.
	(type): Add frndint type.
	(i387, length, memory): Handle this type.
	(i387_cw): New attribute definition.
	(*fix_truncdi_1, fix_truncdi_nomemory, fix_truncdi_memory,
	*fix_truncsi_1, fix_truncsi_nomemory, fix_truncsi_memory,
	*fix_trunchi_1, fix_trunchi_nomemory, fix_trunchi_memory):
	Add "i387_cw" attribute defined to "trunc".
	(x86_fnstcw_1): Remove comment.
	(*frndintxf2): Rename insn definition to frndintxf2. Move
	insn definition near rint?f2 expanders.
	(rintdf2, rintsf2, rintxf2): New expanders to implement rint,
	rintf and rintl built-ins as inline x87 intrinsics.
	(frndintxf2_floor): New pattern to implement floor rounding
	mode with frndint x87 instruction.
	(floordf2, floorsf2, floorxf2): New expanders to implement floor,
	floorf and floorl built-ins as inline x87 intrinsics.
	(frndintxf2_ceil): New pattern to implement ceil rounding
	mode with frndint x87 instruction.
	(ceildf2, ceilsf2, ceilxf2): New expanders to implement ceil,
	ceilf and ceill built-ins as inline x87 intrinsics.
	(frndintxf2_trunc): New pattern to implement trunc rounding
	mode with frndint x87 instruction.
	(btruncdf2, btruncsf2, btruncxf2): New expanders to implement trunc,
	truncf and truncl built-ins as inline x87 intrinsics.
	(frndintxf2_mask_pm): New pattern to implement rounding
	mode with exceptions with frndint x87 instruction.
	(nearbyintdf2, nearbyintsf2, nearbyintxf2): New expanders to
	implement nearbyint, nearbyintf and nearbyintl built-ins as
	inline x87 intrinsics.

	* testsuite/gcc.dg/builtins-46.c: New.

From-SVN: r87076
2004-09-04 09:55:12 +02:00
Caroline Tice 9fb3243411 Hot/cold partitioning update patch.
Hot/cold partitioning update patch.  The problems that this patch
attemptd to address/fix are:

- Fix places where adding in_unlikely_executed_text to the enum data
  type "in_section"  threw off switch case statements.
- Make it work correctly (by turning it off) for functions where user
  specifies "__attribute__ section"
- Make it work correctly (by turning it off) for linkonce sections
- Make it work correctly with -ffunction-sections flag
- Make it output correct cold section labels
- Undo some changes to original assembly code generation
- Turn off hot/cold partitioning in the presence of DWARF debugging (for
  the moment)
- Turn off hot/cold partitioning for architectures that do not support
  named sections
- Use variables rather than constants for cold section labels and names (to
  work correctly with -ffunction-sections, among other things)


2004-08-18  Caroline Tice  <ctice@apple.com>

        * Makefile.in (STAGEFEEDBACK_FLAGS_TO_PASS) Add
        "-freorder-blocks-and-partition" to the flags used in second
        stage of profiledbootstrap.
        * bb-reorder.c (push_to_next_round_p): Add new variable,
        next_round_is_last; set and use variable to make sure, when
        partitioning, that the last trace construction round consists
        of all (and only) cold basic blocks.
        (rotate_loop): Don't copy blocks that end in a section
        crossing jump.
        (copy_bb): Correctly initialize "partition" of duplicated bb.
        (add_unlikely_executed_notes): Add a comment.
        (find_rarely_executed_basic_blocks_and_crossing_edges): Modify
        to make sure, if function contains hot blocks, that the
        successors of ENTRY_BLOCK_PTR are hot; also, only look for
        crossing edges if the architecture supports named sections.
        (mark_bb_for_unlikely_executed_section): Modify to always
        insert the NOTE_INSN_UNLIKELY_EXECUTED_CODE immediately after
        the basic block note insn.
        (fix_crossing_unconditional_branches): Remove extra space.
        (fix_edges_for_rarely_executed_code): Modify to only do
        partitioning work if the architecture supports named sections.
        (reorder_basic_blocks): Modify to only add
        NOTE_INSN_UNLIKELY_EXECUTED_CODE notes if the architecture
        supports named sections.
        * c-common.c (handle_section_attribute): Initialize new global
        variable, user_defined_section_attribute, to true if user has
        specified one.
        * cfgcleanup.c (try_forward_edges): Modify to not attempt to
        forward edges that cross section boundaries.
        * cfglayout.c (fixup_reorder_chain): Modify to only fix up
        partitioning information if the architecture supports named
        sections.
        * cfgrtl.c (target.h): Add statement to include this.
        (rtl_split_block): Make sure newly created bb gets correct
        partition.
        (try_redirect_by_replacing_jump): Make sure redirection isn't
        attempting to cross section boundaries.
        (force_nonfallthru_and_redirect): Only do partition fix up if
        architecture supports named sections.
        (rtl_split_edge): Make sure newly created bb ends up in
        correct partition.
        (commit_one_edge_insertion): Remove code that incorrectly
        updated basic block partition; Make sure partition fix up only
        happens if architecture supports named sections and it's not
        already done.
        (rtl_verify_flow_info_1): Fix if-condition on test/error
        condition that fallthru edges are not allowed to cross section
        boundaries.
        * defaults.h (NORMAL_TEXT_SECTION_NAME): Remove this.
        * final.c (final_scan_insn): Remove redundant test from if-statement;
        change calls to text_section into calls to function_section; add code
        to only to partitioning fix up if architecture supports named
        sections.
        * ifcvt.c (find_if_case_1): Make sure newly created bb has correct
        partition.
        (if_convert): Add targetm.have_named_sections to test.
        * output.h (unlikely_section_label): Extern declaration for new global
        variable.
        (unlikely_text_section_name): Likewise.
        * opts.c (decode_options): If both partitioning and DWARF debugging
        are turned on, issue a warning that this doesn't work, and change
        partitiong to basic block reordering (without hot/cold partitions).
        * passes.c (rest_of_handle_final): Re-set new global variable,
        user_defined_section_attribute, to false.
        (rest_of_compilation): Change options for calling partitioning
        function: Don't call if the user defined the section attribute, and
        don't call if DECL_ONE_ONLY is true for the current function.
        * predict.c (choose_function_section): Return immediately if we
        are doing hot/cold partitioning (i.e. let the basic block partitioning
        determine where the function belongs).
        * reg-stack.c (emit_swap_insn): Add condition to step over
        NOTE_INSN_UNLIKELY_EXECUTED_CODE notes.
        * toplev.c (user_defined_section_attribute): New global variable.
        * toplev.h (user_defined_section_attribute): Extern declaration for new
        global variable.
        * varasm.c (unlikely_section_label): New global variable.
        (unlikely_text_section_name): New global variable.
        (unlikely_text_section): Add code to initialize unlikely_text_section_name
        if necessary; modify to use unlikely_text_section_name and
        unlikely_section_label; also to use named_section properly.
        (in_unlikely_text_section):  Modify to work correctly with named_section
        and to use unlikely_text_section_name.
        (named_section):  Add code to work properly with cold section.
        (function_section): Clean up if-statement.
        * config/darwin.c (darwin_asm_named_section): Return to original code,
        removing use of SECTION_FORMAT_STRING.
        * config/arm/pe.h (switch_to_section):  Add case for
        in_unlikely_executed_text to switch statement.
        * config/i386/cygming.h (switch_to_section): Likewise.
        * config/i386/darwin.h (NORMAL_TEXT_SECTION_NAME): Remove.
        (SECTION_FORMAT_STRING): Likewise.
        * config/mcore/mcore.h (switch_to_section): Likewise.
        * config/rs6000/darwin.h (NORMAL_TEXT_SECTION_NAME): Remove.

From-SVN: r86189
2004-08-18 09:22:08 -07:00
Bernardo Innocenti e3a64162f5 c-common.c: Rename all identifiers named `class' to `cl'.
* c-common.c: Rename all identifiers named `class' to `cl'.
	* c-decl.c: Likewise.
	* c-common.h: Likewise.
	* c-parse.in: Likewise.
	* c-typeck.c: Likewise.
	* genmodes.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* regrename.c: Likewise.
	* tree.h: Likewise.

From-SVN: r85153
2004-07-25 19:57:24 +02:00
Jerry Quinn 4b4bf9414f alias.c (nonlocal_mentioned_p, [...]): Use, LABEL_P, JUMP_P, CALL_P, NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
2004-07-08  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (nonlocal_mentioned_p, nonlocal_referenced_p,
	nonlocal_set_p, init_alias_analysis): Use, LABEL_P, JUMP_P, CALL_P,
	NONJUMP_INSN_P, INSN_P, NOTE_P, BARRIER_P.
	* bb-reorder.c (mark_bb_for_unlikely_executed_section,
	add_labels_and_missing_jumps, find_jump_block,
	fix_crossing_unconditional_branches, add_reg_crossing_jump_notes):
	Likewise.
	* bt-load.c (btr_referenced_p, compute_defs_uses_and_gen,
	link_btr_uses, move_btr_def): Likewise.
	* builtins.c (expand_builtin_longjmp, expand_builtin_nonlocal_goto,
	expand_builtin_expect_jump): Likewise.
	* caller-save.c (save_call_clobbered_regs, insert_one_insn): Likewise.
	* calls.c (expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (forwarder_block_p): Likewise.
	* cfgbuild.c (inside_basic_block_p, count_basic_blocks,
	make_label_edge, rtl_make_eh_edge, make_edges, find_basic_blocks_1,
	find_bb_boundaries): Likewise.
	* cfgcleanup.c (try_simplify_condjump, try_forward_edges,
	merge_blocks_move_predecessor_nojumps,
	merge_blocks_move_successor_nojumps, insns_match_p,
	flow_find_cross_jump, outgoing_edges_match, try_crossjump_to_edge,
	try_optimize_cfg): Likewise.
	* cfgexpand.c (expand_block, construct_exit_block): Likewise.
	* cfglayout.c (skip_insns_after_block, label_for_bb,
	record_effective_endpoints, insn_locators_initialize,
	fixup_reorder_chain, update_unlikely_executed_notes): Likewise.
	* cfgmainloop.c (create_loop_notes): Likewise.
	* cfgrtl.c (delete_insn, delete_insn_chain,
	create_basic_block_structure, rtl_delete_block, free_bb_for_insn,
	update_bb_for_insn, rtl_merge_blocks, rtl_can_merge_blocks,
	block_label, try_redirect_by_replacing_jump, last_loop_beg_note,
	redirect_branch_edge, force_nonfallthru_and_redirect,
	rtl_tidy_fallthru_edge, back_edge_of_syntactic_loop_p,
	rtl_split_edge, commit_one_edge_insertion, print_rtl_with_bb,
	update_br_prob_note, rtl_verify_flow_info_1, rtl_verify_flow_info,
	purge_dead_edges, cfg_layout_redirect_edge_and_branch,
	cfg_layout_delete_block, cfg_layout_can_merge_blocks_p,
	cfg_layout_merge_blocks, rtl_block_ends_with_call_p,
	need_fake_edge_p, rtl_flow_call_edges_add): Likewise.
	* combine.c (combine_instructions, can_combine_p, try_combine,
	find_split_point, record_dead_and_set_regs, reg_dead_at_p,
	distribute_notes, distribute_links, insn_cuid): Likewise.
	* cse.c (fold_rtx, cse_insn, cse_around_loop,
	invalidate_skipped_block, cse_set_around_loop,
	cse_end_of_basic_block, cse_main, cse_basic_block,
	cse_condition_code_reg): Likewise.
	* cselib.c (cselib_process_insn): Likewise.
	* ddg.c (create_ddg): Likewise.
	* df.c (df_insn_refs_record, df_bb_rd_local_compute, df_insns_modify):
	Likewise.
	* dwarf2out.c (dwarf2out_stack_adjust, dwarf2out_frame_debug,
	gen_label_die, dwarf2out_var_location): Likewise.
	* emit-rtl.c (get_first_nonnote_insn, get_last_nonnote_insn,
	next_insn, previous_insn, next_nonnote_insn, prev_nonnote_insn,
	last_call_insn, active_insn_p, next_label, prev_label,
	link_cc0_insns, next_cc0_user, try_split, add_insn_after,
	add_insn_before, remove_insn, add_function_usage_to,
	reorder_insns, find_line_note, remove_unnecessary_notes,
	emit_insn_after_1, classify_insn): Likewise.
	* except.c (convert_from_eh_region_ranges_1, emit_to_new_bb_before,
	connect_post_landing_pads, sjlj_mark_call_sites,
	sjlj_emit_function_enter, sjlj_emit_function_exit, reachable_handlers,
	can_throw_internal, can_throw_external, set_nothrow_function_flags,
	convert_to_eh_region_ranges): Likewise.
	* explow.c (optimize_save_area_alloca): Likewise.
	* expr.c (expand_expr_real): Likewise.
	* final.c (insn_current_reference_address, compute_alignments,
	shorten_branches, final, scan_ahead_for_unlikely_executed_note,
	final_scan_insn, output_asm_label, leaf_function_p): Likewise.
	* flow.c (first_insn_after_basic_block_note, delete_dead_jumptables,
	propagate_block_delete_insn, propagate_one_insn,
	init_propagate_block_info, propagate_block, libcall_dead_p,
	mark_set_1, attempt_auto_inc, find_auto_inc, try_pre_increment):
	Likewise.
	* function.c (instantiate_virtual_regs,	reorder_blocks_1,
	expand_function_start, expand_function_end, contains,
	thread_prologue_and_epilogue_insns,
	reposition_prologue_and_epilogue_notes): Likewise.
	* gcse.c (constprop_register, bypass_conditional_jumps,
	insert_insn_end_bb, gcse_after_reload): Likewise.
	* genemit.c (gen_expand, gen_split): Likewise.
	* genpeep.c (gen_peephole, main): Likewise.
	* global.c (build_insn_chain): Likewise.
	* graph.c (node_data, print_rtl_graph_with_bb): Likewise.
	* haifa-sched.c (unlink_other_notes, unlink_line_notes,
	get_block_head_tail, no_real_insns_p, rm_line_notes, save_line_notes,
	restore_line_notes, rm_redundant_line_notes, rm_other_notes,
	ok_for_early_queue_removal, set_priorities, sched_init): Likewise.
	* ifcvt.c (count_bb_insns, first_active_insn, last_active_insn,
	cond_exec_process_insns, end_ifcvt_sequence, noce_process_if_block,
	merge_if_block, block_jumps_and_fallthru_p, find_if_block,
	dead_or_predicable): Likewise.
	* integrate.c (try_constants): Likewise.
	* jump.c (rebuild_jump_labels, cleanup_barriers,
	purge_line_number_notes, init_label_info, mark_all_labels,
	squeeze_notes, get_label_before, get_label_after,
	reversed_comparison_code_parts, simplejump_p, pc_set,
	returnjump_p, onlyjump_p, follow_jumps, mark_jump_label,
	delete_barrier, delete_prior_computation, delete_computation,
	delete_related_insns, delete_for_peephole, redirect_jump):
	Likewise.
	* lcm.c (optimize_mode_switching): Likewise.
	* local-alloc.c (validate_equiv_mem, update_equiv_regs, block_alloc):
	Likewise.
	* loop-doloop.c (doloop_valid_p, doloop_optimize): Likewise.
	* loop-invariant.c (find_exits, find_invariants_bb): Likewise.
	* loop-iv.c (simplify_using_assignment): Likewise.
	* loop.c (compute_luids, loop_optimize, scan_loop, libcall_other_reg,
	libcall_benefit, skip_consec_insns, move_movables, prescan_loop,
	find_and_verify_loops, labels_in_range_p, for_each_insn_in_loop,
	loop_bivs_init_find, strength_reduce, check_insn_for_bivs,
	check_insn_for_givs, check_final_value, update_giv_derive,
	basic_induction_var, product_cheap_p, check_dbra_loop,
	loop_insn_first_p, last_use_this_basic_block,
	canonicalize_condition, get_condition, loop_regs_scan, load_mems,
	try_copy_prop, LOOP_BLOCK_NUM, loop_dump_aux): Likewise.
	* modulo-sched.c (doloop_register_get, find_line_note, sms_schedule,
	sms_schedule_by_order): Likewise.
	* optabs.c (emit_no_conflict_block, emit_libcall_block): Likewise.
	* postreload.c (reload_cse_simplify_operands, reload_combine,
	reload_cse_move2add): Likewise.
	* predict.c (can_predict_insn_p, estimate_probability,
	expected_value_to_br_prob, process_note_predictions): Likewise.
	* print-rtl.c (print_rtx, print_rtl, print_rtl_single): Likewise.
	* profile.c (branch_prob): Likewise.
	* ra-build.c (live_out_1, livethrough_conflicts_bb,
	detect_webs_set_in_cond_jump): Likewise.
	* ra-debug.c (ra_print_rtx_object, ra_debug_insns,
	ra_print_rtl_with_bb): Likewise.
	* ra-rewrite.c (insert_stores, rewrite_program2): Likewise.
	* recog.c (next_insn_tests_no_inequality, find_single_use,
	split_all_insns, peephole2_optimize, if_test_bypass_p): Likewise.
	* reg-stack.c (next_flags_user, record_label_references,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs,
	compensate_edge, convert_regs_1): Likewise.
	* regclass.c (scan_one_insn): Likewise.
	* regmove.c (optimize_reg_copy_1, optimize_reg_copy_2, fixup_match_2,
	regmove_optimize, fixup_match_1, single_set_for_csa,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (build_def_use, copyprop_hardreg_forward_1): Likewise.
	* reload.c (find_reloads, find_reloads_address_1, subst_reloads,
	find_equiv_reg): Likewise.
	* reload1.c (reload, calculate_needs_all_insns, set_label_offsets,
	reload_as_needed, emit_input_reload_insns, do_output_reload,
	delete_output_reload, delete_address_reloads_1, fixup_abnormal_edges):
	Likewise.
	* reorg.c (find_end_label, emit_delay_sequence,
	delete_from_delay_slot, delete_scheduled_jump, optimize_skip,
	get_jump_flags, rare_destination, mostly_true_jump,
	try_merge_delay_insns, redundant_insn, own_thread_p,
	fill_simple_delay_slots, fill_slots_from_thread,
	fill_eager_delay_slots, relax_delay_slots, make_return_insns,
	dbr_schedule): Likewise.
	* resource.c (find_basic_block, next_insn_no_annul,
	find_dead_or_set_registers, mark_target_live_regs): Likewise.
	* rtl.h (RTX_PREV): Likewise.
	* rtlanal.c (global_reg_mentioned_p, no_labels_between_p,
	no_jumps_between_p, reg_used_between_p, reg_referenced_between_p,
	reg_set_p, find_last_value, dead_or_set_regno_p, find_reg_fusage,
	find_regno_fusage, pure_call_p, replace_label, rtx_referenced_p_1,
	tablejump_p, computed_jump_p, insns_safe_to_move_p,
	find_first_parameter_load, can_hoist_insn_p): Likewise.
	* sched-deps.c (get_condition, add_dependence, sched_analyze_2,
	sched_analyze_insn, sched_analyze, add_forward_dependence): Likewise.
	* sched-ebb.c (fix_basic_block_boundaries, add_deps_for_risky_insns,
	schedule_ebbs): Likewise.
	* sched-rgn.c (is_cfg_nonregular, find_conditional_protection,
	is_conditionally_protected, can_schedule_ready_p,
	add_branch_dependences, debug_dependencies): Likewise.
	* stmt.c (emit_nop, expand_start_case, emit_jump_if_reachable):
	Likewise.
	* unroll.c (unroll_loop, copy_loop_body, back_branch_in_range_p,
	reg_dead_after_loop, loop_find_equiv_value, loop_iterations,
	set_dominates_use, ujump_to_loop_cont): Likewise.
	* var-tracking.c (prologue_stack_adjust, vt_initialize): Likewise.
	* varasm.c (output_constant_pool_1): Likewise.

From-SVN: r84341
2004-07-09 03:29:35 +00:00
Jerry Quinn 3c0cb5de6a alias.c (get_alias_set, [...]): Use MEM_P.
2004-07-01  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (get_alias_set, canon_rtx, get_addr,
	nonoverlapping_memrefs_p, nonlocal_referenced_p_1, memory_modified_1):
	Use MEM_P.
	* builtins.c (expand_builtin_prefetch, expand_builtin_profile_func,
	expand_builtin): Likewise.
	* calls.c (expand_call, emit_library_call_value_1, store_one_arg):
	Likewise.
	* combine.c (can_combine_p, combinable_i3pat, try_combine,
	find_split_point, combine_simplify_rtx, simplify_set, make_extraction,
	rtx_equal_for_field_assignment_p, gen_lowpart_for_combine,
	record_dead_and_set_regs_1, get_last_value_validate,
	mark_used_regs_combine, move_deaths, unmentioned_reg_p_1): Likewise.
	* cse.c (check_dependence, canon_hash, equiv_constant,
	gen_lowpart_if_possible, cse_insn, invalidate_from_clobbers,
	cse_around_loop, cse_check_loop_start, cse_set_around_loop,
	count_reg_usage): Likewise.
	* cselib.c (rtx_equal_for_cselib_p, add_mem_for_addr, cselib_lookup,
	cselib_invalidate_mem, cselib_invalidate_rtx, cselib_record_set,
	cselib_record_sets): Likewise.
	* dbxout.c (PARM_PASSED_IN_MEMORY, dbxout_symbol,
	dbxout_symbol_location, dbxout_parms, dbxout_reg_parms): Likewise.
	* ddg.c (mark_mem_use, mark_mem_store, rtx_mem_access_p): Likewise.
	* df.c (df_uses_record): Likewise.
	* dojump (do_jump): Likewise.
	* dwarf2out.c (stack_adjust_offset, mem_loc_descriptor,
	loc_descriptor_from_tree, rtl_for_decl_location, add_bound_info,
	decl_start_label): Likewise.
	* emit-rtl.c (gen_complex_constant_part, gen_highpart,
	operand_subword, change_address_1, make_safe_from): Likewise.
	* explow.c (break_out_memory_refs, copy_all_regs, validize_mem,
	stabilize, force_not_mem): Likewise.
	* expmed.c (store_bit_field, store_split_bit_field, extract_bit_field,
	expand_mult_const, expand_divmod, emit_store_flag): Likewise.
	* expr.c (convert_move, convert_modes, emit_block_move,
	emit_group_load, emit_group_store, clear_storage, emit_move_insn,
	emit_move_insn_1, expand_assignment, store_expr,
	store_constructor_field, store_constructor, store_field,
	force_operand, safe_from_p, expand_expr_real_1, expand_increment):
	Likewise.
	* final.c (cleanup_subreg_operands, alter_subreg,
	get_mem_expr_from_op): Likewise.
	* flow.c (notice_stack_pointer_modification_1,
	init_propagate_block_info, insn_dead_p, mark_set_1, mark_used_regs):
	Likewise.
	* function.c (mark_temp_addr_taken, preserve_temp_slots,
	preserve_rtl_expr_result, put_var_into_stack, fixup_var_refs_1,
	optimize_bit_field, flush_addressof, purge_addressof_1,
	instantiate_decl, instantiate_virtual_regs_1, assign_parms,
	setjmp_protect, setjmp_protect_args, fix_lexical_addr,
	keep_stack_depressed): Likewise.
	* ifcvt.c (noce_try_cmove_arith, noce_try_abs, noce_operand_ok,
	noce_process_if_block, find_memory): Likewise.
	* integrate.c (subst_constants, allocate_initial_values): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, memref_referenced_p,
	update_equiv_regs): Likewise.
	* loop.c (scan_loop, prescan_loop, note_addr_stored, check_store,
	maybe_eliminate_biv_1, find_mem_in_note_1): Likewise.
	* optabs.c (expand_abs, emit_unop_insn): Likewise.
	* passes.c (rest_of_handle_final): Likewise.
	* postreload.c (reload_cse_simplify_set, reload_cse_simplify_operands,
	move2add_note_store): Likewise.
	* ra-build.c (detect_remat_webs): Likewise.
	* ra-debug.c (dump_static_insn_cost): Likewise.
	* ra-rewrite.c (slots_overlap_p, insert_stores): Likewise.
	* recog.c (validate_change, apply_change_group, cancel_changes,
	validate_replace_rtx_1, general_operand, register_operand,
	nonmemory_operand, push_operand, pop_operand, memory_operand,
	indirect_operand, asm_operand_ok, offsettable_memref_p,
	offsettable_nonstrict_memref_p, constrain_operands,
	store_data_bypass_p): Likewise.
	* reg-stack.c (subst_stack_regs_pat): Likewise.
	* regclass.c (record_operand_costs, scan_one_insn, record_reg_classes,
	copy_cost, reg_scan_mark_refs): Likewise.
	* regmove.c (optimize_reg_copy_3, stack_memref_p,
	combine_stack_adjustments_for_block): Likewise.
	* regrename.c (copyprop_hardreg_forward_1): Likewise.
	* reload.c (can_reload_into, push_reload, decompose, immune_p,
	find_reloads, find_reloads_address, find_reloads_address_1,
	reg_overlap_mentioned_for_reload_p, refers_to_mem_for_reload_p,
	find_equiv_reg): Likewise.
	* reload1.c (reload, eliminate_regs, eliminate_regs_in_insn,
	reload_as_needed, choose_reload_regs, emit_input_reload_insns,
	do_input_reload, emit_reload_insns, gen_reload, delete_output_reload,
	delete_address_reloads): Likewise.
	* resource.c (mark_referenced_resources): Likewise.
	* rtlanal.c (get_jump_table_offset, count_occurrences,
	reg_referenced_p, reg_set_p, set_of_1, set_noop_p,
	reg_overlap_mentioned_p, note_uses, replace_regs, nonzero_bits1,
	num_sign_bit_copies1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise.
	* sdbout.c (PARM_PASSED_IN_MEMORY, sdbout_symbol,
	sdbout_toplevel_data, sdbout_parms, sdbout_reg_parms,
	sdbout_global_decl): Likewise.
	* simplify-rtx.c (simplify_subreg): Likewise.
	* stmt.c (expand_asm_operands, expand_expr_stmt_value, expand_decl,
	expand_anon_union_decl, expand_end_case_type): Likewise.
	* unroll.c (calculate_giv_inc): Likewise.
	* var-tracking.c (stack_adjust_offset_pre_post,
	bb_stack_adjust_offset, track_expr_p, count_uses, add_uses,
	add_stores, compute_bb_dataflow, vt_get_decl_and_offset,
	vt_add_function_parameters): Likewise.
	* varasm.c (make_var_volatile, notice_global_symbol,
	assemble_external, decode_addr_const, mark_weak,
	default_encode_section_info): Likewise.

From-SVN: r83980
2004-07-01 12:52:53 +00:00
Jerry Quinn f8cfc6aa07 alias.c (record_set, [...]): Use REG_P.
2004-06-15  Jerry Quinn  <jlquinn@optonline.net>

	* alias.c (record_set, record_base_value, canon_rtx, get_addr,
	nonlocal_mentioned_p_1, init_alias_analysis): Use REG_P.
	* bt-load.c (find_btr_reference, insn_sets_btr_p, note_btr_set):
	Likewise.
	* builtins.c (expand_builtin_setjmp, expand_builtin_apply,
	expand_builtin_mathfn, expand_builtin_strlen, expand_builtin_memcmp,
	expand_builtin_strcmp, expand_builtin_strncmp,
	expand_builtin_frame_address): Likewise.
	* caller-save.c (mark_set_regs, add_stored_regs, mark_referenced_regs,
	insert_one_insn): Likewise.
	* calls.c (prepare_call_address, precompute_register_parameters,
	precompute_arguments, expand_call, emit_library_call_value_1): Likewise.
	* cfganal.c (flow_active_insn_p): Likewise.
	* combine.c (set_nonzero_bits_and_sign_copies, can_combine_p,
	combinable_i3pat, try_combine, find_split_point, COMBINE_RTX_EQUAL_P,
	subst, combine_simplify_rtx, simplify_if_then_else, simplify_set,
	make_extraction, recog_for_combine, gen_lowpart_for_combine,
	simplify_comparison, record_dead_and_set_regs_1,
	record_dead_and_set_regs, record_promoted_value,
	check_promoted_subreg, get_last_value_validate, get_last_value,
	reg_dead_at_p_1, reg_bitfield_target_p, distribute_notes,
	unmentioned_reg_p_1): Likewise.
	* conflict.c (mark_reg): Likewise.
	* cse.c (HASH, COST, COST_IN, approx_reg_cost_1, notreg_cost,
	mention_regs, insert_regs, lookup, lookup_for_remove, insert,
	merge_equiv_classes, flush_hash_table, invalidate,
	remove_invalid_refs, remove_invalid_subreg_refs, rehash_using_reg,
	invalidate_for_call, use_related_value, canon_hash, exp_equiv_p,
	cse_rtx_varies_p, canon_reg, find_best_addr, fold_rtx, equiv_constant,
	record_jump_cond, cse_insn, addr_affects_sp_p,
	invalidate_from_clobbers, cse_process_notes, cse_around_loop,
	cse_set_around_loop, count_reg_usage, set_live_p, cse_change_cc_mode,
	cse_cc_succs, cse_condition_code_reg): Likewise.
	* cselib.c (cselib_reg_set_mode, rtx_equal_for_cselib_p,
	cselib_lookup, cselib_invalidate_regno, cselib_invalidate_rtx,
	cselib_record_set, cselib_record_sets): Likewise.
	* dbxout.c (dbxout_symbol_location, dbxout_parms, dbxout_reg_parms,
	dbxout_block): Likewise.
	* df.c (df_ref_record, df_def_record_1, df_uses_record): Likewise.
	* dojump.c (do_jump): Likewise.
	* dwarf2out.c (dwarf2out_frame_debug_expr, is_pseudo_reg,
	is_based_loc, rtl_for_decl_location): Likewise.
	* emit-rtl.c (set_reg_attrs_for_parm, set_decl_rtl,
	set_decl_incoming_rtl, mark_user_reg): Likewise.
	* explow.c (copy_all_regs, copy_all_regs, memory_address, force_reg,
	copy_to_suggested_reg, allocate_dynamic_stack_space,
	probe_stack_range, hard_function_value): Likewise.
	* expmed.c (store_bit_field, store_fixed_bit_field,
	store_split_bit_field, extract_bit_field, extract_fixed_bit_field,
	extract_split_bit_field, expand_divmod, emit_store_flag_force):
	Likewise.
	* expr.c (convert_move, convert_modes,
	block_move_libcall_safe_for_call_parm, emit_group_load, use_reg,
	use_group_regs, emit_move_insn, emit_move_insn_1,
	compress_float_constant, push_block, emit_single_push_insn,
	emit_push_insn, get_subtarget, expand_assignment, store_expr,
	store_constructor, store_field, force_operand, safe_from_p,
	expand_expr_real_1, expand_increment, do_store_flag, do_tablejump):
	Likewise.
	* final.c (profile_function, final_scan_insn, alter_subreg,
	get_mem_expr_from_op, output_asm_operand_names, output_operand,
	only_leaf_regs_used, leaf_renumber_regs_insn): Likewise.
	* flow.c (verify_wide_reg_1, mark_regs_live_at_end,
	find_regno_partial, propagate_one_insn, init_propagate_block_info,
	insn_dead_p, libcall_dead_p, mark_set_1, not_reg_cond,
	attempt_auto_inc, find_auto_inc, mark_used_regs,
	count_or_remove_death_notes_bb): Likewise.
	* function.c (find_temp_slot_from_address, update_temp_slot_address,
	preserve_temp_slots, put_var_into_stack, fixup_var_refs_insn,
	fixup_var_refs_1, fixup_stack_1, optimize_bit_field, flush_addressof,
	put_addressof_into_stack, purge_addressof_1, insns_for_mem_walk,
	purge_single_hard_subreg_set, instantiate_decl,
	instantiate_virtual_regs_1, aggregate_value_p, assign_parms,
	promoted_input_arg, setjmp_vars_warning, setjmp_args_warning,
	setjmp_protect, setjmp_protect_args, fix_lexical_addr,
	expand_function_start, diddle_return_value, clobber_return_register,
	expand_function_end, keep_stack_depressed, handle_epilogue_set,
	update_epilogue_consts): Likewise.
	* genemit.c (gen_exp, gen_insn): Likewise.
	* genrecog.c (make_insn_sequence): Likewise.
	* global.c (global_conflicts, expand_preferences, mark_reg_store,
	mark_reg_conflicts, set_preference, reg_becomes_live,
	build_insn_chain, mark_reg_change): Likewise.
	* haifa_sched.c (CONST_BASED_ADDRESS_P, find_set_reg_weight):
	Likewise.
	* ifcvt.c (noce_try_abs, noce_get_condition, noce_process_if_block):
	Likewise.
	* integrate.c (copy_rtx_and_substitute, try_constants,
	subst_constants, mark_stores, allocate_initial_values): Likewise.
	* jump.c (reversed_comparison_code_parts, delete_prior_computation,
	delete_computation, rtx_renumbered_equal_p, true_regnum,
	reg_or_subregno): Likewise.
	* lcm.c (reg_dies, reg_becomes_live): Likewise.
	* local-alloc.c (validate_equiv_mem_from_store, validate_equiv_mem,
	update_equiv_regs, no_equiv, block_alloc, combine_regs, reg_is_set,
	wipe_dead_reg, no_conflict_p): Likewise.
	* loop-iv.c (simple_reg_p, simple_set_p, kill_sets,
	iv_get_reaching_def, iv_analyze_biv, altered_reg_used, mark_altered,
	simple_rhs_p, simplify_using_assignment, implies_p): Likewise.
	* loop.c (scan_loop, combine_movables, rtx_equal_for_loop_p,
	move_movables, note_set_pseudo_multiple_uses, consec_sets_invariant_p,
	find_single_use_in_loop, count_one_set, loop_bivs_init_find,
	loop_givs_rescan, check_insn_for_bivs, check_insn_for_givs,
	valid_initial_value_p, simplify_giv_expr, consec_sets_giv,
	loop_regs_update, check_dbra_loop, maybe_eliminate_biv,
	maybe_eliminate_biv_1, record_initial, update_reg_last_use,
	canonicalize_condition, loop_regs_scan, load_mems, try_copy_prop,
	try_swap_copy_prop): Likewise.
	* optabs.c (expand_binop, expand_vector_binop, expand_vector_unop,
	expand_abs, emit_no_conflict_block, emit_libcall_block, expand_float):
	Likewise.
	* postreload.c (reload_cse_simplify, reload_cse_simplify_set,
	reload_cse_simplify_operands, reload_combine,
	reload_combine_note_store, reload_combine_note_use,
	reload_cse_move2add, move2add_note_store): Likewise.
	* print-rtl.c (print_rtx): Likewise.
	* ra-build.c (copy_insn_p, remember_move, init_one_web_common,
	contains_pseudo, handle_asm_insn): Likewise.
	* ra-debug.c (ra_print_rtx_object, dump_constraints,
	dump_static_insn_cost): Likewise.
	* ra-rewrite.c (slots_overlap_p, emit_colors,
	remove_suspicious_death_notes): Likewise.
	* recog.c (validate_replace_rtx_1, find_single_use_1, find_single_use,
	register_operand, scratch_operand, nonmemory_operand,
	constrain_operands): Likewise.
	* reg-stack (check_asm_stack_operands, remove_regno_note,
	emit_swap_insn, swap_rtx_condition, subst_stack_regs_pat,
	subst_asm_stack_regs): Likewise.
	* regclass.c (scan_one_insn, record_reg_classes, copy_cost,
	record_address_regs, reg_scan_mark_refs): Likewise.
	* regmove.c (discover_flags_reg, replacement_quality,
	copy_src_to_dest, reg_is_remote_constant_p, regmove_optimize,
	fixup_match_1): Likewise.
	* regrename.c (note_sets, clear_dead_regs, build_def_use, kill_value,
	kill_set_value, copyprop_hardreg_forward_1): Likewise.
	* reload.c (MATCHES, push_secondary_reload, find_reusable_reload,
	reload_inner_reg_of_subreg, can_reload_into, push_reload,
	combine_reloads, find_dummy_reload, hard_reg_set_here_p,
	operands_match_p, decompose, find_reloads, find_reloads_toplev,
	find_reloads_address, subst_indexed_address, find_reloads_address_1,
	find_reloads_subreg_address, find_replacement,
	refers_to_regno_for_reload_p, reg_overlap_mentioned_for_reload_p,
	refers_to_mem_for_reload_p, find_equiv_reg, regno_clobbered_p): Likewise.
	* reload1.c (replace_pseudos_in, reload, calculate_needs_all_insns,
	find_reg, delete_dead_insn, alter_reg, eliminate_regs,
	elimination_effects, eliminate_regs_in_insn, scan_paradoxical_subregs,
	forget_old_reloads_1, reload_reg_free_for_value_p, choose_reload_regs,
	emit_input_reload_insns, emit_output_reload_insns, do_input_reload,
	do_output_reload, emit_reload_insns, gen_reload,
	delete_address_reloads_1, inc_for_reload): Likewise.
	* reorg.c (update_reg_dead_notes, fix_reg_dead_note,
	update_reg_unused_notes, fill_slots_from_thread): Likewise.
	* resource.c (update_live_status, mark_referenced_resources,
	mark_set_resources, mark_target_live_regs): Likewise.
	* rtlanal.c (nonzero_address_p, get_jump_table_offset,
	global_reg_mentioned_p_1, reg_mentioned_p, reg_referenced_p,
	reg_set_p, set_noop_p, find_last_value, refers_to_regno_p,
	note_stores, dead_or_set_p, dead_or_set_regno_p, find_regno_note,
	find_reg_fusage, find_regno_fusage, replace_regs, regno_use_in,
	parms_set, find_first_parameter_load, keep_with_call_p,
	hoist_test_store, hoist_update_store, address_cost, nonzero_bits1,
	num_sign_bit_copies1): Likewise.
	* rtlhooks.c (gen_lowpart_general): Likewise.
	* sched-deps.c (deps_may_trap_p, sched_analyze_1, sched_analyze_insn,
	sched_analyze): Likewise.
	* sched-rgn.c (check_live_1, update_live_1, sets_likely_spilled_1):
	Likewise.
	* sdbout.c (sdbout_symbol, sdbout_parms, sdbout_reg_parms): Likewise.
	* simplify-rtx.c (simplify_replace_rtx, simplify_unary_operation,
	simplify_binary_operation, simplify_const_relational_operation,
	simplify_subreg): Likewise.
	* stmt.c (decl_conflicts_with_clobbers_p, expand_asm_operands,
	expand_end_stmt_expr, expand_return, expand_decl,
	expand_anon_union_decl): Likewise.
	* unroll.c (precondition_loop_p, calculate_giv_inc, copy_loop_body,
	find_splittable_regs, find_splittable_givs, find_common_reg_term,
	loop_iterations): Likewise.
	* var-tracking.c (variable_union, variable_part_different_p,
	variable_different_p, count_uses, add_uses, add_stores,
	compute_bb_dataflow, set_variable_part, delete_variable_part,
	emit_notes_in_bb, vt_get_decl_and_offset, vt_add_function_parameters):
	Likewise.
	* varasm.c (assemble_variable): Likewise.

From-SVN: r83195
2004-06-15 18:02:40 +00:00
Kazu Hirata 9cf737f89f bb-reorder.c, [...]: Fix comment formatting.
* bb-reorder.c, builtins.c, c-common.c, c-gimplify.c,
	c-incpath.c, cgraphunit.c, ddg.c, defaults.h, dwarf2out.c,
	expmed.c, flags.h, gcc.c, gensupport.c, gimplify.c, global.c,
	passes.c, reg-stack.c, target.h, toplev.c, tree-alias-ander.c,
	tree-alias-common.c, tree-cfg.c, tree-complex.c, tree-dfa.c,
	tree-eh.c, tree-mudflap.c, tree-mudflap.h, tree-outof-ssa.c,
	tree-phinodes.c, tree-pretty-print.c, tree-ssa-alias.c,
	tree-ssa-ccp.c, tree-ssa-live.c, tree-ssa-live.h,
	tree-ssa-pre.c, tree.h, value-prof.h, varasm.c: Fix comment
	formatting.

From-SVN: r82463
2004-05-30 18:32:31 +00:00
Andrew Pinski d2032ad8b8 reg-stack.c (nan): Rename to ...
2004-05-19  Andrew Pinski  <pinskia@physics.uc.edu>

        * reg-stack.c (nan): Rename to ...
        (not_a_num): Here.
        (reg_to_stack): Rename nan to not_a_num.
        (subst_stack_regs_pat): Likewise.
        (convert_regs_entry): Likewise.
        (convert_regs_1): Likewise.

From-SVN: r82039
2004-05-19 15:27:12 -07:00
Steven Bosscher 827c06b6cf basic-block.h (life_analysis, [...]): Update prototypes.
* basic-block.h (life_analysis, delete_noop_moves):
	Update prototypes.
	* bt-load.c (branch_target_load_optimize): Don't take the
	insns stream as an argument.  Update the life_analysis calls.
	* combine.c (combine_instructions): Update delete_noop_moves
	calls.
	* flow.c (notice_stack_pointer_modification): Don't take the
	insns stream as an argument.  Work on the flow graph.
	(life_analysis): Likewise.
	(delete_noop_moves): Likewise.
	* passes.c (rest_of_handle_stack_regs): Update reg_to_stack call.
	(rest_of_handle_life): Update life_analysis call.
	(rest_of_compilation): Likewise, and also update
	branch_target_load_optimize call.
	* ra.c (reg_alloc): Update life_analysis call.
	* reg-stack.c (reg_to_stack): Likewise.  Also, don't take
	the insns stream as an argument.
	* regrename.c (copyprop_hardreg_forward): Update delete_noop_moves
	call.
	* rtl.c (branch_target_load_optimize, reg_to_stack): Update
	prototypes.
	* value-profile.c (branch_prob): Update life_analysis call.
	* web.c (web_main): Work on the CFG, not on the insns stream.

	* config/ip2k/ip2k.c (ip2k_reorg): Update life_analysis calls.
	* config/m68hc11/m68hc11.c (m68hc11_reorg): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.

From-SVN: r81873
2004-05-15 09:39:30 +00:00
Uros Bizjak c2fcfa4ff8 optabs.h (enum optab_index): Add new OTI_log1p.
* optabs.h (enum optab_index): Add new OTI_log1p.
	(log1p_optab): Define corresponding macro.
	* optabs.c (init_optabs): Initialize log1p_optab.
	* genopinit.c (optabs): Implement log1p_optab using log1p?f2
	patterns.
	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOG1P{,F,L}
	using log1p_optab.
	(expand_builtin): Expand BUILT_IN_LOG1P{,F,L} using
	expand_builtin_mathfn if flag_unsafe_math_optimizations is set.

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2XP1.

	* config/i386/i386.c (ix86_emit_i387_log1p): New function.
	* config/i386/i386-protos.h (ix86_emit_i387_log1p):
	Prototype here.
	* config/i386/i386.md (UNSPEC_FYL2XP1): New unspec to represent
	x87's fyl2xp1 instruction.
	(*fyl2x_xf3): Rename insn definition to fyl2x_xf3.
	(fyl2xp1_xf3): New pattern to implement fyl2xp1 x87 instruction.
	(log1psf2, log1pdf2, log1pxf2): New expanders to implement log1pf,
	log1p  and log1pl built-ins as inline x87 intrinsics.

	* testsuite/gcc.dg/builtins-33.c:  Also check log1p*.

From-SVN: r81606
2004-05-07 07:38:21 +02:00
Uros Bizjak 5ae27cfaed optabs.h (enum optab_index): Add new OTI_fmod and OTI_drem.
* optabs.h (enum optab_index): Add new OTI_fmod and OTI_drem.
        (fmod_optab): Define corresponding macros.
        * optabs.c (init_optabs): Initialize fmod_optab and drem_optab.
        * genopinit.c (optabs): Implement fmod_optab and drem_optab
        using fmod?f3 and drem?f3 patterns.
        * builtins.c (expand_builtin_mathfn_2): Handle BUILT_IN_FMOD{,F,L}
        using fmod_optab and BUILT_IN_DREM{,F,L} using drem_optab.
        (expand_builtin): Expand BUILT_IN_FMOD{,F,L} and
        BUILT_IN_DREM{,F,L} using expand_builtin_mathfn_2 if
        flag_unsafe_math_optimizations is set.

        * reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FPREM_F,
        UNSPEC_FPREM_U, UNSPEC_FPREM1_F and UNSPEC_FPREM1_U.

        * config/i386/i386.c (ix86_emit_fp_unordered_jump): New function.
        * config/i386/i386-protos.h (ix86_emit_fp_unordered_jump):
        Prototype here.
        * config/i386/i386.md (UNSPEC_FPREM_F, UNSPEC_FPREM_U,
        UNSPEC_FPREM1_F, UNSPEC_FPREM1_U): New unspecs to represent x87's
        fprem and fprem1 instructions.
        (*x86_fnstsw_1): Change input parameter to (reg:CCFP 18).
        Rename insn definition to x86_fnstsw_1.
        (fpremxf4, fprem1xf4): New patterns to implement fprem and fprem1
        x87 instructions.
        (fmodsf3, fmoddf3, fmodxf3): New expanders to implement fmodf, fmod
        and fmodl built-ins as inline x87 intrinsics.
        (dremsf3, dremdf3, dremxf3): New expanders to implement dremf, drem
        and dreml built-ins as inline x87 intrinsics.

        * testsuite/gcc.dg/builtins-40.c: New test.

From-SVN: r81555
2004-05-06 07:19:24 +02:00
Kazu Hirata 1ae58c30e2 bb-reorder.c, [...]: Fix comment typos.
* bb-reorder.c, c-opts.c, cfglayout.c, cgraph.c, cgraphunit.c,
	cppfiles.c, fold-const.c, ggc-zone.c, loop-doloop.c, optabs.c,
	reg-stack.c, varasm.c, config/alpha/ev4.md,
	config/alpha/ev5.md, config/alpha/ev6.md, config/arm/arm.c,
	config/c4x/c4x.c, config/c4x/c4x.md, config/cris/cris.c,
	config/cris/cris.h, config/fr30/fr30.h, config/frv/frv.c,
	config/frv/frv.h, config/frv/frv.md, config/h8300/h8300.c,
	config/i386/i386.c, config/i386/i386.md, config/i386/winnt.c,
	config/ia64/itanium2.md, config/ip2k/ip2k.c,
	config/mips/mips.c, config/mips/mips.h, config/mips/sr71k.md,
	config/pa/pa.c, config/s390/s390.c, config/sh/sh.c: Fix
	comment typos.

From-SVN: r81345
2004-04-30 16:27:30 +00:00
Uros Bizjak 6862f97f45 reg-stack.c (subst_stack_regs_pat): <UNSPEC_SIN, UNSPEC_COS, UNSPEC_FRNDINT, UNSPEC_F2XM1>: abort() if src1 dies.
2004-04-30  Uros Bizjak  <uros@kss-loka.si>

        * reg-stack.c (subst_stack_regs_pat): <UNSPEC_SIN, UNSPEC_COS,
        UNSPEC_FRNDINT, UNSPEC_F2XM1>: abort() if src1 dies.
        <UNSPEC_SINCOS_COS, UNSPEC_TAN_ONE, UNSPEC_XTRACT_FRACT>: Same.
        <UNSPEC_SINCOS_SIN, UNSPEC_TAN_TAN, UNSPEC_XTRACT_EXP>: Same.

From-SVN: r81324
2004-04-30 07:31:48 +02:00
Uros Bizjak f964bd29f1 reg-stack.c (swap_to_top): New function.
2004-04-23  Uros Bizjak  <uros@kss-loka.si>

        * reg-stack.c (swap_to_top): New function.
        (subst_stack_regs_pat): UNSPEC_FPATAN, UNSPEC_FYL2X: Use\
        swap_to_top().
        (subst_stack_regs_pat): UNSPEC_FSCALE: Remove.
        (subst_stack_regs_pat): Handle UNSPEC_FSCALE_FRACT and
        UNSPEC_FSCALE_EXP.

        * config/i386/i386.md (UNSPEC_FSCALE): Remove.
        (*fscale_sfxf3, *fscale_dfxf3, *fscale_xf3): Remove insn pattern.
        (UNSPEC_FSCALE_FRACT, UNSPEC_FSCALE_EXP): New unspecs to represent
        x87's fscale insn.
        (*fscalexf4: Define new insn pattern to implement x87 fscale insn.
        (exp?f2, exp10?f2, exp2?f2): Use *fscalexf4 and float_truncate
        patterns.

From-SVN: r81278
2004-04-29 09:19:25 +02:00
Uros Bizjak 88b28a31c0 optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.
2004-04-14  Uros Bizjak  <uros@kss-loka.si>

	* optabs.h (enum optab_index): Add new OTI_logb and OTI_ilogb.
	(logb_optab, ilogb_optab): Define corresponding macros.
	* optabs.c (init_optabs): Initialize logb_optab and ilogb_optab.
	* genopinit.c (optabs): Implement logb_optab and ilogb_optab
	using logb?f2 and ilogb?i2 patterns.
	* builtins.c (expand_builtin_mathfn): Handle BUILT_IN_LOGB{,F,L}
	using logb_optab, and BUILT_IN_ILOGB{,F,L} using ilogb_optab.
	(expand_builtin): Expand BUILT_IN_LOGB{,F,L} and BUILT_IN_ILOGB{,F,L}
	using expand_builtin_mathfn if flag_unsafe_math_optimizations is set.

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_XTRACT_FRACT
	and UNSPEC_XTRACT_EXP.

	* config/i386/i386.md (*fxtractdf3, *fxtractsf3, *fxtractxf3): New
	patterns to implement fxtract x87 instruction.
	(logbdf2, logbsf2, logbxf2, ilogbsi2): New expanders to implement
	logb, logbf, logbl, ilogb, ilogbf and ilogbl built-ins as inline x87
	intrinsics.
	(UNSPEC_XTRACT_FRACT, UNSPEC_XTRACT_EXP): New unspecs to represent
	x87's fxtract insn.

	* gcc.dg/builtins-38.c: New test.

From-SVN: r80709
2004-04-15 02:43:46 +00:00
Uros Bizjak a072d43b46 optabs.c (expand_twoval_unop): Reorder function arguments.
2004-04-13  Uros Bizjak  <uros@kss-loka.si>:

	* optabs.c (expand_twoval_unop): Reorder function arguments.
	* builtins.c (expand_builtin_mathfn_3): Update calls to
	expand_twoval_unop.

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_TAN_ONE
	and UNSPEC_TAN_TAN. Add missing comment.

	* config/i386/i386.md (*tandf3_1, *tansf3_1, *tanxf3_1): New
	patterns to implement fptan x87 instruction.
	(tandf2, tansf2, tanxf2): New expanders to implement tan, tanf
	and tanl built-ins as inline x87 intrinsics. Define corresponding
	peephole2 optimizers for 'fptan; fstp %st(0); fld1' sequence.
	(UNSPEC_TAN_ONE, UNSPEC_TAN_TAN): New unspecs to represent
	x87's fptan insn.


	* gcc.dg/i386-387-1.c: Add new test for __builtin_tan.
	* gcc.dg/i386-387-2.c: Likewise.

	* gcc.dg/i386-387-7.c: New test.
	* gcc.dg/i386-387-8.c: New test.

	* gcc.dg/builtins-37.c: New test.

From-SVN: r80677
2004-04-14 02:37:29 +00:00
Uros Bizjak 6c7cf1f021 builtins.c: Implement support for sincos function.
2004-04-06  Uros Bizjak  <uros@kss-loka.si>

	* builtins.c: Implement support for sincos function.
	(expand_builtin_mathfn): Remove BUILT_IN_SIN{,F,L} and
	BUILT_IN_COS{,F,L}.
	(expand_builtin_mathfn_3): New function.
	(expand_builtin): Expand BUILT_IN_SIN{,F,L} and
	BUILT_IN_COS{,F,L} using expand_builtin_mathfn_3 if
	flag_unsafe_math_optimization is set.

	* optabs.h (enum optab_index): Add new OTI_sincos.
	(sincos_optab): Define corresponding macro.

	* optabs.c (init_optabs): Initialize sincos_optab.
	(expand_twoval_unop): New function.

	* genopinit.c (optabs): Implement sincos_optab using sincos?f3
	patterns.

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_SINCOS_COS
	and UNSPEC_SINCOS_SIN.

	* config/i386/i386.md (sincosdf3, sincossf3, *sincosextendsfdf3,
	sincosxf3): New patterns to implement sincos, sincosf and sincosl
	built-ins as inline x87 intrinsics. Define splits for
	sindf2, sinsf2, *sinextendsfdf2, sinxf2, cosdf2,
	cossf2, *cosextendsfdf2 and cosxf2 patterns from corresponding
	sincos patterns.
	(sindf2, sinsf2, sinxf2): Rename to *sindf2, *sinsf2, *sinxf2.
	(cosdf2, cossf2, cosxf2): Rename to *cosdf2, *cossf2, *cosxf2.

	(UNSPEC_SINCOS_SIN, UNPEC_SINCOS_COS): New unspecs to represent
	x87's unspec insn.

	* gcc.dg/builtins-36.c: New test.

From-SVN: r80463
2004-04-06 19:34:33 +00:00
Roger Sayle 0c5faf294f reg-stack.c (get_true_reg): Handle FLOAT_TRUNCATE like FLOAT_EXTEND if flag_unsafe_math_optimizations.
* reg-stack.c (get_true_reg): Handle FLOAT_TRUNCATE like FLOAT_EXTEND
	if flag_unsafe_math_optimizations.
	* config/i386/i386.md (truncdfsf2): If flag_unsafe_math_optimizations
	and TARGET_80387 expand using truncdfsf2_noop pattern.
	(truncxfsf2): Likewise using truncxfsf2_noop.
	(truncxfdf2): Likewise using truncxfdf2_noop.
	(truncdfsf2_noop, truncxfsf2_noop, truncxfdf2_noop): New patterns.

From-SVN: r79893
2004-03-24 02:28:41 +00:00
Paolo Bonzini ec8e098d3d alias.c (rtx_equal_for_memref_p): Use predicates to test rtx classes and new rtx class codes...
2004-02-07  Paolo Bonzini  <bonzini@gnu.org>

	* alias.c (rtx_equal_for_memref_p): Use predicates
	to test rtx classes and new rtx class codes, possibly
	splitting conditionals that tested against '<' and 'o'.
	* caller-save.c (save_call_clobbered_regs): Likewise.
	* combine.c (contains_muldiv, find_split_point, subst,
	combine_simplify_rtx, simplify_if_then_else,
	simplify_set, simplify_logical, expand_compound_operation,
	make_compound_operation, if_then_else_cond, known_cond,
	apply_distributive_law, cached_nonzero_bits,
	cached_num_sign_bit_copies, simplify_shift_const,
	gen_binary, simplify_comparison, update_table_tick,
	record_value_for_reg, get_lsat_value_validate): Likewise.
	* cse.c (mention_regs, find_best_addr, find_comparison_args,
	fold_rtx, cse_insn, invalidate_memory, cse_basic_block):
	Likewise.
	* emit-rtl.c (copy_insn_1): Likewise.
	* expr.c (force_operand): Likewise.
	* final.c (final_scan_insn, get_mem_expr_from_op): Likewise.
	* flow.c (notice_stack_pointer_modification_1,
	invalidate_mems_from_autoinc, ior_reg_cond, not_reg_cond,
	and_reg_cond, elim_reg_cond): Likewise.
	* function.c (update_epilogue_consts): Likewise.
	* genattrtab.c (attr_rtx_1): Likewise.
	* genopinit.c (gen_insn): Likewise.
	* integrate.c (subst_constants): Likewise.
	* jump.c (reversed_comparison_code_parts,
	reversed_comparison_code, delete_related_insns,
	rtx_renumbered_equal_p): Likewise.
	* local-alloc.c (block_alloc): Likewise.
	* loop.c (rtx_equal_for_prefetch_p, maybe_eliminate_biv,
	canonicalize_condition): Likewise.
	* loop-iv.c (simplify_using_conditions, iv_number_of_iterations):
	Likewise.
	* optabs.c (add_equal_node, expand_binop): Likewise.
	* predict.c (estimate_probability): Likewise.
	* ra-debug.c (ra_print_rtx_2op, ra_print_rtx): Likewise.
	* recog.c (validate_replace_rtx_1, comparison_operator,
	offsettable_address_p, constrain_operands): Likewise.
	* reg-stack.c (swap_rtx_condition_1, subst_stack_regs_pat):
	Likewise.
	* regclass.c (scan_one_insn): Likewise.
	* regmove.c (stable_and_no_regs_but_for_p): Likewise.
	* regrename.c (kill_autoinc_value): Likewise.
	* reload.c (find_reusable_reload, find_reloads,
	reg_overlap_mentioned_for_reload_p): Likewise.
	* reload1.c (gen_reload, delete_address_reloads_1): Likewise.
	* rtl.c (copy_rtx): Likewise.
	* rtl.h (CONSTANT_P, INSN_P): Likewise.
	* rtlanal.c (commutative_operand_precedence): Likewise.
	* sched-deps.c (conditions_mutex_p): Likewise.
	* sched-rgn.c (is_cfg_nonregular): Likewise.
	* simplify-rtx.c (simplify_gen_binary,
	simplify_gen_relational, simplify_replace_rtx,
	simplify_unary_operation, simplify_binary_operation,
	simplify_ternary_operation, simplify_rtx): Likewise.
	* unroll.c (reg_dead_after_loop): Likewise.
	* config/alpha/alpha.c (alpha_swapped_comparison_operator,
	print_operand): Likewise.
	* config/arc/arc.c (proper_comparison_operator): Likewise.
	* config/arm/arm.c (arm_arm_address_cost, arm_select_cc_mode):
	Likewise.
	* config/avr/avr.c (_reg_unused_after): Likewise.
	* config/frv/frv.c (frv_ifcvt_modify_tests,
	frv_ifcvt_modify_insn, frv_pack_insn): Likewise.
	* config/i386/i386.c (ix86_comparison_operator,
	ix86_carry_flag_operator, fcmov_comparison_operator,
	arith_or_logical_operator, print_operand,
	ix86_expand_binary_operator, ix86_binary_operator_ok):
	Likewise.
	* config/i386/i386.md: Likewise.
	* config/ia64/ia64.c (not_postinc_memory_operand,
	ia64_print_operand, update_set_flags, errata_emit_nops):
	Likewise.
	* config/ia64/ia64.h (PREFERRED_RELOAD_CLASS,
	CONSTRAINT_OK_FOR_S): Likewise.
	* config/ip2k/ip2k.c (mdr_resequence_xy_yx,
	mdr_try_move_dp_reload, ip2k_check_can_adjust_stack_ref,
	ip2k_xexp_not_uses_reg_for_mem, ip2k_xexp_not_uses_reg_p,
	ip2k_composite_xexp_not_uses_reg_p, ip2k_unary_operator):
	Likewise.
	* config/iq2000/iq2000.c (cmp_op, symbolic_expression_p,
	eqne_comparison_operator, signed_comparison_operator):
	Likewise.
	* config/mips/mips.c (cmp_op, symbolic_expression_p):
	Likewise.
	* config/mmix/mmix (mmix_foldable_comparison_operator,
	mmix_comparison_operator): Likewise.
	* config/pa/pa.c (hppa_legitimize_address): Likewise.
	* config/rs6000/rs6000.c (stmw_operation,
	branch_comparison_operator, trap_comparison_operator,
	ccr_bit): Likewise.
	* config/rs6000/rs6000.h (SELECT_CC_MODE): Likewise.
	* config/s390/s390.c (s390_alc_comparison,
	s390_slb_comparison):L Likewise.
	* config/sh/sh.c (gen_block_redirect, reg_unused_after):
	Likewise.
	* config/sparc/sparc.c (eq_or_neq, normal_comp_operator,
	noov_compare_op, noov_compare64_op, v9_regcmp_op,
	emit_hard_tfmode_operation, reg_unused_after)
	* doc/md.texi, doc/rtl.texi: Likewise.

	* ra-debug.c: Add 2004 to list of copyright years.
	* unroll.c: Likewise.

	* combine.c (simplify_logical): Remove dummy test,
	(apply_distributive_law): Fix typo in comment.
	GET_CODE (x) == AND so x is a commutative binary op.
	* jump.c (delete_related_insns): simplify loop
	condition, move testing of RTX codes inside the loop.
	(rtx_renumbered_equal_p): do not use RTX_CODE.
	* rtl.c (rtx_class): Declare as enum rtx_class.
	* rtl.def (EQ, NE, UNEQ, LTGT, UNORDERED, ORDERED):
	Move to RTX_COMM_COMPARE class.
	(HIGH, SYMBOL_REF, LABEL_REF, CONST, CONST_INT, CONST_DOUBLE):
	Move to RTX_CONST_OBJ class.
	* rtl.h (enum rtx_class): New declaration,
	(RTX_OBJ_MASK, RTX_OBJ_RESULT, RTX_COMPARE_MASK,
	RTX_COMPARE_RESULT, RTX_ARITHMETIC_MASK, RTX_ARITHMETIC_RESULT,
	RTX_BINARY_MASK, RTX_BINARY_RESULT, RTX_COMMUTATIVE_MASK,
	RTX_COMMUTATIVE_RESULT, RTX_NON_COMMUTATIVE_RESULT,
	RTX_EXPR_FIRST, RTX_EXPR_LAST, UNARY_P, BINARY_P,
	ARITHMETIC_P, COMMUTATIVE_ARITHMETIC_P, COMPARISON_P,
	SWAPPABLE_OPERANDS_P, NON_COMMUTATIVE_P, COMMUTATIVE_P,
	OBJECT_P): New macros.
	* config/sparc/sparc.c (noov_compare_op): Remove register
	from parameter.

From-SVN: r78824
2004-03-03 08:35:33 +00:00
Jan Hubicka 736b64ddb4 recog.c (split_all_insns): Do not update reg info.
* recog.c (split_all_insns): Do not update reg info.
	* regrename.c (regrename_optimize): Likewise.
	* toplev.c (rest_of_handle_reorder_blocks): Likewise.
	* flow.c (struct propagate_block_info): Add insn_num field.
	(reg_deaths): New array.
	(life_analysis): Free reg_deaths info.
	(allocate_reg_life_data): Allocate reg_deaths array.
	(propagate_one_insn): Use new array.
	(init_propagate_block): Initialize it.
	(free_propagate_block_info): Finish compuation of
	REG_LIVE_LENGTH
	(attempt_auto_inc): Sanity check that REG_INFO is not
	computed at same time.
	(mark_used_regs): Update new array.

	* reg-stack.c (subst_stack_regs): Unshare clobbers before
	substitution.

From-SVN: r77396
2004-02-06 13:57:15 +00:00
Jan Hubicka 66fd46b6c6 alias.c (record_set): Use hard_regno_nregs.
* alias.c (record_set): Use hard_regno_nregs.
	* bt-load.c (find_btr_reference, note_btr_set): Likewise.
	* builtins.c (apply_args_size): Likewise.
	* caller-save.c (setup_save_areas, save_call_clobbered_regs,
	mark_set_regs, add_stored_regs, mark_referenced_regs,
	insert_restore, insert_save, insert_one_insn): Likewise.
	* cfgcleanup.c: Include regs.h
	(mark_effect, mentions_nonequal_regs): Likewise.
	* cfgrtl.c (mark_killed_regs): Likewise
	* combine.c (update_table_tick, record_value_for_reg,
	record_dead_and_set_regs, get_last_value_validate, use_crosses_set_p,
	reg_dead_at_p_1, reg_dead_at_p, mark_used_regs_combine, move_deaths,
	reg_bitfield_target_p, distribute_notes): Likewise.
	* cse.c (mention_regs, insert, invalidate, invalidate_for_call,
	exp_equiv_p, cse_insn): Likewise.
	* cselib.c (cselib_lookup): Likewise.
	(cselib_invalidate_regno, cselib_record_set): Likewise.
	* df.c (df_ref_record): Likewise.
	* dwarf2out.c (reg_loc_descriptor, multiple_reg_loc_descriptor):
	Likewise.
	* flow.c (mark_reg, insn_dead_p, mark_set_1, mark_used_reg,
	count_or_remove_death_notes_bb): Likewise.
	* function.c (aggregate_value_p, keep_stack_depressed): Likewise.
	* gloval.c (global_alloc, find_reg, mark_reg_store, mark_reg_conflicts,
	mark_reg_death, set_preference, reg_becomes_live, reg_dies): Likewise.
	* integrate.c (mark_stores): Likewise.
	* jump.c (delete_prior_computation): Likewise.
	* lcm.c (reg_dies, reg_becomes_live): Likewise.
	* local-alloc.c (combine_regs, find_free_reg, post_mark_life): Likewise.
	* loop.c (LOOP_REGNO_NREGS): Likewise.
	* postreload.c (reload_combine, reload_combine_note_store,
	reload_combine_note_use, reload_cse_move2add, move2add_note_store): Likewise.
	* ra-colorize.c (combine, color_usable_p, get_free_reg,
	calculate_dont_begin, calculate_dont_begin, colorize_one_web,
	try_recolor_web, insert_coalesced_conflicts, check_colors,
	break_precolored_alias): Likewise.
	* ra-debug.c: Include regs.h
	(ra_print_rtx_object): Likewise.
	* ra-rewrite (choose_spill_colors): Likewise.
	(spill_same_color_p, update_spill_colors, spill_is_free): Likewise.
	* ra.c (init_ra): Likewise.
	* recog.c (reg_fits_class_p, peep2_reg_dead_p,
	peep2_find_free_register): Likewise.
	* reg-stack.c (subst_stack_regs_pat, convert_regs_exit): Likewise.
	* regclass.c (hard_regno_nregs): New array.
	(init_reg_modes_once): Initialize it.
	(choose_hard_reg_mode): Use it.
	(record_reg_classes): Likewise.
	* regmove.c (mark_flags_life_zones): Likewise.
	* regrename.c (note_sets, clear_dead_regs, regrename_optimize,
	scan_rtx_reg, dump_def_use_chain, kill_value, set_value_regno,
	copy_value, maybe_mode_change, find_oldest_value_reg,
	copyprop_hardreg_forward_1):
	* regs.h (hard_regno_nregs): Declare.
	* realod.c (reload_inner_reg_of_subreg): Use it.
	(push_reload, combine_reloads, find_dummy_reload,
	hard_reg_set_here_p, operands_match_p, decompose, find_reloads,
	refers_to_regno_for_reload_p, find_equiv_reg, regno_clobbered_p,
	reload_adjust_reg_for_mode): Likewise.
	* reload1.c (compute_use_by_pseudos, count_pseudo,
	count_spilled_pseudo, find_reg, find_reload_regs, mark_home_live,
	spill_hard_reg, forget_old_reloads_1, mark_reload_reg_in_use,
	clear_reload_reg_in_use, reload_reg_free_for_value_p, free_for_value_p
	allocate_reload_reg, choose_reload_regs, emit_reload_insns,
	delete_output_reload): Likewise.
	* resource.c (update_live_status, mark_referenced_resources,
	mark_set_resources, mark_target_live_regs): Likewise.
	* rtlanal.c:  Include regs.h
	(refers_to_regno_p, reg_overlap_mentioned_p, dead_or_set_p,
	dead_or_set_regno_p, find_regno_note, find_reg_fusage,
	subreg_regno_offset, subreg_offset_representable_p,
	hoist_test_store): Likewise.
	* sched-deps.c (sched_analyze_1, sched_analyze_2): Likewise.
	* sched-rgn.c (check_live_1, update_live_1): Likewise.
	* stmt.c: Include regs.h
	(decl_conflicts_with_clobbers_p): Likewise.
	* varasm.c (make_decl_rtl): Likewise.
	* Makefile.in (cfgcleanup.o, rtlanal.o, ra-debug.o): Add regs.h dependnecy.

From-SVN: r77088
2004-02-02 00:17:18 +00:00
Kazu Hirata d9221e016b alias.c, [...]: Update copyright.
* alias.c, basic-block.h, c-common.c, c-common.h,
	c-cppbuiltin.c, c-opts.c, c-pragma.c, c-pretty-print.c,
	calls.c, cfg.c, cfgcleanup.c, cfgrtl.c, cgraph.h, collect2.c,
	combine.c, cppcharset.c, cpphash.h, cppinit.c, cpplib.c,
	cpplib.h, cppmacro.c, crtstuff.c, cselib.c, cselib.h,
	defaults.h, df.c, dominance.c, et-forest.c, expmed.c, expr.c,
	expr.h, fix-header.c, function.h, gcc.c, gcse.c, genattrtab.c,
	genautomata.c, genconditions.c, genemit.c, genflags.c,
	gengtype.c, gengtype.h, genopinit.c, genrecog.c, gensupport.c,
	ggc-zone.c, graph.c, haifa-sched.c, input.h, integrate.c,
	langhooks-def.h, langhooks.c, langhooks.h, line-map.c,
	line-map.h, local-alloc.c, optabs.c, optabs.h, postreload.c,
	ra.h, recog.c, reg-stack.c, regmove.c, reload.c, reorg.c,
	rtl.c, sched-deps.c, sched-ebb.c, sdbout.c, system.h,
	target.h, targhooks.c, toplev.h, tree-inline.c, unwind-pe.h,
	unwind.h, varray.c, varray.h: Update copyright.

From-SVN: r76302
2004-01-21 20:40:04 +00:00
Kazu Hirata 5d3cc25206 alias.c: Fix comment typos.
* alias.c: Fix comment typos.
	* builtins.c: Likewise.
	* cfg.c: Likewise.
	* df.c: Likewise.
	* dominance.c: Likewise.
	* dwarf2out.c: Likewise.
	* emit-rtl.c: Likewise.
	* expr.c: Likewise.
	* final.c: Likewise.
	* fold-const.c: Likewise.
	* gcse.c: Likewise.
	* genattrtab.c: Likewise.
	* genrecog.c: Likewise.
	* gensupport.c: Likewise.
	* ggc-zone.c: Likewise.
	* integrate.c: Likewise.
	* local-alloc.c: Likewise.
	* loop.c: Likewise.
	* recog.c: Likewise.
	* regmove.c: Likewise.
	* reg-stack.c: Likewise.
	* reorg.c: Likewise.
	* rtlanal.c: Likewise.
	* rtl.h: Likewise.
	* sched-ebb.c: Likewise.
	* simplify-rtx.c: Likewise.
	* toplev.c: Likewise.
	* varasm.c: Likewise.

From-SVN: r75475
2004-01-06 16:51:21 +00:00
Steven Bosscher a813c11120 basic-block.h (BLOCK_HEAD, BLOCK_END): Remove.
2003-12-11  Steven Bosscher  <steven@gcc.gnu.org>

	* basic-block.h (BLOCK_HEAD, BLOCK_END): Remove.
	(BLOCK_HEAD_TREE, BLOCK_END_TREE): Remove.
	(basic_block_def): Rename `head' to `head_' and `end' to `end_'.
	(BB_HEAD, BB_END): New accessor macros for the `head_' and `end_'
	fields of a basic block.
	* bb-reorder.c, bt-load.c, caller-save.c, cfg.c, cfganal.c,
	cfgbuild.c, cfgcleanup.c, cfglayout.c, cfgloop.c, cfgloopanal.c,
	cfgloopmanip.c, cfgrtl.c, combine.c, conflict.c, df.c, emit-rtl.c,
	final.c, flow.c, function.c, gcse.c, global.c, graph.c,
	haifa-sched.c, ifcvt.c, lcm.c, local-alloc.c, loop-unswitch.c,
	loop.c, postreload.c, predict.c, profile.c, ra-build.c, ra-debug.c,
	ra-rewrite.c, ra.c, recog.c, reg-stack.c, regclass.c, regmove.c,
	regrename.c, reload1.c, resource.c, sched-ebb.c, sched-rgn.c,
	sibcall.c, tracer.c, config/frv/frv.c, config/i386/i386.c,
	config/ia64/ia64.c: Use the BB_HEAD and BB_END macros instead of
	accessing the `head' and `end' fields of a basic block directly.

	* gengtype.c: Add missing piece from earlier patch.  Dunno what
	I was thinking...

From-SVN: r74520
2003-12-11 00:20:51 +00:00
Eric Botcazou ecb63641ff re PR target/12900 (g++ ICE in rtl_verify_flow_info_1)
PR target/12900
	* reg-stack (move_for_stack_reg): New prototype.  Return
	whether a control flow insn was deleted.
	(subst_stack_regs_pat): Likewise, using the information provided
	by move_for_stack_reg.
	(subst_stack_regs): Likewise, using the information provided
	by subst_stack_regs_pat.
	(convert_regs_1): Record whether a control flow insn was deleted,
	using the information provided by subst_stack_regs.  Purge dead
	edges only if a control flow insn was deleted.

From-SVN: r73977
2003-11-27 06:36:52 +00:00
Jan Hubicka f8a1ebc603 real.c (encode_ieee_extended): Initialize whole array.
* real.c (encode_ieee_extended): Initialize whole array.
	* reg-stack.c (move_for_stack_reg0: Use always XFmode.
	* i386-modes.def: Change definitions of TFmode and XFmode.
	* i386.c (classify_argument): Rename TFmodes to XFmodes; add new TFmode code.
	(construct_container): Allow constructing of TFmode integer containers.
	(ix86_return_in_memory):  XFmode is not returned in memory.
	(init_ext_80387_constants): Always use XFmode.
	(print_operand): Likewise.
	(ix86_prepare_fp_compare_regs): Likewise.
	(split_to_parts): Deal with TFmode.
	(split_long_move): Simplify.
	(ix86_init_mmx_sse_builtins): Add __float80, __float128.
	(ix86_memory_move_cost): Do not confuse TFmode.
	* i386.h (LONG_DOUBLE_TYPE_SIZE): Set to 96.
	(IS_STACK_MODE): TFmode is not stack mode.
	(HARD_REGNO_NREGS, CLASS_MAX_NREGS): Deal nicely with XFmode.
	(VALID_SSE_REG_MODE): Allow TFmode.
	(VALID_FP_MODE_P): Disallow TFmode.
	(VALID_INT_MODE_P): Allow TFmode in 64bit mode.
	* i386.md (TFmode patterns): Kill.
	(movtf, motf_rex64): New patterns.

From-SVN: r73099
2003-10-30 21:01:16 +00:00
Eric Botcazou b3cd99cdbd re PR target/12712 (ICE on short legit C++ code fragment with gcc 3.3.2)
PR target/12712
	* reg-stack.c (convert_regs_1): Create an arbitrary input stack
	if the block has no predecessors.
	(convert_regs_2): Document the problem with successors whose
	only predecessor is the block to be processed.
	(convert_regs): Don't create the arbitrary input stack here.

From-SVN: r72923
2003-10-25 12:55:18 +00:00
Jan Hubicka cb0bc26338 re PR rtl-optimization/12612 (ICE when using log function with -O3 -ffast-math)
* i386.c (print_reg): Do not abort on certain registers.

	PR optimization/12612
	* reg-stack.c (subst_stack_regs_pat):  Use st(1) for clobbers.
	* i386.md (fpatan, fyl2x, fscale patterns and expanders): Use
	match_scratch; avoid bogus paralles.

	PR target/12674
	* i386.c (ix86_function_regparm): Disable implicit register passing
	conventions when profiling.

From-SVN: r72681
2003-10-19 18:00:12 +00:00
Kazu Hirata 2067c116a4 c-pretty-print.c: Fix comment typos.
* c-pretty-print.c: Fix comment typos.
	* c-pretty-print.h: Likewise.
	* calls.c: Likewise.
	* cfgloopmanip.c: Likewise.
	* cgraphunit.c: Likewise.
	* cppfiles.c: Likewise.
	* final.c: Likewise.
	* function.c: Likewise.
	* gcov-io.h: Likewise.
	* gcse.c: Likewise.
	* genoutput.c: Likewise.
	* loop.c: Likewise.
	* postreload.c: Likewise.
	* reg-stack.c: Likewise.
	* regmove.c: Likewise.
	* sched-int.h: Likewise.
	* sched-rgn.c: Likewise.
	* simplify-rtx.c: Likewise.
	* tree-inline.c: Likewise.
	* config/m68hc11/m68hc11.h: Likewise.
	* config/mmix/mmix.c: Likewise.
	* config/mn10300/mn10300.md: Likewise.
	* config/sh/sh.h: Likewise.

From-SVN: r72118
2003-10-05 19:50:56 +00:00
Eric Botcazou de582cfbb9 re PR target/9786 (Ice in fixup_abnormal_edges with -fnon-call-exceptions -O2)
PR target/9786
	* reg-stack.c (convert_regs_1): Purge possible dead eh edges
	after potential deletion of trapping insn. Avoids later ICE
	from call to fixup_abnormal_edges.
	(convert_regs_2): Stack the current block successors before
	processing this block, that is, before the potential deletion of
	dead edges by convert_regs_1, because these edges have been used
	to initialize the predecessors count.

From-SVN: r71644
2003-09-22 06:59:51 +00:00
DJ Delorie 61f71b3447 targhooks.c: New file.
* targhooks.c: New file.
	* targhooks.h: New file.
	* Makefile.in: Add targhooks.o support.
	(function.o): Depend on$(TARGET_H).
	(stmt.o): Likewise.
	(combine.o): Depend on $(TREE_H) and $(TARGET_H).
	* builtins.c (apply_args_size, expand_builtin_apply_args_1,
	expand_builtin_apply): Convert to calls.struct_value_rtx hook.
	(expand_builtin_saveregs): Convert to
	calls.expand_builtin_saveregs hook.
	* c-decl.c (start_decl): Handle new calls.promote_prototypes hook
	here, instead of ...
	(get_parm_info) ... here.
	(store_parm_decls_oldstyle): Convert to calls.promote_prototypes
	hook.
	(finish_function): Handle calls.promote_prototypes hook here too.
	* c-typeck.c (convert_arguments): Convert to
	calls.promote_prototypes hook.
	(c_convert_parm_for_inlining): Likewise.
	* calls.c (initialize_argument_information): Convert to
	calls.promote_function_args hook.
	(expand_call): Convert to calls.struct_value_rtx,
	calls.strict_argument_naming,
	calls.pretend_outgoing_varargs_named, and
	calls.promote_function_return hooks.  Pass fndecl to
	aggregate_value_p.  Initialize CUMULATIVE_ARGS before calling
	hooks, so they can use that.
	(emit_library_call_value_1): Likewise.
	* combine.c (setup_incoming_promotions): Convert to
	calls.promote_function_args hook.
	* emit-rtl.c: Convert to calls.struct_value_rtx hook.
	* expr.c (expand_assignment): Pass call to aggregate_value_p.
	(expand_expr): Likewise.
	* expr.h: Remove support for SETUP_INCOMING_VARARGS,
	STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
	RETURN_IN_MEMORY macro defaults.
	* final.c (profile_function): Convert to calls.struct_value_rtx
	hook.
	* function.c (aggregate_value_p): Accept function type tree as
	second parameter; try to deduce fntype from it.  Convert to
	calls.return_in_memory hook.
	(assign_parms): Convert to calls.setup_incoming_varargs,
	calls.strict_argument_naming, calls.promote_function_args,
	calls.pretend_outgoing_varargs_named hooks.  Pass fndecl to
	aggregate_value_p.
	(expand_function_start): Likewise.  Convert to
	calls.struct_value_rtx hook.
	(expand_function_end): Convert to calls.promote_function_return hook.
	(allocate_struct_function): Pass fndecl to aggregate_value_p.
	* hard-reg-set.h: Update comments to new hook names.
	* integrate.c (expand_inline_function): Pass fndecl to aggregate_value_p.
	* reg-stack.c (stack_result): Likewise.
	* rtl.h (struct_value_rtx, struct_value_incoming_rtx): Delete.
	* stmt.c (expand_value_return): Convert to
	calls.promote_function_return hook.
	* target-def.h: Add TARGET_PROMOTE_FUNCTION_ARGS,
	TARGET_PROMOTE_FUNCTION_RETURN, TARGET_PROMOTE_PROTOTYPES,
	TARGET_STRUCT_VALUE_RTX, TARGET_RETURN_IN_MEMORY,
	TARGET_EXPAND_BUILTIN_SAVEREGS, TARGET_SETUP_INCOMING_VARARGS,
	TARGET_STRICT_ARGUMENT_NAMING,
	TARGET_PRETEND_OUTGOING_VARARGS_NAMED, and TARGET_CALLS.
	* target.h: Likewise.
	* tree.h (aggregate_value_p): Also takes a tree to deduce function
	attributes from (for target hooks).
	* doc/tm.texi (PROMOTE_FUNCTION_ARGS, PROMOTE_FUNCTION_RETURN,
	PROMOTE_PROTOTYPES, RETURN_IN_MEMORY, STRUCT_VALUE_REGNUM,
	STRUCT_VALUE, STRUCT_VALUE_INCOMING_REGNUM, STRUCT_VALUE_INCOMING,
	EXPAND_BUILTIN_SAVEREGS, SETUP_INCOMING_VARARGS,
	STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED): Convert
	to hooks.

	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Pass function
	to aggregate_value_p.
	* config/arm/arm.c (arm_init_cumulative_args,
	arm_output_mi_thunk): Likewise.
	* config/i386/i386.c (ix86_return_pops_args, x86_this_parameter):
	Likewise.
	* config/mips/mips.c (mips_save_reg_p, mips_expand_prologue,
	mips_can_use_return_insn): Likewise.
	* config/rs6000/rs6000.c (rs6000_output_mi_thunk): Likewise.
	* config/s390/s390.c (s390_output_mi_thunk): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Pass function to
	aggregate_value_p.
	* config/story16/stormy16.c (xstormy16_asm_output_mi_thunk): Pass
	function to aggregate_value_p.
	* objc/objc-act.c (generate_struct_by_value_array): Pass NULL to
	aggregate_value_p.

	* config/sh/sh-protos.h (sh_builtin_saveregs): Remove.
	(sh_attr_renesas_p, sh_cfun_attr_renesas_p, sh_function_arg,
	sh_function_arg_advance, sh_pass_in_reg_p): New.  * config/sh/sh.c
	(sh_handle_renesas_attribute, sh_promote_prototypes,
	sh_struct_value_rtx, sh_return_in_memory, sh_builtin_saveregs,
	sh_setup_incoming_varargs, sh_strict_argument_naming,
	sh_pretend_outgoing_varargs_named): New decls.
	(targetm): Add new hooks.
	(calc_live_regs): Save MACL and MACH if the function has the
	renesas attribute.
	(sh_expand_prologue): Support renesas attribute.
	(sh_builtin_saveregs): Make static.
	(sh_build_va_list): Support renesas attribute.
	(sh_va_start): Likewise.
	(sh_va_arg): Likewise.
	(sh_promote_prototypes): New.
	(sh_function_arg): New, moved from sh.h.  Support renesas
	attribute.
	(sh_function_arg_advance): Likewise.
	(sh_return_in_memory): Likewise.
	(sh_strict_argument_naming): Likewise.
	(sh_pretend_outgoing_varargs_named): Likewise.
	(sh_struct_value_rtx): New.
	(sh_attribute): Add renesas attribute.
	(sh_handle_renesas_attribute): New.
	(sh_attr_renesas_p, sh_cfun_attr_renesas_p): New.
	(sh_ms_bitfield_layout_p): Support renesas attribute also.
	(sh_output_mi_thunk): Pass function to aggregate_value_p.  *
	config/sh/sh.h (TARGET_SWITCHES): Add -mrenesas as an alias for
	-mhitachi.
	(STRUCT_VALUE_REGNUM, STRUCT_VALUE, RETURN_IN_MEMORY): Moved to
	target hooks.
	(sh_args): Add renesas_abi flag.
	(INIT_CUMULATIVE_ARGS): Set it.  Pass fndecl to aggregate_value_p.
	(FUNCTION_ARG_ADVANCE, FUNCTION_ARG): Move to sh.c.
	(PASS_IN_REG_P): Support renesas attribute.  Pass DF and TF on the
	stack for the renesas abi.
	(STRICT_ARGUMENT_NAMING, PRETEND_OUTGOING_VARARGS_NAMED,
	SETUP_INCOMING_VARARGS, EXPAND_BUILTIN_SAVEREGS,
	PROMOTE_PROTOTYPES): Moved to sh.c.  * config/sh/sh.md (call): Set
	call cookie to indicate renesas calls.

	* decl.c (finish_function): Pass fndecl to aggregate_value_p.

	* misc.c (default_pass_by_ref): Convert to calls.return_in_memory
	hook.

From-SVN: r71048
2003-09-03 23:18:05 -04:00
Kaveh R. Ghazi 703ad42b4b alias.c [...]: Remove unnecessary casts.
* alias.c alloc-pool.c bitmap.c bitmap.h bt-load.c builtins.c
	c-common.c c-decl.c c-incpath.c c-lex.c c-opts.c c-parse.in
	c-pragma.c c-typeck.c calls.c cfg.c cfganal.c cfgloop.c cfgrtl.c
	collect2.c combine.c conflict.c coverage.c cppexp.c cppfiles.c
	cpphash.c cppinit.c cpplex.c cpplib.c cppmacro.c cppspec.c
	cpptrad.c cse.c cselib.c dbxout.c defaults.h df.c dominance.c
	dwarf2out.c dwarfout.c emit-rtl.c except.c expmed.c expr.c final.c
	fix-header.c flow.c fold-const.c function.c gcc.c gccspec.c gcov.c
	gcse.c genattr.c genattrtab.c genautomata.c genconditions.c
	genemit.c genextract.c genoutput.c genrecog.c gensupport.c
	ggc-page.c ggc-simple.c global.c graph.c haifa-sched.c hashtable.c
	integrate.c jump.c langhooks.c lcm.c line-map.c local-alloc.c
	loop.c mips-tdump.c mips-tfile.c mkdeps.c optabs.c params.c
	postreload.c prefix.c print-tree.c protoize.c ra-build.c
	ra-colorize.c ra-rewrite.c ra.c recog.c reg-stack.c regclass.c
	regmove.c regrename.c reload.c reload1.c reorg.c resource.c
	sbitmap.c sched-deps.c sched-rgn.c sched-vis.c sdbout.c
	simplify-rtx.c ssa-ccp.c ssa.c stmt.c stor-layout.c timevar.c
	tlink.c toplev.c tree-dump.c tree.c unroll.c unwind-dw2-fde.c
	varasm.c varray.c vmsdbgout.c xcoffout.c: Remove unnecessary
	casts.

From-SVN: r69587
2003-07-19 14:47:15 +00:00
Andreas Jaeger 0c20a65f04 jump.c: Convert prototypes to ISO C90.
* jump.c: Convert prototypes to ISO C90.
	* langhooks-def.h: Likewise.  Add extern to prototypes.
	* langhooks.c: Likewise.
	* langhooks.h: Likewise.
	* lcm.c: Likewise.
	* local-alloc.c: Likewise.
	* loop-init.c: Likewise.
	* loop-unroll.c: Likewise.
	* loop-unswitch.c: Likewise.
	* loop.c: Likewise.
	* loop.h: Likewise. Add extern to prototypes.
	* machmode.h: Likewise.
	* main.c: Likewise.
	* mbchar.c: Likewise.
	* mbchar.h: Likewise.
	* mkdeps.c: Likewise.
	* mkdeps.h: Likewise.
	* optabs.c: Likewise.
	* optabs.h: Likewise.
	* output.h: Likewise.
	* gccspec.c: Likwise.
	* postreload.c: Likewise.
	* prefix.c: Likewise.
	* prefix.h: Likewise.
	* print-rtl.c: Likewise.
	* print-tree.c: Likewise.
	* profile.c: Likewise.
	* read-rtl.c: Likewise.
	* real.c: Likewise.
	* real.h: Likewise.
	* recog.c: Likewise.
	* recog.h: Likewise.
	* reg-stack.c: Likewise.
	* regclass.c: Likewise.
	* regmove.c: Likewise.
	* regrename.c: Likewise.
	* regs.h: Likewise.
	* reload.c: Likewise.
	* reload.h: Likewise.
	* reload1.c: Likewise.
	* reorg.c: Likewise.
	* resource.c: Likewise.
	* resource.h: Likewise.
	* rtl-error.c: Likewise.
	* rtl.c: Likewise.
	* rtl.h: Likewise.
	* rtlanal.c: Likewise.

From-SVN: r68998
2003-07-06 11:56:09 +02:00
Nathan Sidwell 2e04021970 rtl.h (emit_note): Remove FILE parameter.
* rtl.h (emit_note): Remove FILE parameter.
	* emit-rtl.c (emit_line_note): Adjust emit_note call.
	(emit_note): Remove FILE parameter. Adjust.
	* builtins.c (expand_builtin_expect): Adjust emit_note call.
	* c-semantics.c (genrtl_scope_stmt): Likewise.
	(expand_stmt): Likewise.
	* cfglayout.c (reemit_insn_block_notes): Likewise.
	(duplicate_insn_chain): Likewise.
	* except.c (expand_eh_region_start, expand_eh_region_end,
	sjlj_emit_function_enter): Likewise.
	* explow.c (probe_stack_range): Likewise.
	* expr.c (emit_block_move_via_loop): Likewise.
	* function.c (init_function_start, expand_function_start,
	expand_function_end, thread_prologue_and_epilogue_insns): Likewise.
	* integrate.c (expand_inline_function, copy_insn_list): Likewise.
	* reg-stack.c (compensate_edge): Likewise.
	* reload1.c (reload): Likewise.
	* rtlanal.c (hoist_insn_to_edge): Likewise.
	* stmt.c (expand_fixup, expand_start_loop, expand_start_null_loop,
	expand_loop_continue_here, expand_end_loop, expand_continue_loop,
	expand_exit_loop_top_cond, expand_value_return,
	expand_start_bindings_and_block, expand_end_bindings,
	expand_decl_cleanup, expand_start_case): Likewise.
	* unroll.c (copy_loop_body
	* config/alpha/alpha.c (alpha_output_mi_thunk_osf): Likewise.
	* config/ia64/ia64.c (ia64_output_mi_thunk): Likewise.
	* config/rs6000/rs6000.c (rs6000_emit_eh_toc_restore,
	rs6000_emit_allocate_stack, rs6000_output_function_prologue,
	rs6000_output_function_epilogue, rs6000_output_mi_thunk): Likewise.
	* config/sh/sh.c (sh_output_mi_thunk): Likewise.
	* config/sparc/sparc.c (sparc_output_mi_thunk): Likewise.

	* ada/misc.c (record_code_position): Likewise.

From-SVN: r68561
2003-06-27 09:49:44 +00:00
Roger Sayle 9d5b9daeb9 i386.md (expsf2, [...]): New patterns to implement exp, expf and expl built-ins as inline x87 intrinsics.
* config/i386/i386.md (expsf2, expdf2, expxf2): New patterns to
	implement exp, expf and expl built-ins as inline x87 intrinsics.
	(UNSPEC_FSCALE, UNSPEC_FRNDINT, UNSPEC_F2XM1): New unspecs to
	represent x87's fscale, frndint and f2xm1 insns respectively.
	(*fscale_sfxf3, *fscale_dfxf3, *fscale_xf3): New insn patterns
	to encode x87's "fscale" instruction followed by a pop.
	(*frndintxf2): New insn pattern for "frndint".
	(*f2xm1xf2): New insn pattern for "f2xm1".

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FRNDINT and
	UNSPEC_F2XM1 like UNSPEC_{SIN,COS} and handle UNSPEC_FSCALE like
	UNSPEC_FPATAN.

	* gcc.dg/builtins-22.c: New test case.
	* gcc.dg/i386-387-1.c: Update to test exp.
	* gcc.dg/i386-387-2.c: Likewise.

From-SVN: r67973
2003-06-15 13:32:31 +00:00
Richard Henderson d6fc04926d re PR inline-asm/4823 (gcc reports internal compiler error on legal code)
PR inline-asm/4823
        * reg-stack.c (any_malformed_asm): New.
        (check_asm_stack_operands): Set it.
        (convert_regs_1): Check it before aborting.

From-SVN: r67845
2003-06-12 11:01:26 -07:00
Roger Sayle 358997e28a i386.md (logsf2, [...]): New patterns to implement log, logf and logl built-ins as inline x87 intrinsics.
* config/i386/i386.md (logsf2, logdf2, logxf2, logdf2): New patterns
	to implement log, logf and logl built-ins as inline x87 intrinsics.
	(UNSPEC_FYL2X): New unspec to represent x87's "fyl2x" instruction.
	(*fyl2x_sfxf3, *fyl2x_dfxf3, *fyl2x_xf3, *fyl2x_tfxf3): New insn
	patterns for x87's "fyl2x" instruction, used by log?f2 patterns.

	* reg-stack.c (subst_stack_regs_pat): Handle UNSPEC_FYL2X like
	UNSPEC_FPATAN, i.e. replaces two stack operands with single result.

	* gcc.dg/i386-387-1.c: Update to also test log.
	* gcc.dg/i386-387-2.c: Likewise.

From-SVN: r66709
2003-05-12 02:51:40 +00:00
Roger Sayle 6a87d63407 c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.
* c-cppbuiltin.c (builtin_define_with_value_n): Fix whitespace.
	* c-typeck.c (c_tree_expr_nonnegative_p): Likewise.
	* cfgbuild.c (find_many_sub_basic_blocks): Likewise.
	(find_sub_basic_blocks): Likewise.
	* cgraphunit.c (cgraph_expand_functions): Likewise.
	* dwarf2out.c (prune_unused_types): Likewise.
	* expr.c (store_field): Likewise.
	* genextract.c (print_path): Likewise.
	* haifa-sched.c (schedule_insn): Likewise.
	* lcm.c (compute_antinout_edge): Likewise.
	* loop-unroll.c (decide_peel_once_rolling): Likewise.
	* ra-colorize.c (ra_colorize_free_all): Likewise.
	* ra-debug.c (dump_igraph): Likewise.
	(debug_hard_reg_set): Likewise.
	* reg-stack.c (reg_to_stack): Likewise.
	* rtlanal.c (refers_to_regno_p): Likewise.
	* tracer.c (layout_superblocks): Likewise.

	* cp/tree.c (count_functions): Fix whitespace.

	* f/ste.c (ffeste_R810): Fix whitespace.

From-SVN: r64402
2003-03-15 13:43:33 +00:00
Jan Hubicka 10a3fdd926 combine.c (gen_lowpart_for_combine): Update handling of subregs_of_mode
* combine.c (gen_lowpart_for_combine): Update handling of
	subregs_of_mode
	* flow.c (life_analysis, mark_used_regs): Likewise.
	* regclass.c (subregs_of_mode): Turn into single bitmap.
	(cannot_change-mode_set_regs, invalid_mode_change_p): Update
	dealing with subregs_of_mode
	* regs.h (subregs_of_mode): Update prototype.

From-SVN: r63552
2003-02-28 10:11:47 +00:00
Jan Hubicka 9dca2ad510 cfgrtl.c (commit_one_edge_insertion): Only mark BB for splitting.
* cfgrtl.c (commit_one_edge_insertion): Only mark BB for splitting.
	(commit_edge_insertions): Call find_many_sub_basic_blocks

	* reg-stack.c (convert_regs): Cleax aux for blocks.

From-SVN: r63216
2003-02-21 10:06:44 +00:00