public inbox for gcc-bugs@sourceware.org help / color / mirror / Atom feed
From: "amacleod at redhat dot com" <gcc-bugzilla@gcc.gnu.org> To: gcc-bugs@gcc.gnu.org Subject: [Bug tree-optimization/106280] dom_oracle::register_transitives is expensive for deep dominator trees Date: Thu, 14 Jul 2022 17:03:12 +0000 [thread overview] Message-ID: <bug-106280-4-Q7xDBT9SQ3@http.gcc.gnu.org/bugzilla/> (raw) In-Reply-To: <bug-106280-4@http.gcc.gnu.org/bugzilla/> https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106280 --- Comment #1 from Andrew Macleod <amacleod at redhat dot com> --- Created attachment 53300 --> https://gcc.gnu.org/bugzilla/attachment.cgi?id=53300&action=edit proposed patch See if this helps. All of the lookup routines check to see first is there is an existing relation for an SSA_NAME before deciding what to do. I forgot to do that with the transitive code. So, this patch does 2 things. 1) If a relation is being registered which already exist, the set routine now returns NULL for the record as there will be no new work to do 2) IF this is a new relation, before calling register_transitives checks if either operand was in a relation before (its just a quick bitmap check). If neither was, there is no possibility of a transitive relation, so no need to look. This eliminates a lot of unnecessary work, and based on the pass times spits out at the end, appears to save a lot of time in the various VRP passes (over 50% time reduction) in your test case. It also makes some marginal improvements in GCC source files compilation.
next prev parent reply other threads:[~2022-07-14 17:03 UTC|newest] Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-07-13 8:29 [Bug tree-optimization/106280] New: " rguenth at gcc dot gnu.org 2022-07-14 17:03 ` amacleod at redhat dot com [this message] 2022-07-18 20:01 ` [Bug tree-optimization/106280] " cvs-commit 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-106280-4-Q7xDBT9SQ3@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).