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: Christopher Li <sparse@chrisli.org>,
	Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 10/16] fix killing OP_CALL via pointers
Date: Thu, 16 Feb 2017 05:57:02 +0100	[thread overview]
Message-ID: <20170216045708.50661-11-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20170216045708.50661-1-luc.vanoostenryck@gmail.com>

When killing an OP_CALL corresponding to a function pointer
the ->func field needs also to have its usage adjusted.

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

diff --git a/simplify.c b/simplify.c
index cacf81f9f..b80d05b87 100644
--- a/simplify.c
+++ b/simplify.c
@@ -245,6 +245,8 @@ void kill_insn(struct instruction *insn, int force)
 				return;
 		}
 		kill_use_list(insn->arguments);
+		if (insn->func->type == PSEUDO_REG)
+			kill_use(&insn->func);
 		break;
 
 	case OP_ENTRY:
-- 
2.11.0


  parent reply	other threads:[~2017-02-16  4:57 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-16  4:56 [PATCH 00/16] instructions killing & operands usage Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 01/16] add killing of OP_SLICEs Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 02/16] add killing of OP_PHISOURCEs Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 03/16] add helper kill_use_list() Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 04/16] fix killing of OP_PHIs Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 05/16] fix clear_phi(), replace it by kill_instruction() Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 06/16] remove unused clear_phi() Luc Van Oostenryck
2017-02-16  4:56 ` [PATCH 07/16] fix killing of otherwise not-handled instructions Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 08/16] kill_instruction() may need to be forced or not Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 09/16] add killing of pure calls Luc Van Oostenryck
2017-02-16  4:57 ` Luc Van Oostenryck [this message]
2017-02-16  4:57 ` [PATCH 11/16] add killing of non-volatile loads Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 12/16] add killing of stores Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 13/16] fix killing of rewritten loads Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 14/16] use kill_instruction() when killing an OP_PHI during CSE Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 15/16] use kill_instruction() when killing any instructions " Luc Van Oostenryck
2017-02-16  4:57 ` [PATCH 16/16] fix OP_PHI usage in try_to_simplify_bb() 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=20170216045708.50661-11-luc.vanoostenryck@gmail.com \
    --to=luc.vanoostenryck@gmail.com \
    --cc=linux-sparse@vger.kernel.org \
    --cc=sparse@chrisli.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.