From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 3/5] volatile stores are never dead
Date: Sun, 11 Apr 2021 00:30:42 +0200 [thread overview]
Message-ID: <20210410223044.86100-4-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20210410223044.86100-1-luc.vanoostenryck@gmail.com>
so they shouldn't be killed.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
memops.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/memops.c b/memops.c
index 31fd2d3eaffc..8020f2e6cf03 100644
--- a/memops.c
+++ b/memops.c
@@ -215,6 +215,8 @@ static bool try_to_kill_store(pseudo_t pseudo, struct instruction *insn,
return false;
if (dom->opcode == OP_LOAD)
return false;
+ if (dom->is_volatile)
+ return false;
/* Yeehaa! Found one! */
kill_instruction_force(dom);
}
--
2.31.1
next prev parent reply other threads:[~2021-04-10 22:31 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-10 22:30 [PATCH 0/5] kill more dead stores Luc Van Oostenryck
2021-04-10 22:30 ` [PATCH 1/5] add testcases for stores simplifications Luc Van Oostenryck
2021-04-10 22:30 ` [PATCH 2/5] extract try_to_kill_store() from kill_dominated_stores() Luc Van Oostenryck
2021-04-10 22:30 ` Luc Van Oostenryck [this message]
2021-04-10 22:30 ` [PATCH 4/5] kill parent's dead stores too Luc Van Oostenryck
2021-04-10 22:30 ` [PATCH 5/5] kill redundant stores (local) 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=20210410223044.86100-4-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 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 NNTP newsgroup(s).