All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 4/6] memops: do not mess up with phisource's source ident
Date: Sun, 21 Mar 2021 18:08:20 +0100	[thread overview]
Message-ID: <20210321170822.46854-5-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20210321170822.46854-1-luc.vanoostenryck@gmail.com>

In rewrite_load_instruction(), when testing if all phi-sources are
the same, the candidate is given an identifier if it hasn't one already.
But doing this inside this loop is strange:
* the pseudo may, at the end, not be selected but is changed anyway
* the identifier should be given either when the phi-source is created
  or at the end of the loop if selected.

So, do not change the identifier inside the selection loop.

Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
 memops.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/memops.c b/memops.c
index 5386c5a1f416..119a39a180d5 100644
--- a/memops.c
+++ b/memops.c
@@ -29,7 +29,6 @@ static void rewrite_load_instruction(struct instruction *insn, struct pseudo_lis
 	FOR_EACH_PTR(dominators, phi) {
 		if (new != phi->def->phi_src)
 			goto complex_phi;
-		new->ident = new->ident ? : phi->ident;
 	} END_FOR_EACH_PTR(phi);
 
 	/*
-- 
2.31.0


  parent reply	other threads:[~2021-03-21 17:09 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-21 17:08 [PATCH 0/6] memops: small cleanups Luc Van Oostenryck
2021-03-21 17:08 ` [PATCH 1/6] memops: dominates()s first arg is redundant Luc Van Oostenryck
2021-03-21 17:08 ` [PATCH 2/6] memops: find_dominating_parents()s generation " Luc Van Oostenryck
2021-03-21 17:08 ` [PATCH 3/6] memops: remove obsolete comment Luc Van Oostenryck
2021-03-21 17:08 ` Luc Van Oostenryck [this message]
2021-03-21 17:08 ` [PATCH 5/6] memops: avoid using first_pseudo() Luc Van Oostenryck
2021-03-21 17:08 ` [PATCH 6/6] memops: we can kill addresses unconditionally Luc Van Oostenryck

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=20210321170822.46854-5-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.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: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.