aboutsummaryrefslogtreecommitdiff
path: root/gcc/predict.def
AgeCommit message (Collapse)AuthorFilesLines
2017-01-10re PR middle-end/77484 (Static branch predictor causes ~6-8% regression of ↵Jan Hubicka1-1/+1
SPEC2000 GAP) PR middle-end/77484 * predict.def (PRED_CALL): Set to 67. From-SVN: r244260
2017-01-08re PR middle-end/77484 (Static branch predictor causes ~6-8% regression of ↵Jan Hubicka1-1/+1
SPEC2000 GAP) PR middle-end/77484 * predict.def (PRED_INDIR_CALL): Set to 86. From-SVN: r244207
2017-01-06re PR middle-end/77484 (Static branch predictor causes ~6-8% regression of ↵Jan Hubicka1-1/+1
SPEC2000 GAP) PR middle-end/77484 * predict.def (PRED_POLYMORPHIC_CALL): Set to 58 * predict.c (tree_estimate_probability_bb): Reverse direction of polymorphic call predictor. From-SVN: r244167
2017-01-01re PR middle-end/77484 (Static branch predictor causes ~6-8% regression of ↵Jan Hubicka1-1/+7
SPEC2000 GAP) PR middle-end/77484 * predict.def (PRED_CALL): Update hitrate. (PRED_INDIR_CALL, PRED_POLYMORPHIC_CALL): New predictors. * predict.c (tree_estimate_probability_bb): Split CALL predictor into direct/indirect/polymorphic variants. From-SVN: r243995
2017-01-01Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r243994
2016-06-26predict-12.c: New testcase.Jan Hubicka1-3/+14
* gcc.dg/predict-12.c: New testcase. * predict.c: Include gimple-pretty-print.h (predicted_by_loop_heuristics_p): Check also PRED_LOOP_EXIT_WITH_RECURSION (predict_loops): Find self recursive calls and use special purpose predictors for them; dump log about decisions. (pass_profile::execute): Dump info about #of iterations. * predict.def (PRED_LOOP_EXIT_WITH_RECURSION, (PRED_LOOP_GUARD_WITH_RECURSION): New predictors. From-SVN: r237791
2016-06-25predict.c (predict_paths_leading_to, [...]): Add in_loop parameter.Jan Hubicka1-0/+8
* predict.c (predict_paths_leading_to, predict_paths_leading_to_edge): Add in_loop parameter. (predict_loops): Add loop guard heuristics. * predict.def (PRED_LOOP_GUARD): New heuristics. * gcc.dg/predict-11.c: New testcase. * gfortran.dg/predict-2.f90: New testcase. From-SVN: r237781
2016-06-25predict.c: Include ipa-utils.hJan Hubicka1-0/+3
* predict.c: Include ipa-utils.h (tree_bb_level_prediction): Predict recursive calls. (tree_estimate_probability_bb): Skip inexpensive calls for call predictor. * predict.def (PRED_RECURSIVE_CALL): New. * gcc.dg/predict-10.c: New test. From-SVN: r237780
2016-06-17Change PRED_LOOP_EXIT from 92 to 85.Martin Liska1-1/+1
* analyze_brprob.py: Fix columns of script output. * predict.def: PRED_LOOP_EXIT from 92 to 85. * gcc.dg/predict-9.c: Fix dump scanning. From-SVN: r237556
2016-06-16Introduce fortran loop preheaderMartin Liska1-0/+6
* predict.def: Add fortran loop preheader predictor. * gimple-fold.c (gimple_fold_stmt_to_constant_1): Properly fold IFN_BUILTIN_EXPECT with a known constant argument. * trans-stmt.c (gfc_trans_simple_do): Predict the edge. * gfortran.dg/predict-1.f90: New test. From-SVN: r237533
2016-06-16Add 'Fortran' to display text of all PRED_FORTRAN_*Martin Liska1-9/+12
* predict.def: Add 'Fortran' to display text of all PRED_FORTRAN_* predictors. From-SVN: r237532
2016-06-16Fix code emission for FAIL_ALLOC predictorMartin Liska1-6/+9
* predict.def: Define a new predictor. * trans-array.c (gfc_array_allocate): Do not generate expect stmt. * trans.c (gfc_allocate_using_malloc): Properly set FAIL_ALLOC predictor for malloc return value. (gfc_allocate_allocatable): Use REALLOC predictor instead of FAIL_ALLOC. (gfc_deallocate_with_status): Likewise. From-SVN: r237524
2016-06-10predict.c (predict_loops): Remove PRED_LOOP_BRANCH.Jan Hubicka1-6/+0
* predict.c (predict_loops): Remove PRED_LOOP_BRANCH. * predict.def (PRED_LOOP_BRANCH): Remove. From-SVN: r237311
2016-06-07predict.c (predict_iv_comparison): Mention that heuristics is broken.Jan Hubicka1-25/+39
* predict.c (predict_iv_comparison): Mention that heuristics is broken. (return_prediction): PRED_CONST_RETURN predict return as not taken. * predict.def (PRED_CONTINUE): Change hitrate 50->67 (PRED_LOOP_BRANCH): Document predictor as broken. (PRED_LOOP_EXIT): Change hitrate 91->92. (PRED_LOOP_EXTRA_EXIT): Change hitrate 91->83. (PRED_POINTER, PRED_TREE_POINTER): Change hitrate 85->70. (PRED_OPCODE_POSITIVE): Change hitrate 79->64. (PRED_OPCODE_NONEQUAL): Change hitrate 91->66. (PRED_TREE_OPCODE_POSITIVE): Change hitrate 73->64 (PRED_TREE_OPCODE_NONEQUAL): Chnage hitrate 72->66 (PRED_CALL): Chane hitrate 71->67. (PRED_TREE_EARLY_RETURN): Document issues, change hitrate 61->54. (PRED_GOTO): Document as unused right now. (PRED_CONST_RETURN): Change hitrate 67->69 (PRED_NEGATIVE_RETURN): Change hitrate 96->98 (PRED_NULL_RETURN): Change hitrate 91->90. (PRED_LOOP_IV_COMPARE_GUESS): Change hitrate to 98. (PRED_FORTRAN_FAIL_ALLOC): Change hitrate to 62; document issues. (PRED_FORTRAN_SIZE_ZERO): Change hitrate to 99. * gcc.dg/ipa/inlinehint-4.c: Disable partial inlining. * gcc.dg/predict-1.c: Update template for new predictor hitrates. * gcc.dg/predict-3.c: Update template. * gcc.dg/predict-5.c: Update template. * gcc.dg/predict-6.c: Update template. * gcc.dg/predict-9.c: Update template. * gcc.dg/predict-9.c: Update template. * gcc.dg/tree-ssa/attr-hotcold-2.c: Update template. From-SVN: r237185
2016-06-05predict.c (predicted_by_loop_heuristics_p): New function.Jan Hubicka1-0/+4
* predict.c (predicted_by_loop_heuristics_p): New function. (predict_iv_comparison): Use it. (predict_loops): Walk from innermost loops; do not predict edges leaving multiple loops multiple times; implement PRED_LOOP_ITERATIONS_MAX heuristics. * predict.def (PRED_LOOP_ITERATIONS_MAX): New predictor. * gcc.dg/predict-9.c: Update template. From-SVN: r237103
2016-06-02Fix display name of PRED_FORTRAN_FAIL_IOMartin Liska1-1/+1
* predict.def: Fix typo in PRED_FORTRAN_FAIL_IO display name. From-SVN: r237040
2016-05-31predict-lop-exit-1.C: Update template for new predictor name.Jan Hubicka1-0/+5
* g++.d/predict-lop-exit-1.C: Update template for new predictor name. * g++.d/predict-lop-exit-2.C: Update template for new predictor name. * g++.d/predict-lop-exit-2.C: Update template for new predictor name. * predict.def (PRED_LOOP_EXTRA_EXIT): Define. * predict.c (predict_iv_comparison): Also check PRED_LOOP_EXTRA_EXIT. (predict_extra_loop_exits): Use PRED_LOOP_EXTRA_EXIT instead of PRED_LOOP_EXIT. From-SVN: r236968
2016-01-04Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r232055
2015-01-05Update copyright years.Jakub Jelinek1-1/+1
From-SVN: r219188
2014-03-18re PR ipa/58721 (The subroutine perdida is no longer inlined in fatigue.f90)Jakub Jelinek1-0/+43
PR ipa/58721 gcc/ * internal-fn.c: Include diagnostic-core.h. (expand_BUILTIN_EXPECT): New function. * gimplify.c (gimplify_call_expr): Use false instead of FALSE. (gimplify_modify_expr): Gimplify 3 argument __builtin_expect into IFN_BUILTIN_EXPECT call instead of __builtin_expect builtin call. * ipa-inline-analysis.c (find_foldable_builtin_expect): Handle IFN_BUILTIN_EXPECT. * predict.c (expr_expected_value_1): Handle IFN_BUILTIN_EXPECT. Revert 3 argument __builtin_expect code. (strip_predict_hints): Handle IFN_BUILTIN_EXPECT. * gimple-fold.c (gimple_fold_call): Likewise. * tree.h (fold_builtin_expect): New prototype. * builtins.c (build_builtin_expect_predicate): Add predictor argument, if non-NULL, create 3 argument __builtin_expect. (fold_builtin_expect): No longer static. Add ARG2 argument, pass it through to build_builtin_expect_predicate. (fold_builtin_2): Adjust caller. (fold_builtin_3): Handle BUILT_IN_EXPECT. * internal-fn.def (BUILTIN_EXPECT): New. gcc/fortran/ * trans.c (gfc_unlikely, gfc_likely): Don't add __builtin_expect if !optimize. 2014-03-18 Tobias Burnus <burnus@net-b.de> PR ipa/58721 gcc/ * predict.def (PRED_FORTRAN_OVERFLOW, PRED_FORTRAN_FAIL_ALLOC, PRED_FORTRAN_FAIL_IO, PRED_FORTRAN_WARN_ONCE, PRED_FORTRAN_SIZE_ZERO, PRED_FORTRAN_INVALID_BOUND, PRED_FORTRAN_ABSENT_DUMMY): Add. gcc/fortran/ * trans.h (gfc_unlikely, gfc_likely): Add predictor as argument. (gfc_trans_io_runtime_check): Remove. * trans-io.c (gfc_trans_io_runtime_check): Make static; add has_iostat as argument, add predictor to block. (set_parameter_value, gfc_trans_open, gfc_trans_close, build_filepos, gfc_trans_inquire, gfc_trans_wait, build_dt): Update calls. * trans.c (gfc_unlikely, gfc_likely): Add predictor as argument. (gfc_trans_runtime_check, gfc_allocate_using_malloc, gfc_allocate_allocatable, gfc_deallocate_with_status): Set explicitly branch predictor. * trans-expr.c (gfc_conv_procedure_call): Ditto. * trans-stmt.c (gfc_trans_allocate): Ditto. * trans-array.c (gfc_array_init_size, gfc_array_allocate): Ditto. 2014-03-18 Jan Hubicka <hubicka@ucw.cz> PR ipa/58721 gcc/ * predict.c (combine_predictions_for_bb): Fix up formatting. (expr_expected_value_1, expr_expected_value): Add predictor argument, fill what it points to if non-NULL. (tree_predict_by_opcode): Adjust caller, use the predictor. * predict.def (PRED_COMPARE_AND_SWAP): Add. From-SVN: r208641
2014-01-02Update copyright years in gcc/Richard Sandiford1-1/+1
From-SVN: r206289
2013-10-26predict.c (PRED_MUDFLAP): Remove.Jeff Law1-3/+0
* predict.c (PRED_MUDFLAP): Remove. * targhooks.c (build_va_arg_indirect_ref): Remove mudflap support. From-SVN: r204091
2013-10-03predict.c (tree_predict_by_opcode): Get the probability for builtin_expect ↵Rong Xu1-1/+4
from param builtin_expect_probability. * predict.c (tree_predict_by_opcode): Get the probability for builtin_expect from param builtin_expect_probability. * params.def (BUILTIN_EXPECT_PROBABILITY): New parameter. * predict.def (PRED_BUILTIN_EXPECT_RELAXED): Fix comments. * doc/invoke.texi: Add documentation for builtin-expect-probability. * gcc.target/i386/cold-attribute-2.c: Fix the test by using original probability. * gcc.dg/tree-ssa/ipa-split-5.c: Ditto. * gcc.dg/tree-ssa/ipa-split-6.c: Ditto. --This li (t)ene, and those below, will be ignored-- M gcc/params.def M gcc/predict.def M gcc/ChangeLog M gcc/testsuite/gcc.dg/tree-ssa/ipa-split-5.c M gcc/testsuite/gcc.dg/tree-ssa/ipa-split-6.c M gcc/testsuite/gcc.target/i386/cold-attribute-2.c M gcc/predict.c M gcc/doc/invoke.texi From-SVN: r203167
2013-01-10Update copyright years in gcc/Richard Sandiford1-2/+1
From-SVN: r195098
2013-01-04Update Copyright years for files modified in 2011 and/or 2012.Jakub Jelinek1-1/+2
From-SVN: r194903
2012-07-26Hot/cold attributes for labels.Richard Henderson1-0/+7
gcc/ * doc/extend.texi (attribute): Document hot/cold for labels. * predict.c (tree_estimate_probability_bb): Handle hot/cold attributes on user labels. * predict.def (PRED_HOT_LABEL, PRED_COLD_LABEL): New. gcc/c-family/ * c-common.c (handle_hot_attribute): Allow labels. (handle_cold_attribute): Likewise. gcc/testsuite/ * gcc.dg/attr-hotcold-1.c: New. * gcc.dg/tree-ssa/attr-hotcold-2.c: New. From-SVN: r189898
2012-05-08predict.c (find_qualified_ssa_name): NewDehao Chen1-0/+10
2012-05-08 Dehao Chen <dehao@google.com> gcc/ * predict.c (find_qualified_ssa_name): New (find_ssa_name_in_expr): New (find_ssa_name_in_assign_stmt): New (is_comparison_with_loop_invariant_p): New (is_bound_expr_similar): New (predict_iv_comparison): New (predict_loops): Add heuristic for loop-nested branches that compare an induction variable to a loop bound variable. * predict.def (PRED_LOOP_IV_COMPARE): New macro testsuite/ * gcc.dg/predict-1.c: Check if LOOP_IV_COMPARE static predict heuristic is working properly. * gcc.dg/predict-2.c: Likewise. * gcc/dg/predict-3.c: Likewise. * gcc/dg/predict-4.c: Likewise. * gcc/dg/predict-5.c: Likewise. * gcc/dg/predict-6.c: Likewise. From-SVN: r187277
2009-11-25Remove trailing white spaces.H.J. Lu1-1/+1
2009-11-25 H.J. Lu <hongjiu.lu@intel.com> * alias.c: Remove trailing white spaces. * alloc-pool.c: Likewise. * alloc-pool.h: Likewise. * attribs.c: Likewise. * auto-inc-dec.c: Likewise. * basic-block.h: Likewise. * bb-reorder.c: Likewise. * bt-load.c: Likewise. * builtins.c: Likewise. * builtins.def: Likewise. * c-common.c: Likewise. * c-common.h: Likewise. * c-cppbuiltin.c: Likewise. * c-decl.c: Likewise. * c-format.c: Likewise. * c-lex.c: Likewise. * c-omp.c: Likewise. * c-opts.c: Likewise. * c-parser.c: Likewise. * c-pretty-print.c: Likewise. * c-tree.h: Likewise. * c-typeck.c: Likewise. * caller-save.c: Likewise. * calls.c: Likewise. * cfg.c: Likewise. * cfganal.c: Likewise. * cfgexpand.c: Likewise. * cfghooks.c: Likewise. * cfghooks.h: Likewise. * cfglayout.c: Likewise. * cfgloop.c: Likewise. * cfgloop.h: Likewise. * cfgloopmanip.c: Likewise. * cfgrtl.c: Likewise. * cgraph.c: Likewise. * cgraph.h: Likewise. * cgraphbuild.c: Likewise. * cgraphunit.c: Likewise. * cif-code.def: Likewise. * collect2.c: Likewise. * combine.c: Likewise. * convert.c: Likewise. * coverage.c: Likewise. * crtstuff.c: Likewise. * cse.c: Likewise. * cselib.c: Likewise. * dbgcnt.c: Likewise. * dbgcnt.def: Likewise. * dbgcnt.h: Likewise. * dbxout.c: Likewise. * dce.c: Likewise. * ddg.c: Likewise. * ddg.h: Likewise. * defaults.h: Likewise. * df-byte-scan.c: Likewise. * df-core.c: Likewise. * df-problems.c: Likewise. * df-scan.c: Likewise. * df.h: Likewise. * dfp.c: Likewise. * diagnostic.c: Likewise. * diagnostic.h: Likewise. * dominance.c: Likewise. * domwalk.c: Likewise. * double-int.c: Likewise. * double-int.h: Likewise. * dse.c: Likewise. * dwarf2asm.c: Likewise. * dwarf2asm.h: Likewise. * dwarf2out.c: Likewise. * ebitmap.c: Likewise. * ebitmap.h: Likewise. * emit-rtl.c: Likewise. * et-forest.c: Likewise. * except.c: Likewise. * except.h: Likewise. * expmed.c: Likewise. * expr.c: Likewise. * expr.h: Likewise. * final.c: Likewise. * flags.h: Likewise. * fold-const.c: Likewise. * function.c: Likewise. * function.h: Likewise. * fwprop.c: Likewise. * gcc.c: Likewise. * gcov-dump.c: Likewise. * gcov-io.c: Likewise. * gcov-io.h: Likewise. * gcov.c: Likewise. * gcse.c: Likewise. * genattr.c: Likewise. * genattrtab.c: Likewise. * genautomata.c: Likewise. * genchecksum.c: Likewise. * genconfig.c: Likewise. * genflags.c: Likewise. * gengtype-parse.c: Likewise. * gengtype.c: Likewise. * gengtype.h: Likewise. * genmddeps.c: Likewise. * genmodes.c: Likewise. * genopinit.c: Likewise. * genpreds.c: Likewise. * gensupport.c: Likewise. * ggc-common.c: Likewise. * ggc-page.c: Likewise. * ggc-zone.c: Likewise. * ggc.h: Likewise. * gimple-iterator.c: Likewise. * gimple-low.c: Likewise. * gimple-pretty-print.c: Likewise. * gimple.c: Likewise. * gimple.def: Likewise. * gimple.h: Likewise. * gimplify.c: Likewise. * graphds.c: Likewise. * graphite-clast-to-gimple.c: Likewise. * gthr-nks.h: Likewise. * gthr-posix.c: Likewise. * gthr-posix.h: Likewise. * gthr-posix95.h: Likewise. * gthr-single.h: Likewise. * gthr-tpf.h: Likewise. * gthr-vxworks.h: Likewise. * gthr.h: Likewise. * haifa-sched.c: Likewise. * hard-reg-set.h: Likewise. * hooks.c: Likewise. * hooks.h: Likewise. * hosthooks.h: Likewise. * hwint.h: Likewise. * ifcvt.c: Likewise. * incpath.c: Likewise. * init-regs.c: Likewise. * integrate.c: Likewise. * ipa-cp.c: Likewise. * ipa-inline.c: Likewise. * ipa-prop.c: Likewise. * ipa-pure-const.c: Likewise. * ipa-reference.c: Likewise. * ipa-struct-reorg.c: Likewise. * ipa-struct-reorg.h: Likewise. * ipa-type-escape.c: Likewise. * ipa-type-escape.h: Likewise. * ipa-utils.c: Likewise. * ipa-utils.h: Likewise. * ipa.c: Likewise. * ira-build.c: Likewise. * ira-color.c: Likewise. * ira-conflicts.c: Likewise. * ira-costs.c: Likewise. * ira-emit.c: Likewise. * ira-int.h: Likewise. * ira-lives.c: Likewise. * ira.c: Likewise. * jump.c: Likewise. * lambda-code.c: Likewise. * lambda-mat.c: Likewise. * lambda-trans.c: Likewise. * lambda.h: Likewise. * langhooks.c: Likewise. * lcm.c: Likewise. * libgcov.c: Likewise. * lists.c: Likewise. * loop-doloop.c: Likewise. * loop-init.c: Likewise. * loop-invariant.c: Likewise. * loop-iv.c: Likewise. * loop-unroll.c: Likewise. * lower-subreg.c: Likewise. * lto-cgraph.c: Likewise. * lto-compress.c: Likewise. * lto-opts.c: Likewise. * lto-section-in.c: Likewise. * lto-section-out.c: Likewise. * lto-streamer-in.c: Likewise. * lto-streamer-out.c: Likewise. * lto-streamer.c: Likewise. * lto-streamer.h: Likewise. * lto-symtab.c: Likewise. * lto-wpa-fixup.c: Likewise. * matrix-reorg.c: Likewise. * mcf.c: Likewise. * mode-switching.c: Likewise. * modulo-sched.c: Likewise. * omega.c: Likewise. * omega.h: Likewise. * omp-low.c: Likewise. * optabs.c: Likewise. * optabs.h: Likewise. * opts-common.c: Likewise. * opts.c: Likewise. * params.def: Likewise. * params.h: Likewise. * passes.c: Likewise. * plugin.c: Likewise. * postreload-gcse.c: Likewise. * postreload.c: Likewise. * predict.c: Likewise. * predict.def: Likewise. * pretty-print.c: Likewise. * pretty-print.h: Likewise. * print-rtl.c: Likewise. * print-tree.c: Likewise. * profile.c: Likewise. * read-rtl.c: Likewise. * real.c: Likewise. * recog.c: Likewise. * reg-stack.c: Likewise. * regcprop.c: Likewise. * reginfo.c: Likewise. * regmove.c: Likewise. * regrename.c: Likewise. * regs.h: Likewise. * regstat.c: Likewise. * reload.c: Likewise. * reload1.c: Likewise. * resource.c: Likewise. * rtl.c: Likewise. * rtl.def: Likewise. * rtl.h: Likewise. * rtlanal.c: Likewise. * sbitmap.c: Likewise. * sched-deps.c: Likewise. * sched-ebb.c: Likewise. * sched-int.h: Likewise. * sched-rgn.c: Likewise. * sched-vis.c: Likewise. * sdbout.c: Likewise. * sel-sched-dump.c: Likewise. * sel-sched-dump.h: Likewise. * sel-sched-ir.c: Likewise. * sel-sched-ir.h: Likewise. * sel-sched.c: Likewise. * sel-sched.h: Likewise. * sese.c: Likewise. * sese.h: Likewise. * simplify-rtx.c: Likewise. * stack-ptr-mod.c: Likewise. * stmt.c: Likewise. * stor-layout.c: Likewise. * store-motion.c: Likewise. * stringpool.c: Likewise. * stub-objc.c: Likewise. * sync-builtins.def: Likewise. * target-def.h: Likewise. * target.h: Likewise. * targhooks.c: Likewise. * targhooks.h: Likewise. * timevar.c: Likewise. * tlink.c: Likewise. * toplev.c: Likewise. * toplev.h: Likewise. * tracer.c: Likewise. * tree-affine.c: Likewise. * tree-affine.h: Likewise. * tree-browser.def: Likewise. * tree-call-cdce.c: Likewise. * tree-cfg.c: Likewise. * tree-cfgcleanup.c: Likewise. * tree-chrec.c: Likewise. * tree-chrec.h: Likewise. * tree-complex.c: Likewise. * tree-data-ref.c: Likewise. * tree-data-ref.h: Likewise. * tree-dfa.c: Likewise. * tree-dump.c: Likewise. * tree-dump.h: Likewise. * tree-eh.c: Likewise. * tree-flow-inline.h: Likewise. * tree-flow.h: Likewise. * tree-if-conv.c: Likewise. * tree-inline.c: Likewise. * tree-into-ssa.c: Likewise. * tree-loop-distribution.c: Likewise. * tree-loop-linear.c: Likewise. * tree-mudflap.c: Likewise. * tree-nested.c: Likewise. * tree-nomudflap.c: Likewise. * tree-nrv.c: Likewise. * tree-object-size.c: Likewise. * tree-optimize.c: Likewise. * tree-outof-ssa.c: Likewise. * tree-parloops.c: Likewise. * tree-pass.h: Likewise. * tree-phinodes.c: Likewise. * tree-predcom.c: Likewise. * tree-pretty-print.c: Likewise. * tree-profile.c: Likewise. * tree-scalar-evolution.c: Likewise. * tree-ssa-address.c: Likewise. * tree-ssa-alias.c: Likewise. * tree-ssa-ccp.c: Likewise. * tree-ssa-coalesce.c: Likewise. * tree-ssa-copy.c: Likewise. * tree-ssa-copyrename.c: Likewise. * tree-ssa-dce.c: Likewise. * tree-ssa-dom.c: Likewise. * tree-ssa-dse.c: Likewise. * tree-ssa-forwprop.c: Likewise. * tree-ssa-ifcombine.c: Likewise. * tree-ssa-live.c: Likewise. * tree-ssa-live.h: Likewise. * tree-ssa-loop-ch.c: Likewise. * tree-ssa-loop-im.c: Likewise. * tree-ssa-loop-ivcanon.c: Likewise. * tree-ssa-loop-ivopts.c: Likewise. * tree-ssa-loop-manip.c: Likewise. * tree-ssa-loop-niter.c: Likewise. * tree-ssa-loop-prefetch.c: Likewise. * tree-ssa-loop-unswitch.c: Likewise. * tree-ssa-loop.c: Likewise. * tree-ssa-math-opts.c: Likewise. * tree-ssa-operands.c: Likewise. * tree-ssa-operands.h: Likewise. * tree-ssa-phiopt.c: Likewise. * tree-ssa-phiprop.c: Likewise. * tree-ssa-pre.c: Likewise. * tree-ssa-propagate.c: Likewise. * tree-ssa-reassoc.c: Likewise. * tree-ssa-sccvn.c: Likewise. * tree-ssa-sink.c: Likewise. * tree-ssa-structalias.c: Likewise. * tree-ssa-ter.c: Likewise. * tree-ssa-threadedge.c: Likewise. * tree-ssa-threadupdate.c: Likewise. * tree-ssa-uncprop.c: Likewise. * tree-ssa.c: Likewise. * tree-ssanames.c: Likewise. * tree-switch-conversion.c: Likewise. * tree-tailcall.c: Likewise. * tree-vect-data-refs.c: Likewise. * tree-vect-generic.c: Likewise. * tree-vect-loop-manip.c: Likewise. * tree-vect-loop.c: Likewise. * tree-vect-patterns.c: Likewise. * tree-vect-slp.c: Likewise. * tree-vect-stmts.c: Likewise. * tree-vectorizer.c: Likewise. * tree-vectorizer.h: Likewise. * tree-vrp.c: Likewise. * tree.c: Likewise. * tree.def: Likewise. * tree.h: Likewise. * treestruct.def: Likewise. * unwind-compat.c: Likewise. * unwind-dw2-fde-glibc.c: Likewise. * unwind-dw2.c: Likewise. * value-prof.c: Likewise. * value-prof.h: Likewise. * var-tracking.c: Likewise. * varasm.c: Likewise. * varpool.c: Likewise. * vec.c: Likewise. * vec.h: Likewise. * vmsdbgout.c: Likewise. * web.c: Likewise. * xcoffout.c: Likewise. From-SVN: r154645
2009-02-20Update Copyright years for files modified in 2008 and/or 2009.Jakub Jelinek1-1/+1
From-SVN: r144324
2008-08-31cold-attribute-1.c: New testcase.Jan Hubicka1-2/+2
* gcc.target/i386/cold-attribute-1.c: New testcase. * gcc.target/i386/cold-attribute-2.c: New testcase. * gcc.target/i386/cold-attribute-3.c: New testcase. * gcc.target/i386/cold-attribute-4.c: New testcase. * predict.c (PROB_VERY_LIKELY): Make small enough so things become cold. * predict.def (PRED_NORETURN_CALL, PRED_COLD_CALL): Use it. From-SVN: r139827
2008-03-18tree-pretty-print.c: Include predict.h.Jan Hubicka1-1/+1
* 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
2008-02-21predict.def (PRED_TREE_OPCODE_POSITIVE, [...]): Update.Jan Hubicka1-5/+5
* predict.def (PRED_TREE_OPCODE_POSITIVE, PRED_TREE_OPCODE_NONEQUAL, PRED_TREE_OPCODE_POSITIVE, PRED_TREE_OPCODE_NONEQUAL, PRED_CALL, PRED_TREE_EARLY_RETURN, PRED_NULL_RETURN): Update. From-SVN: r132523
2007-07-26Change copyright header to refer to version 3 of the GNU General Public ↵Nick Clifton1-5/+4
License and to point readers at the COPYING3 file and the FSF's license web page. From-SVN: r126948
2007-03-06errors.h (warning, [...]): Mark as cold.Jan Hubicka1-0/+4
* errors.h (warning, error, fatal, internal_error): Mark as cold. * predict.c (maybe_hot_bb): Cold functions are never hot; hot functions are hot. (probably_cold_bb_p): Cold functions are cold. (probably_never_executed_bb_p): Cold functions are cold. (tree_bb_level_predictions): Predict calls to cold functions as not taken. (compute_function_frequency): Check hot/cold attributes. * function.h (function_frequency): Update comments. * predict.def (PRED_COLD_FUNCTION): Predict cold function. * c-common.c (handle_hot_attribute, handle_cold_attribute): New. (c_common_att): Add cold and hot. * doc/extend.texi (hot,cold attributes): Document. * ansidecl.h (ATTRIBUTE_COLD, ATTRIBUTE_HOT): New. From-SVN: r122632
2007-02-28predict.def (PRED_TREE_EARLY_RETURN, [...]): Update outcomes.Jan Hubicka1-3/+3
* predict.def (PRED_TREE_EARLY_RETURN, PRED_CONST_RETURN, PRED_NEGATIVE_RETURN): Update outcomes. From-SVN: r122410
2007-02-27predict.def: Set outcomes according to more recent results.Jan Hubicka1-22/+11
* predict.def: Set outcomes according to more recent results. (PRED_LOOP_CONDITION, PRED_LOOP_PRECONDITIONING, PRED_LOOP_HEADER): Remove dead predictors. * predict.c (return_prediction): Fix pasto. From-SVN: r122347
2007-02-25tree-ssa-loop-niter.c (compute_estimated_nb_iterations): Fix off-by-one error.Zdenek Dvorak1-3/+7
* tree-ssa-loop-niter.c (compute_estimated_nb_iterations): Fix off-by-one error. (array_at_struct_end_p): New function. (idx_infer_loop_bounds): Use it. (estimate_numbers_of_iterations_loop): Export. * predict.c (predict_loops): Use estimated_loop_iterations_int. Do not use PRED_LOOP_EXIT on exits predicted by # of iterations. (tree_estimate_probability): Call record_loop_exits. * tree-data-ref.c (get_number_of_iters_for_loop): Replaced by ... (estimated_loop_iterations, estimated_loop_iterations_int, estimated_loop_iterations_tree): New functions. (analyze_siv_subscript_cst_affine, compute_overlap_steps_for_affine_1_2, analyze_subscript_affine_affine): Use estimated_loop_iterations_int. (analyze_miv_subscript): Use estimated_loop_iterations_tree. * predict.def (PRED_LOOP_ITERATIONS): Update comment. (PRED_LOOP_ITERATIONS_GUESSED): New. * cfgloop.c (record_loop_exits): Do nothing if there are no loops. * cfgloop.h (estimate_numbers_of_iterations_loop, estimated_loop_iterations_int): Declare. From-SVN: r122316
2005-11-05re PR rtl-optimization/23490 (Long compile time for array initializer with ↵Jan Hubicka1-12/+0
inlined constructor) PR rtl-optimization/23490 * doc/invoke.texi (max-predicted-iterations, max-cse-insns, max-flow-memory-location): Document. * flow.c: Include params.h (MAX_MEM_SET_LIST_LEN): Kill. (add_to_mem_set_list): Use new param. * cse.c (cse_basic_block): Replace 1000 by new param. * params.def (PARAM_MAX_PREDICTED_ITERATIONS, PARAM_MAX_CSE_INSNS, PARAM_MAX_FLOW_MEMORY_LOCATIONS): New. * predict.c (predict_loops): Use new param. * predict.def (MAX_PRED_LOOP_ITERATIONS): Remove. From-SVN: r106520
2005-10-31re PR gcov-profile/24487 (Basic block frequencies inaccurate)Jan Hubicka1-0/+12
PR profile/24487 * predict.c (predict_loops): Do not estimate more than MAX_PRED_LOOP_ITERATIONS in PRED_LOOP_ITERATIONS heuristic. * predict.def (MAX_PRED_LOOP_ITERATIONS): Define. From-SVN: r106276
2005-08-01dwarf2out.c, [...]: Fix comment typos.Kazu Hirata1-1/+1
* dwarf2out.c, fold-const.c, ipa-type-escape.c, loop-invariant.c, predict.c, predict.def, reload1.c, reorg.c, tree-sra.c, config/arm/arm.c, config/crx/crx.c, config/i386/i386.c, config/mips/mips.h, config/rs6000/rs6000.h, config/sh/sh.c, config/stormy16/stormy16.c: Fix comment typos. From-SVN: r102620
2005-06-25Update FSF address.Kelley Cook1-2/+2
From-SVN: r101317
2004-10-15bitmap.c, [...]: Update copyright.Kazu Hirata1-1/+1
* 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
2004-09-20predict.c (return_prediction): New function.Jan Hubicka1-0/+1
* predict.c (return_prediction): New function. (apply_return_prediction): Likewise. (tree_bb_level_predictions): Likewise. (tree_estimate_probability): Add noreturn exit edges; call bb_level_predictions; fix logic of return heuristics. (predict_paths_leading_to): Rescuesce from old CVS version of process_note_prediction function. * predict.def (PRED_TREE_EARLY_RETURN): New predictor. From-SVN: r87768
2004-06-19CFG transparent RTL expansion:Jan Hubicka1-0/+3
* Makefile.in (cfgexpand.o): New object file. (builtins.o): Add dependency on basic-block.h * builtins.c: Include basic-block.h (entry_of_function): New function. (expand_builtin_apply_args, expand_builtin_saveargs): Use it. * cfgexpand.c: New file. * expr.c (execute_expand, pass_expand): Kill. * pass.c (rest_of_compilation): Do not build CFG unless called from coverage code. * tree-cfg.c (delete_tree_cfg): Rename to.. (delete_tree_cfg_annotations): ... this one; Do not remove the CFG itself. * tree-flow.h (delete_tree_cfg_annotations): Declare. (dleete_tree_cfg): Kill. * tree-optimize.c (execute_rebuild_bind, pass_rebuild_bind): Kill. (execute_del_cfg): Rename to... (execute_free_datastructures): This one... (pass_del_cfg): Rename to... (pass_free_datastructures): ... this one; Do not kill PROP_cfg. (init_tree_optimization_passes): Make cfg build and profiling to happen unconditionally. * tree-mudflap.c (mf_decl_cache_locals): Skip labels before inserting the cache variables. * tree-mudflap.c: Include headers to make basic_block available. Move functions around such that related functions are near each other. Add prototypes for all static functions. Add comments briefly explaining what IR the mudflap1 and mudflap2 work on and what they do. (mudflap_function_decls): Rename to execute_mudflap_function_decls. (mudflap_function_ops): Rename to execute_mudflap_function_ops. (pass_mudflap_1, pass_mudflap_2): Update. (mf_decl_cache_locals): Make it work on the CFG instead of the saved function tree. (mf_build_check_statement_for): Make it work on the CFG. (mf_xform_derefs_1): Likewise. Cleanup code style. (mf_xform_derefs): Likewise. * tree-cfg.c (label_to_block): Invent the label destination for undefined labels. (cleanup_dead_labels): Update table in the case label_to_block added new label. From-SVN: r83385
2004-05-13Merge tree-ssa-20020619-branch into mainline.Diego Novillo1-0/+4
From-SVN: r81764
2003-11-28Correct the description of these files in the comment header.Ben Elliston1-3/+2
From-SVN: r74018
2002-09-29builtins.def: Fix comment formatting.Kazu Hirata1-1/+1
* 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-05-08cfglayout.c (function_tail_eff_head): Rename to ...Jan Hubicka1-1/+16
* 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
2001-12-15predict.def (PRED_NORETURN, [...]): Make probabilities match reality.Jan Hubicka1-5/+5
* predict.def (PRED_NORETURN, PRED_OPCODE_POSITIVE, PRED_OPCODE_NONEQUAL, PRED_ERROR_RETURN): Make probabilities match reality. From-SVN: r48041
2001-12-13predict.c (estimate_probability): Reorganize opcode heuristics.Jan Hubicka1-1/+3
* 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