public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "hubicka at gcc dot gnu.org" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug ipa/65478] [5 regression] crafty performance regression Date: Fri, 20 Mar 2015 02:51:00 -0000 [thread overview] Message-ID: <bug-65478-4-73Lm24M4XO@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-65478-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65478 Jan Hubicka <hubicka at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|tree-optimization |ipa Summary|crafty performance |[5 regression] crafty |regression |performance regression --- Comment #2 from Jan Hubicka <hubicka at gcc dot gnu.org> --- Martin: Looking into it, the parameter 4(ply)=2 and donull=true seems to be used in calls starting the recursion: /* ---------------------------------------------------------- | | | now call Search to produce a value for this move. | | | ---------------------------------------------------------- */ begin_root_nodes=nodes_searched; if (first_move) { value=-ABSearch(-beta,-alpha,ChangeSide(wtm), depth+extensions,2,DO_NULL); if (abort_search) { UnMakeMove(1,current_move[1],wtm); return(alpha); } first_move=0; } else { value=-ABSearch(-alpha-1,-alpha,ChangeSide(wtm), depth+extensions,2,DO_NULL); if (abort_search) { UnMakeMove(1,current_move[1],wtm); return(alpha); } if ((value > alpha) && (value < beta)) { value=-ABSearch(-beta,-alpha,ChangeSide(wtm), depth+extensions,2,DO_NULL); if (abort_search) { UnMakeMove(1,current_move[1],wtm); return(alpha); } } } While it recursively call itself with alternating players and sometimes drops to !DO_NULL. Intuitively, clonning the function specializing for first iteration of recursion is like loop peeling and that is already done (not particularly well) by recursive inlining. I would suggest we may disable/add negative hint for cloning in the case where the specialized function will end up calling unspecialized version of itself with non-cold edge. We also may consider adding bit of negative hints for cases where cloning would turn function called once (by noncold edge) to a function called twice. The same may be done with inliner, but that would even more reduce changes that ipa-split produced split functions will actually get partially inlined. Function is inlined by 4.9: Considering NextMove/2405 with 284 size to be inlined into Search.constprop/4352 in unknown:-1 Estimated badness is -128, frequency 0.69. Badness calculation for Search.constprop/4352 -> NextMove/2405 size growth 273, time 174 inline hints: cross_module array_index -128: guessed profile. frequency 0.694000, benefit 1.771337%, time w/o inlining 621, time w inlining 610 overall growth 266 (current) 266 (original) Accounting size:228.00, time:104.18 on predicate:(op4 <= 62) Accounting size:4.00, time:4.13 on predicate:(op2 changed) && (op4 <= 62) Accounting size:2.00, time:1.03 on predicate:(op2 == 0) && (op4 <= 62) Accounting size:2.00, time:1.03 on predicate:(op2 != 0) && (op4 <= 62) I am marking it as a regression thus and changing component to IPA.
next prev parent reply other threads:[~2015-03-19 23:56 UTC|newest] Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top 2015-03-19 22:38 [Bug tree-optimization/65478] New: " hubicka at gcc dot gnu.org 2015-03-19 22:45 ` [Bug tree-optimization/65478] " hubicka at gcc dot gnu.org 2015-03-20 2:51 ` hubicka at gcc dot gnu.org [this message] 2015-03-20 10:24 ` [Bug ipa/65478] [5 regression] " rguenth at gcc dot gnu.org 2015-03-20 18:25 ` hubicka at ucw dot cz 2015-03-20 19:19 ` hubicka at ucw dot cz 2015-03-24 14:10 ` jamborm at gcc dot gnu.org 2015-03-24 17:23 ` hubicka at ucw dot cz 2015-03-24 18:48 ` jamborm at gcc dot gnu.org 2015-03-25 7:57 ` hubicka at ucw dot cz 2015-03-27 9:45 ` jamborm at gcc dot gnu.org 2015-03-27 9:49 ` jamborm at gcc dot gnu.org 2015-03-29 14:15 ` hubicka at gcc dot gnu.org 2015-03-29 17:46 ` hubicka at gcc dot gnu.org 2015-03-30 2:23 ` hubicka at gcc dot gnu.org 2015-03-30 11:27 ` rguenth at gcc dot gnu.org 2015-03-30 17:53 ` hubicka at ucw dot cz 2015-03-30 20:02 ` glisse at gcc dot gnu.org 2015-03-30 21:40 ` hubicka at gcc dot gnu.org 2015-03-31 12:14 ` rguenther at suse dot de 2015-03-31 13:08 ` rguenth at gcc dot gnu.org 2015-04-01 14:43 ` rguenth at gcc dot gnu.org 2015-04-01 17:51 ` hubicka at ucw dot cz 2015-04-02 8:38 ` rguenther at suse dot de 2015-04-05 23:55 ` hubicka at gcc dot gnu.org 2015-04-07 8:49 ` rguenth at gcc dot gnu.org
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=bug-65478-4-73Lm24M4XO@http.gcc.gnu.org/bugzilla/ \ --to=gcc-bugzilla@gcc.gnu.org \ --cc=gcc-bugs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).