Age | Commit message (Collapse) | Author | Files | Lines |
|
From-SVN: r232055
|
|
The problem in the PR is that some i386 optabs FAIL when
optimising for size rather than speed. The gimple level generally
needs access to this information before calling the generator,
so this patch adds a new hook to say whether an optab should
be used when optimising for size or speed. It also has a "both"
option for cases where we want code that is optimised for both
size and speed.
I've passed the optab to the target hook because I think in most
cases that's more useful than the instruction code. We could pass
both if there's a use for it though.
At the moment the match-and-simplify code doesn't have direct access
to the target block, so for now I've used "both" there.
Tested on x86_64-linux-gnu and powerpc64-linux-gnu.
gcc/
PR tree-optimization/68432
* coretypes.h (optimization_type): New enum.
* doc/tm.texi.in (TARGET_OPTAB_SUPPORTED_P): New hook.
* doc/tm.texi: Regenerate.
* target.def (optab_supported_p): New hook.
* targhooks.h (default_optab_supported_p): Declare.
* targhooks.c (default_optab_supported_p): New function.
* predict.h (function_optimization_type): Declare.
(bb_optimization_type): Likewise.
* predict.c (function_optimization_type): New function.
(bb_optimization_type): Likewise.
* optabs-query.h (convert_optab_handler): Define an overload
that takes an optimization type.
(direct_optab_handler): Likewise.
* optabs-query.c (convert_optab_handler): Likewise.
(direct_optab_handler): Likewise.
* internal-fn.h (direct_internal_fn_supported_p): Take an
optimization_type argument.
* internal-fn.c (direct_optab_supported_p): Likewise.
(multi_vector_optab_supported_p): Likewise.
(direct_internal_fn_supported_p): Likewise.
* builtins.c (replacement_internal_fn): Update call to
direct_internal_fn_supported_p.
* gimple-match-head.c (build_call_internal): Likewise.
* tree-vect-patterns.c (vect_recog_pow_pattern): Likewise.
* tree-vect-stmts.c (vectorizable_internal_function): Likewise.
* tree.c (maybe_build_call_expr_loc): Likewise.
* config/i386/i386.c (ix86_optab_supported_p): New function.
(TARGET_OPTAB_SUPPORTED_P): Define.
* config/i386/i386.md (asinxf2): Remove optimize_insn_for_size_p check.
(asin<mode>2, acosxf2, acos<mode>2, log1pxf2, log1p<mode>2)
(expNcorexf3, expxf2, exp<mode>2, exp10xf2, exp10<mode>2, exp2xf2)
(exp2<mode>2, expm1xf2, expm1<mode>2, ldexpxf3, ldexp<mode>3)
(scalbxf3, scalb<mode>3, rint<mode>2, round<mode>2)
(<rounding_insn>xf2, <rounding_insn><mode>2): Likewise.
gcc/testsuite/
* gcc.target/i386/pr68432-1.c: New test.
* gcc.target/i386/pr68432-2.c: Likewise.
* gcc.target/i386/pr68432-3.c: Likewise.
From-SVN: r231161
|
|
From-SVN: r219188
|
|
2014-10-22 Andrew MacLeod <amacleod@redhat.com>
* cfgbuild.h: New. Add prototypes for cfgbuild.c.
* cfgcleanup.h: New. Add prototypes for cfgcleanup.c.
* cfgloopmanip.h: New. Add prototypes for cfgloopmanip.c.
* dominance.h: New. Add prototypes for dominance.c.
* cfgloop.h: Move some prototypes/enum to cfgloopmanip.h and include it.
* cfghooks.h: (struct profile_record) Relocate here.
Relocate 2 prototypes from basic-block.h.
* basic-block.h: Move prototypes and struct to new header files.
Include cfgbuild.h, cfgcleanup.h, and dominance.h.
* rtl.h: Move a few prototypes to new header files.
* cfgcleanup.c (merge_memattrs): Make static.
* genopinit.c (main): Add predict.h to list of includes.
* predict.h: Update prototype list to match predict.c.
* predict.c (maybe_hot_count_p): Export.
(cgraph_edge::maybe_hot_p): Move to cgraph.c.
(cgraph_node::optimize_for_size_p): Move to cgraph.h.
* cgraph.h (cgraph_node::optimize_for_size_p): Relocate here.
* cgraph.c (cgraph_edge::maybe_hot_p): Relocate here.
* profile.h: Adjust prototypes.
* ifcvt.h: New. Relocate struct ce_if_block here.
* ifcvt.c: Include ifcvt.h.
* config/frv/frv.c: Include ifcvt.h.
* config/frv/frv-protos.h: Add 'struct' to ce_if_block * parameters.
From-SVN: r216559
|
|
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* function.h: Flatten file. Remove includes, adjust prototypes to
reflect only what is in function.h.
(enum direction, struct args_size, struct locate_and_pad_arg_data,
ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Relocate
from expr.h.
(ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD): Relocate from rtl.h.
(optimize_function_for_size_p, optimize_function_for_speed_p): Move
prototypes to predict.h.
(init_varasm_status): Move prototype to varasm.h.
* expr.h: Adjust include files.
(enum direction, struct args_size, struct locate_and_pad_arg_data,
ADD_PARM_SIZE, SUB_PARM_SIZE, ARGS_SIZE_TREE, ARGS_SIZE_RTX): Move
to function.h.
(locate_and_pad_parm): Move prototype to function.h.
* rtl.h: (assign_stack_local, ASLK_REDUCE_ALIGN, ASLK_RECORD_PAD,
assign_stack_local_1, assign_stack_temp, assign_stack_temp_for_type,
assign_temp, reposition_prologue_and_epilogue_notes,
prologue_epilogue_contains, sibcall_epilogue_contains,
update_temp_slot_address, maybe_copy_prologue_epilogue_insn,
set_return_jump_label): Move prototypes to function.h.
* predict.h (optimize_function_for_size_p,
optimize_function_for_speed_p): Relocate prototypes from function.h.
* shrink-wrap.h (emit_return_into_block, active_insn_between,
convert_jumps_to_returns, emit_return_for_exit): Move prototypes to
function.h.
* varasm.h (init_varasm_status): Relocate prototype from function.h.
* genattrtab.c (write_header): Add predict.h to include list.
* genconditions.c (write_header): Add predict.h to include list.
* genemit.c (main): Adjust header file includes.
* gengtype.c (ifiles): Add flattened function.h header files.
* genoutput.c (output_prologue): Add predict.h to include list.
* genpreds.c (write_insn_preds_c): Adjust header file includes.
* genrecog.c (write_header): Add flattened function.h header files.
* alias.c: Adjust include files.
* auto-inc-dec.c: Likewise.
* basic-block.h: Likewise.
* bb-reorder.c: Likewise.
* bt-load.c: Likewise.
* builtins.c: Likewise.
* caller-save.c: Likewise.
* calls.c: Likewise.
* cfgbuild.c: Likewise.
* cfgcleanup.c: Likewise.
* cfgexpand.c: Likewise.
* cfgloop.c: Likewise.
* cfgloop.h: Likewise.
* cfgrtl.c: Likewise.
* cgraph.h: Likewise.
* cgraphclones.c: Likewise.
* cgraphunit.c: Likewise.
* combine-stack-adj.c: Likewise.
* combine.c: Likewise.
* coverage.c: Likewise.
* cprop.c: Likewise.
* cse.c: Likewise.
* cselib.c: Likewise.
* dbxout.c: Likewise.
* ddg.c: Likewise.
* df-core.c: Likewise.
* df-problems.c: Likewise.
* df-scan.c: Likewise.
* dojump.c: Likewise.
* dwarf2cfi.c: Likewise.
* dwarf2out.c: Likewise.
* emit-rtl.c: Likewise.
* except.c: Likewise.
* explow.c: Likewise.
* expr.c: Likewise.
* final.c: Likewise.
* function.c: Likewise.
* gcse.c: Likewise.
* gimple-fold.c: Likewise.
* gimple-low.c: Likewise.
* gimple-streamer.h: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* ira.c: Likewise.
* jump.c: Likewise.
* lcm.c: Likewise.
* loop-invariant.c: Likewise.
* lra-assigns.c: Likewise.
* lra-coalesce.c: Likewise.
* lra-constraints.c: Likewise.
* lra-eliminations.c: Likewise.
* lra-lives.c: Likewise.
* lra-spills.c: Likewise.
* lra.c: Likewise.
* lto-cgraph.c: Likewise.
* lto-section-in.c: Likewise.
* lto-section-out.c: Likewise.
* lto-streamer-in.c: Likewise.
* lto-streamer-out.c: Likewise.
* mode-switching.c: Likewise.
* modulo-sched.c: Likewise.
* omp-low.c: Likewise.
* optabs.c: Likewise.
* passes.c: Likewise.
* postreload-gcse.c: Likewise.
* postreload.c: Likewise.
* predict.c: Likewise.
* profile.c: Likewise.
* recog.c: Likewise.
* ree.c: Likewise.
* reg-stack.c: Likewise.
* regcprop.c: Likewise.
* reginfo.c: Likewise.
* regrename.c: Likewise.
* reload.c: Likewise.
* reload1.c: Likewise.
* reorg.c: Likewise.
* resource.c: Likewise.
* rtlanal.c: Likewise.
* sched-deps.c: Likewise.
* sched-ebb.c: Likewise.
* sched-rgn.c: Likewise.
* sel-sched-dump.c: Likewise.
* sel-sched-ir.c: Likewise.
* sel-sched.c: Likewise.
* shrink-wrap.c: Likewise.
* simplify-rtx.c: Likewise.
* statistics.c: Likewise.
* stmt.c: Likewise.
* stor-layout.c: Likewise.
* store-motion.c: Likewise.
* symtab.c: Likewise.
* targhooks.c: Likewise.
* toplev.c: Likewise.
* trans-mem.c: Likewise.
* tree-cfg.c: Likewise.
* tree-cfgcleanup.c: Likewise.
* tree-dfa.c: Likewise.
* tree-eh.c: Likewise.
* tree-inline.c: Likewise.
* tree-into-ssa.c: Likewise.
* tree-nested.c: Likewise.
* tree-nrv.c: Likewise.
* tree-profile.c: Likewise.
* tree-ssa-alias.c: Likewise.
* tree-ssa-ccp.c: Likewise.
* tree-ssa-copy.c: Likewise.
* tree-ssa-copyrename.c: Likewise.
* tree-ssa-dom.c: Likewise.
* tree-ssa-operands.c: Likewise.
* tree-ssa-propagate.c: Likewise.
* tree-ssa-structalias.c: Likewise.
* tree-ssa-tail-merge.c: Likewise.
* tree-ssa-threadedge.c: Likewise.
* tree-ssa-threadupdate.c: Likewise.
* tree-ssa-uncprop.c: Likewise.
* tree-ssa-uninit.c: Likewise.
* tree-ssa.c: Likewise.
* tree-stdarg.c: Likewise.
* tree-tailcall.c: Likewise.
* tree.c: Likewise.
* tsan.c: Likewise.
* valtrack.c: Likewise.
* varasm.c: Likewise.
* vmsdbgout.c: Likewise.
* web.c: Likewise.
* testsuite/g++.dg/plugin/pragma_plugin.c: Adjust include files.
* config/aarch64/aarch64.c: Add flattened includes from function.h.
* config/alpha/alpha.c: Likewise.
* config/arc/arc.c: Likewise.
* config/arm/arm.c: Likewise.
* config/avr/avr-log.c: Likewise.
* config/avr/avr.c: Likewise.
* config/bfin/bfin.c: Likewise.
* config/c6x/c6x.c: Likewise.
* config/cr16/cr16.c: Likewise.
* config/cris/cris.c: Likewise.
* config/darwin.c: Likewise.
* config/epiphany/epiphany.c: Likewise.
* config/epiphany/mode-switch-use.c: Likewise.
* config/epiphany/resolve-sw-modes.c: Likewise.
* config/fr30/fr30.c: Likewise.
* config/frv/frv.c: Likewise.
* config/h8300/h8300.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/iq2000/iq2000.c: Likewise.
* config/lm32/lm32.c: Likewise.
* config/m32c/m32c.c: Likewise.
* config/m32r/m32r.c: Likewise.
* config/m68k/m68k.c: Likewise.
* config/mcore/mcore.c: Likewise.
* config/mep/mep-pragma.c: Likewise.
* config/mep/mep.c: Likewise.
* config/microblaze/microblaze.c: Likewise.
* config/mips/mips.c: Likewise.
* config/mmix/mmix.c: Likewise.
* config/mn10300/mn10300.c: Likewise.
* config/moxie/moxie.c: Likewise.
* config/msp430/msp430.c: Likewise.
* config/nds32/nds32-cost.c: Likewise.
* config/nds32/nds32-fp-as-gp.c: Likewise.
* config/nds32/nds32-intrinsic.c: Likewise.
* config/nds32/nds32-isr.c: Likewise.
* config/nds32/nds32-md-auxiliary.c: Likewise.
* config/nds32/nds32-memory-manipulation.c: Likewise.
* config/nds32/nds32-pipelines-auxiliary.c: Likewise.
* config/nds32/nds32-predicates.c: Likewise.
* config/nds32/nds32.c: Likewise.
* config/nios2/nios2.c: Likewise.
* config/pa/pa.c: Likewise.
* config/pdp11/pdp11.c: Likewise.
* config/rl78/rl78.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/rx/rx.c: Likewise.
* config/s390/s390.c: Likewise.
* config/score/score.c: Likewise.
* config/sh/sh.c: Likewise.
* config/sparc/sparc.c: Likewise.
* config/spu/spu.c: Likewise.
* config/stormy16/stormy16.c: Likewise.
* config/tilegx/tilegx.c: Likewise.
* config/tilepro/tilepro.c: Likewise.
* config/v850/v850.c: Likewise.
* config/vax/vax.c: Likewise.
* config/xtensa/xtensa.c: Likewise.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* ada/gcc-interface/misc.c: Adjust include files.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* c/c-decl.c: Adjust include files.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* c-family/c-pragma.c: Adjust include files.
* c-family/c-semantics.c: Likewise.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* cp/cp-tree.h: Adjust include files.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* fortran/f95-lang.c: Adjust include files.
* fortran/trans-decl.c: Likewise.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* java/class.c: Adjust include files.
* java/resource.c: Likewise.
2014-10-16 Andrew MacLeod <amacleod@redhat.com>
* objc/objc-act.c: Adjust include files.
From-SVN: r216337
|
|
gcc/
* predict.h (predict_insn_def): Strengthen param "insn" from rtx
to rtx_insn *.
* function.c (stack_protect_epilogue): Add checked cast to
rtx_insn for now when invoking predict_insn_def.
* predict.c (predict_insn): Strengthen param "insn" from rtx to
rtx_insn *.
(predict_insn_def): Likewise.
(rtl_predict_edge): Likewise for local "last_insn".
(can_predict_insn_p): Strengthen param "insn" from const_rtx to
const rtx_insn *.
(combine_predictions_for_insn): Strengthen param "insn" from rtx
to rtx_insn *.
(bb_estimate_probability_locally): Likewise for local "last_insn".
(expensive_function_p): Likewise for local "insn".
* config/cris/cris.c (cris_emit_trap_for_misalignment): Likewise for
local "jmp", since this is used when invoking predict_insn_def.
From-SVN: r214361
|
|
From-SVN: r206289
|
|
* predict.h (PROB_LIKELY): Fix the value.
* internal-fn.c (ubsan_expand_si_overflow_mul_check): Add support
for overflow checking for modes without 2xwider supported mode,
if the mode has 2xnarrower mode.
* c-c++-common/ubsan/overflow-mul-3.c: New test.
* c-c++-common/ubsan/overflow-mul-4.c: New test.
From-SVN: r206026
|
|
From-SVN: r205684
|
|
2013-11-12 Teresa Johnson <tejohnson@google.com>
Jan Hubicka <jh@suse.cz>
* predict.c (drop_profile): New function.
(handle_missing_profiles): Ditto.
(counts_to_freqs): Don't overwrite estimated frequencies
when function has no profile counts.
* predict.h (handle_missing_profiles): Declare.
* tree-inline.c (freqs_to_counts): New function.
(copy_cfg_body): Invoke freqs_to_counts as needed.
* tree-profile.c (tree_profiling): Invoke handle_missing_profiles.
Co-Authored-By: Jan Hubicka <jh@suse.cz>
From-SVN: r204704
|
|
estimate_bb_frequencies.
2013-10-10 Teresa Johnson <tejohnson@google.com>
* predict.c (tree_estimate_probability): Add new parameter
for estimate_bb_frequencies.
(estimate_bb_frequencies): Add new parameter to force estimation.
(rebuild_frequencies): When max frequency in function is small,
recompute counts from frequencies.
* predict.h (estimate_bb_frequencies): New parameter.
From-SVN: r203395
|
|
From-SVN: r195098
|
|
From-SVN: r168438
|
|
* predict.c (propagate_freq): Clear EXIT_BLOCK_PTR frequency if it is
unreachable.
(rebuild_frequencies): New function.
* predict.h (rebuild_frequencies): Declare.
* tree-inline.c (copy_cfg_body): Compute properly count & frequency of
entry block and edge reaching new_entry.
(tree_function_versioning): When doing partial cloning, rebuild frequencies
when done.
* passes.c (execute_function_todo): Use rebild_frequencies.
From-SVN: r161536
|
|
* predict.c (compute_function_frequency): Export.
* predict.h (compute_function_frequency): Declare.
* tree-optimize.c (execute_fixup_cfg): Rescale frequencies.
From-SVN: r154291
|
|
2009-08-05 Sebastian Pop <sebastian.pop@amd.com>
* Makefile.in (graphite.o): Depends on PREDICT_H.
* graphite.c: Include predict.h.
(graphite_finalize): Call tree_estimate_probability.
* predict.c (predict_loops): Do not call scev_initialize and
scev_finalize.
(tree_estimate_probability_bb): New.
(tree_estimate_probability): Do not initialize loops: move that
code to the driver. Call tree_estimate_probability_bb.
(tree_estimate_probability_driver): New.
(pass_profile): Use tree_estimate_probability_driver.
* predict.h (tree_estimate_probability): Declared.
From-SVN: r150684
|
|
From-SVN: r144324
|
|
* tree-pretty-print.c: Include predict.h.
(dump_generic_node): Dump predictor.
* tree.h (PREDICT_EXPR_OUTCOME, PREDICT_EXPR_PREDICTION): Update.
* tree-gimple.c (is_gimple_stmt): Add PREDICT_EXPR.
* gimple-low.c (lower_stmt): Likewise.
* expr.c (expand_expr_real): Likewise.
* predict.c (tree_bb_level_predictions): Use PREDICT_EXPRs and remove
them.
(build_predict_expr, build_predict_expr): New.
* predict.h (predictor_name, build_predict_expr): Update.
* c-typeck.c (c_finish_bc_stmt): Add prediction.
* gimplify.c (gimplify_expr): Add PREDICT_EXPR.
* predict.def (PRED_CONTINUE): Update hitrate.
* tree.def (PREDICT_EXPR): Define.
* tree-ssa-dce.c (mark_stmt_if_obviously_necessary): Mark PREDICT_EXPR;
do not handle BIND_EXPR.
* tree-inline.c (estimate_num_insns_1): PREDICT_EXPR is free.
* tree-cfg.c (verify_gimple_stmt): PREDICT_EXPR is valid.
* tree-ssa-operands.c (get_expr_operands): PREDICT_EXPR takes no
operands.
From-SVN: r133313
|
|
License and to point readers at the COPYING3 file and the FSF's license web page.
From-SVN: r126948
|
|
* Makefile.in (passes.o, ipa-inline.o): Add dependencies.
* cgraphbuild.c (build_cgraph_edges): Compute frequencies.
(rebuild_cgraph_edges): Likewise.
* cgraph.c (cgraph_set_call_stmt): Add new argument frequency.
(dump_cgraph_node): Dump frequencies.
(cgraph_clone_edge): Add frequency scales.
(cgraph_clone_node): Add freuqnecy.
* cgraph.h (cgraph_edge): Add freuqnecy argument.
(CGRAPH_FREQ_BASE, CGRAPH_FREQ_MAX): New constants.
(cgraph_create_edge, cgraph_clone_edge, cgraph_clone_node): Update.
* tree-pass.h (TODO_rebuild_frequencies): New constant.
* cgraphunit.c (verify_cgraph_node): Verify frequencies.
(cgraph_copy_node_for_versioning): Update call of cgraph_clone_edge.
(save_inline_function_body): Likewise.
* ipa-inline.c: inluce rtl.h
(cgraph_clone_inlined_nods): Update call of cgraph_clone_node.
(cgraph_edge_badness): Use frequencies.
(cgraph_decide_recursive_inlining): Update clonning.
(cgraph_decide_inlining_of_small_function): Dump frequency.
* predict.c (estimate_bb_frequencies): Export.
* predict.h (estimate_bb_frequencies): Declare.
* tree-inline.c (copy_bb): Watch overflows.
(expand_call_inline): Update call of cgraph_create_edge.
(optimize_inline_calls): Use TODO flags to update frequnecies.
* passes.h: Include predict.h
(init_optimization_passes): Move profile ahead.
(execute_function_todo): Handle TODO_rebuild_frequencies.
From-SVN: r121780
|
|
From-SVN: r101317
|
|
* predict.h (IS_TAKEN): Remove.
* rtl.h (NOTE_PREDICTION): Likewise.
From-SVN: r98258
|
|
* predict.h (predict_insn): Remove extern declaration.
* predict.c (predict_insn): Make static.
From-SVN: r90884
|
|
* bitmap.c, bitmap.h, builtin-attrs.def, cfglayout.h,
collect2.h, conflict.c, coretypes.h, coverage.h, errors.h,
gcc.h, gcov-dump.c, gen-protos.c, gencheck.c, gencodes.c,
genconstants.c, gengenrtl.c, genmodes.c, genpeep.c,
gensupport.h, graph.h, gthr-gnat.c, gthr-gnat.h, gthr-posix.c,
gthr-posix.h, hard-reg-set.h, hwint.h, integrate.h, libgcc2.c,
lists.c, machmode.def, mips-tdump.c, opts.h, params.c,
predict.def, predict.h, protoize.c, reload.h, resource.h,
rtl-error.c, sbitmap.c, sbitmap.h, sreal.c, tlink.c,
tree-dump.h, tree-inline.h, unwind-dw2-fde.c, unwind-dw2.c,
unwind-sjlj.c, value-prof.h: Update copyright.
From-SVN: r89097
|
|
* predict.c (counts_to_freqs): Make glolbal.
* predict.h (counts_to_freqa): Declare.
* profile.c (compute_branch_probabilities): Compute frequencies
* tree-profile.c (do_tree_profiling): Refine conditional on when
tree profiling pass is needed.
From-SVN: r88093
|
|
From-SVN: r81764
|
|
* alias.c: Fix comment formatting.
* alloc-pool.c: Likewise.
* bitmap.c: Likewise.
* bitmap.h: Likewise.
* bt-load.c: Likewise.
* c-common.c: Likewise.
* c-common.h: Likewise.
* c-decl.c: Likewise.
* c-opts.c: Likewise.
* c-pretty-print.c: Likewise.
* caller-save.c: Likewise.
* cfghooks.h: Likewise.
* cgraph.c: Likewise.
* collect2.c: Likewise.
* cppfiles.c: Likewise.
* cpplib.h: Likewise.
* dwarf2out.c: Likewise.
* dwarfout.c: Likewise.
* emit-rtl.c: Likewise.
* final.c: Likewise.
* function.c: Likewise.
* gcov.c: Likewise.
* gcse.c: Likewise.
* genemit.c: Likewise.
* ggc.h: Likewise.
* haifa-sched.c: Likewise.
* ifcvt.c: Likewise.
* libgcc2.h: Likewise.
* loop.c: Likewise.
* predict.h: Likewise.
* unwind-libunwind.c: Likewise.
* varasm.c: Likewise.
From-SVN: r74907
|
|
From-SVN: r74018
|
|
* predict.h: Convert to ISO C90 prototypes.
* predict.c: Likewise.
* tree-dump.h: Likewise.
* tree-dump.c: Likewise.
* diagnostic.h: Likewise.
* diagnostic.c: Likewise.
* combine.c: Likewise.
* rtl.h: Convert prototypes of combine.c to ISO C90.
From-SVN: r67626
|
|
* 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
|
|
* 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
|
|
* c-common.h: Fix comment formatting.
* c-dump.c: Likewise.
* cfg.c: Likewise.
* diagnostic.h: Likewise.
* except.c: Likewise.
* gcc.h: Likewise.
* gcov-io.h: Likewise.
* genattrtab.c: Likewise.
* output.h: Likewise.
* predict.h: Likewise.
* reload1.c: Likewise.
* reload.h: Likewise.
* resource.h: Likewise.
* scan.h: Likewise.
* system.h: Likewise.
* tree.h: Likewise.
* tree-inline.c: Likewise.
* tsystem.h: Likewise.
* varasm.c: Likewise.
* xcoffout.h: Likewise.
From-SVN: r46122
|
|
* 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
|
|
* 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
|
|
* 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
|