Commit Graph

17 Commits

Author SHA1 Message Date
Ben Elliston 21f1c57746 Correct the description of these files in the comment header.
From-SVN: r74018
2003-11-28 22:23:36 +11:00
Kazu Hirata 991b659243 builtins.def: Fix comment formatting.
* builtins.def: Fix comment formatting.
	* c-common.def: Likewise.
	* cfgcleanup.c: Likewise.
	* combine.c: Likewise.
	* gengtype.c: Likewise.
	* params.def: Likewise.
	* predict.def: Likewise.
	* rtl.def: Likewise.
	* stab.def: Likewise.
	* stor-layout.c: Likewise.
	* tree.def: Likewise.
	* config/darwin.c: Likewise.
	* config/darwin.h: Likewise.
	* config/dbxcoff.h: Likewise.
	* config/elfos.h: Likewise.
	* config/fp-bit.c: Likewise.
	* config/freebsd-spec.h: Likewise.
	* config/interix.h: Likewise.
	* config/libgloss.h: Likewise.
	* config/linux-aout.h: Likewise.
	* config/linux.h: Likewise.
	* config/lynx-ng.h: Likewise.
	* config/lynx.h: Likewise.
	* config/netbsd-aout.h: Likewise.
	* config/netbsd.h: Likewise.
	* config/netware.h: Likewise.
	* config/psos.h: Likewise.
	* config/ptx4.h: Likewise.

From-SVN: r57624
2002-09-29 13:16:44 +00:00
Jan Hubicka 969d70ca57 cfglayout.c (function_tail_eff_head): Rename to ...
* cfglayout.c (function_tail_eff_head): Rename to ...
	(function_footer): ... this one.
	(unlink_insn_chain): New functions.
	(label_for_bb): Only call block_label and emit debug message.
	(record_effective_endpoints): Actually unlink the headers and footers.
	(fixup_reorder_cahin): Re-insert the unlinked sequences.
	(cfg_layout_duplicate_bb): Use duplicate_insn_chain.
	* cfglayout.h (struct reorder_block_def): New fields footer/header;
	remove eff_head/eff_end.
	* rtl.h (set_first_insn): Declare.
	* emit-rtl.c (set_first_insn): New function.

	* cfglayout.c (fixup_reorder_chain): Dump duplicated
	(cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
	cfg_layout_duplicate_bb): New global function.
	(duplicate_insn_chain): New static function.
	* cfglayout.h (cfg_layout_can_duplicate_bb_p, cfg_layout_rerirect_edge,
	cfg_layout_duplicate_bb): Declare.
	(struct reorder_block_def): Add "original" field.
	* emit-rtl.c (emit_copy_of_insn_after): New function.
	* rtl.h (emit_copy_of_insn_after): Declare.

	* cfglayout.c (fixup_fallthru_exit_predecessor): Kill.
	(fixup_reorder_chain): properly handle edges to exit block.

Wed May  8 11:10:31 CEST 2002  Zdenek Dvorak  <rakdver@atrey.karlin.mff.cuni.cz>
			       Jan Hubicka  <jh@suse.cz>

	* basic-block.h (note_prediction_to_br_prob): declare.
	* c-semantics.c: Inlucde predit.h
	(expand_stmt): predict GOTO_STMT as not taken.
	* cfgcleanup.c: (delete_unreachable_blocks): Make global.
	(cleanup_cfg): Do not free tail_recursion_list.
	* cfgrtl.c (can_delete_note_p): Delete NOTE_INSN_PREDICTION.
	(flow_delete_block): Kill predictions past end of basic block.
	* output.h (delete_unreachable_blocks): Declare.
	* predict.c (predicted_by_p, process_note_predictions,
	process_note_prediction, last_block_p): New function.
	(estimate_probability): Bypass loop on PRED_CONTINUE;
	do not handle noreturn heuristics; kill PRED_RETURN; add
	PRED_EARLY_RETURN.
	* predict.def (PRED_CONTINUE, PRED_EARLY_RETURN, PRED_GOTO,
	PRED_CONST_RETURN, PRED_NEGATIVE_RETURN, PRED_NULL_RETURN): New.
	* predict.h (IS_TAKEN): New constant.
	* print-rtl.c (print_rtx): Pretty print NOTE_INSN_PREDICTION.
	* rtl.c (NOTE_INSN_PREDICTION): New.
	* rtl.h (NOTE_PREDICTION, NOTE_PREDICTION_ALG, NOTE_PREDICTION_FLAGS):
	New macro.
	(insn_note): add NOTE_INSN_PREDICTION.
	* sibcall.c (optimize_sibling_and_tail_recursive_call): Do not build
	CFG; free tail_recursion_label_list.
	* stmt.c: Include predict.h;
	(return_prediction): New.
	(expand_value_return): Use it.
	* toplev.c: Lower NOTE_INSN_PREDICTION before sibcall.

From-SVN: r53285
2002-05-08 09:17:27 +00:00
Jan Hubicka dcfcd43658 predict.def (PRED_NORETURN, [...]): Make probabilities match reality.
* predict.def (PRED_NORETURN, PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL,
	PRED_ERROR_RETURN): Make probabilities match reality.

From-SVN: r48041
2001-12-15 13:14:06 +00:00
Jan Hubicka 0dd0e980b5 predict.c (estimate_probability): Reorganize opcode heuristics.
* predict.c (estimate_probability): Reorganize opcode heuristics.
	* predict.def (PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL,
	PRED_FPOPCODE): New.

	* i386.c (override_options): Recognize various CPU variants and set
	SSE/MMX/3dNOW flags accordingly.
	* i386.h (MASK_MMX_SET, MASK_SSE_SET, MASK_SSE2_SET, MASK_3DNOW_SET,
	MASK_3DNOW_A_SET): New.
	(MASK_ACCUMULATE_OUTGOING_ARGS_SET): New.
	(MASK_NO_ACCUMULATE_OUTGOING_ARGS): Delete.
	(MASK_*): Renumber.
	(TARGET_FLAGS): Use new masks.
	(CPP_CPU_SPECS): Recognize new CPU variants.
	* invoke.texi (-mcpu): Update documentation.

	* flags.h (flag_prefetch_loop_arrays): Declare.
	* loop.h (LOOP_PREFETCH): Define new constant.
	* loop.c (strength_reduce): Call emit_prefetch_instructions.
	(MAX_PREFETCHES, PREFETCH_BLOCKS_BEFORE_LOOP_MAX,
	PREFETCH_BLOCKS_BEFORE_LOOP_MIN, PREFETCH_BLOCKS_IN_LOOP_MIN): New
	constants.
	(check_store_data): New structure.
	(check_store, emit_prefetch_instructions, rtx_equal_for_prefetch_p):
	New functions.
	* toplev.c: Include insn-flags.h.
	(flag_prefetch_loop_arrays): New global variable.
	(lang_independent_option): Add -fprefetch-loop-arrays.
	(rest_of_compilation) Pass LOOP_PREFETCH when flag_prefetch_loop_arrays
        is set.
	* Makefile.in (toplev.c): Depend on insn-flags.h.
	* invoke.texi (-fprefetch-loop-arrays): Document.

	* predict.c (estimate_probability): Distribute the loop exit
	probability according to number of exit edges.

	* cfgcleanup.c (insns_match_p): Break out from ...;
	(flow_find_cross_jump): ... here;
	(outgoing_edges_match): Add parameter MODE; attempt to match everything
	except for tablejumps.
	(try_crossjump_to_edge): Accept complex edges.
	(try_crossjump_bb): Likewise.

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

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

From-SVN: r45105
2001-08-22 14:35:51 +00:00
Jan Hubicka 6ad48e84df predict.c (struct block_info_def): Remove nvisited.
* predict.c (struct block_info_def): Remove nvisited.
	(propagate_freq): Use EDGE_DFS_BACK to detect irreducible regions.
	(estimate_bb_frequencies): Call mark_dfs_back_edges.

	* i386.c (ix86_agi_depdendant): Lea causes AGI only on the Pentium
	(ix86_adjust_cost): Teach scheduler that latency to load operand can
	be masked.

From-SVN: r44921
2001-08-15 12:28:46 +00:00
Jan Hubicka d195b46f39 predict.c (dump_prediction): New argument "USED".
* predict.c (dump_prediction): New argument "USED".
	(combine_predictions_for_insn): Determine the used heuristics,
	output the case no heuristic applied.
	* predict.def (PRED_DS_THEORY, PRED_NO_HEURISTIC): New.

From-SVN: r44853
2001-08-13 14:32:06 +00:00
Jan Hubicka 0f0138b6b2 * predict.def: Set hitrates according our experimental run.
From-SVN: r44719
2001-08-08 16:46:22 +00:00
Jan Hubicka 8b7e92f9aa predict.def (noreturn, [...]): Mark as first match heuristics.
* predict.def (noreturn, loop branch, loop exit): Mark as first
	match heuristics.

From-SVN: r44473
2001-07-30 15:54:12 +00:00
Jan Hubicka 134d3a2eaa basic-block.h (EDGE_FREQUENCY): New macro.
* basic-block.h (EDGE_FREQUENCY): New macro.
	* bb-reorder (fixup_reorder_chain): Set counts and frequencies
	for new BB/edges.
	* flow.c (find_sub_basic_blocks): Likewise.
	(try_crossjump_to_edge): Likewise; use EDGE_FREQUENCY
	(redirect_edge_and_branch): Use EDGE_FREQUENCY.

	* predict.c (DEF_PREDICTOR): New argument FLAGS.
	(HITRATE): New macro.
	(PRED_FLAG_FIRST_MATCH): New constant.
	(predictor_info): New field flgags.
	(combine_predictions_for_insn): Use DS theory to combine
	probabilities; set the edge probabilities when finished.
	(estimate_probability): Avoid duplicated matches
	of LOOP_BRANCH heuristics for nested loops; update comment.
	* predict.def: Add flags for each prediction, set probabilities
	according to B&L paper.
	* predict.h (DEF_PREDICTOR): New argument FLAGS.

	* profile.c (compute_branch_probabilities):  Cleanup way the edge
	probabilities are computed and REG_BR_PROB notes are dropped; if
	values does not match, emit error.
	(init_branch_prob): Do error instead of warning when profile driven
	feedback is missing or corrupt.

From-SVN: r44439
2001-07-28 21:37:35 +00:00
Jan Hubicka 923cbdc322 unroll.c: Include predict.h.
* unroll.c: Include predict.h.
	(unroll_loop): Drop prediction notes on preconditioning.
	* predict.def (PRED_LOOP_PRECONDITIONG, PRED_LOOP_CONDITION):
	New; add comments on the others.
	* Makefile.in: (unroll.o): Add dependancy on predict.h.
	* loop.c (strength_reduce): Fix branch prediction.

	* stmt.c (emit_case_nodes): Optimize test whether index is in given
	interval.

	* predict.c (estimate_probability): Do not bail out early
	when note is present.
	(combine_predictions_for_insn): Fix note removal code.

From-SVN: r43441
2001-06-18 15:35:47 +00:00
Jan Hubicka aa18f20e74 loop.c: Include predict.h
* loop.c: Include predict.h
	(strength_reduce): Drop branch prediction note in case
	number of iterations is known.
	* predict.def (PRED_LOOP_ITERATIONS): new.
	* Makefile.in (loop.o): Add dependancy on predict.h

From-SVN: r43251
2001-06-12 10:22:22 +00:00
Jan Hubicka 671413c5c9 * predict.def (PRED_OPCODE): Place before call and error_return.
From-SVN: r43131
2001-06-10 08:59:51 +00:00
Jan Hubicka 0b92ff33b8 predict.def (PRED_CALL, [...]): New.
* predict.def (PRED_CALL, PRED_ERROR_RETURN): New.
	* predict.c (estimate_probability): Calculate dominance
	information; improve detection of NORETURN heuristics;
	add call/error_return heuiristics; tweak comparison heuristics
	to recognize -1.

From-SVN: r43130
2001-06-10 08:01:57 +00:00
Jan Hubicka 4db384c950 predict.def: New file.
* predict.def: New file.
	* predict.h: New file.
	* predict.c: Include predict.h.
	(predictor_info): New structure and array.
	(predict_edge, predict_insn): Rewrite; make global.
	(predict_edge_def, predict_insn_def): New global functions.
	(dump_prediction, combine_predictions_for_insns): New
	static functions.
	(estimate_probability): Change calls to predict_edge
	to predict_edge_def and calls to predict_insn to predict_insn_def;
	combine probabilities.
	(expected_value_to_br_prob): Behave as predictor.
	* rtl.h (REG_BR_PRED): Update coment.
	(invert_br_probabilities): New.
	* jump.c: Include predict.h
	(duplicate_loop_exit_test): Drop branch prediction notes.
	(invert_jump): Use invert_br_probabilities.
	* Makefile.in: Add dependancy on predict.h for jump and predict pass.
	* ifcvt.c (dead_or_predicable): Use invert_br_probabilities.
	* combine.c (distribute_notes): Handle BR_PRED.

From-SVN: r43115
2001-06-09 22:39:25 +00:00