public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Jiu Fu Guo <guojiufu@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc(refs/users/guojiufu/heads/personal-branch)] update the lhs of inc_stmt, instead update the next of orig phi. Date: Wed, 9 Jun 2021 05:25:03 +0000 (GMT) [thread overview] Message-ID: <20210609052503.40B763886C41@sourceware.org> (raw) https://gcc.gnu.org/g:b2b3332a54f06aebd9e13679c5bd29ef3344899a commit b2b3332a54f06aebd9e13679c5bd29ef3344899a Author: Jiufu Guo <guojiufu@linux.ibm.com> Date: Wed Jun 9 13:24:54 2021 +0800 update the lhs of inc_stmt, instead update the next of orig phi. Diff: --- gcc/tree-ssa-loop-split.c | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/gcc/tree-ssa-loop-split.c b/gcc/tree-ssa-loop-split.c index e01d44a6b28..688d26aecaf 100644 --- a/gcc/tree-ssa-loop-split.c +++ b/gcc/tree-ssa-loop-split.c @@ -1642,16 +1642,15 @@ struct idx_elements { gcond *gc; gphi *phi; + gimple *inc_stmt; tree idx; tree bnd; - tree next; tree large_type; tree small_type; - gimple *inc_stmt; bool cmp_on_next; }; -/* Analyze and get the idx related elements: bnd, next, +/* Analyze and get the idx related elements: bnd, phi, increase stmt from exit edge E, etc. i = phi (b, n) @@ -1741,7 +1740,6 @@ analyze_idx_elements (class loop *loop, edge e, idx_elements &data) data.phi = phi; data.idx = idx; data.bnd = bnd; - data.next = next; data.large_type = large_type; data.small_type = small_type; data.inc_stmt = inc_stmt; @@ -1887,7 +1885,7 @@ update_idx_bnd_type (class loop *loop, idx_elements &data) /* next = (next type)new_next And remove next = prev + 1. */ - tree next = data.next; + tree next = gimple_assign_lhs (inc_stmt); tree type = TREE_TYPE (next); gimple *stmt = gimple_build_assign (next, fold_convert (type, new_next)); gsi = gsi_for_stmt (inc_stmt);
reply other threads:[~2021-06-09 5:25 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20210609052503.40B763886C41@sourceware.org \ --to=guojiufu@gcc.gnu.org \ --cc=gcc-cvs@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).