From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: linux-sparse@vger.kernel.org
Cc: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Subject: [PATCH 2/5] make a header for simplification
Date: Sun, 29 Nov 2020 15:49:19 +0100 [thread overview]
Message-ID: <20201129144922.56209-3-luc.vanoostenryck@gmail.com> (raw)
In-Reply-To: <20201129144922.56209-1-luc.vanoostenryck@gmail.com>
The few external functions defined in simplify.h are declared
in flow.h (for historical reasons).
In preparation for some changes, create a specific headers for these.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
---
flow.h | 1 -
optimize.c | 1 +
simplify.c | 1 +
simplify.h | 8 ++++++++
4 files changed, 10 insertions(+), 1 deletion(-)
create mode 100644 simplify.h
diff --git a/flow.h b/flow.h
index c3461c8c33bd..7cdc7c2a496b 100644
--- a/flow.h
+++ b/flow.h
@@ -21,7 +21,6 @@ extern int simplify_cfg_early(struct entrypoint *ep);
extern void convert_instruction_target(struct instruction *insn, pseudo_t src);
extern void remove_dead_insns(struct entrypoint *);
-extern int simplify_instruction(struct instruction *);
extern void kill_bb(struct basic_block *);
extern void kill_use(pseudo_t *);
diff --git a/optimize.c b/optimize.c
index 9b754831f8b0..3351e67b9d5e 100644
--- a/optimize.c
+++ b/optimize.c
@@ -12,6 +12,7 @@
#include "flowgraph.h"
#include "linearize.h"
#include "liveness.h"
+#include "simplify.h"
#include "flow.h"
#include "cse.h"
#include "ir.h"
diff --git a/simplify.c b/simplify.c
index 29b368e94ff4..69eae4f8a5a1 100644
--- a/simplify.c
+++ b/simplify.c
@@ -44,6 +44,7 @@
#include "parse.h"
#include "expression.h"
#include "linearize.h"
+#include "simplify.h"
#include "flow.h"
#include "symbol.h"
diff --git a/simplify.h b/simplify.h
new file mode 100644
index 000000000000..200d79c00a83
--- /dev/null
+++ b/simplify.h
@@ -0,0 +1,8 @@
+#ifndef SIMPLIFY_H
+#define SIMPLIFY_H
+
+#include "linearize.h"
+
+int simplify_instruction(struct instruction *insn);
+
+#endif
--
2.29.2
next prev parent reply other threads:[~2020-11-29 14:50 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-29 14:49 [PATCH 0/5] use replace_with_pseudo() for simplify_memops() Luc Van Oostenryck
2020-11-29 14:49 ` [PATCH 1/5] let replace_with_pseudo() use kill_instruction() Luc Van Oostenryck
2020-11-29 14:49 ` Luc Van Oostenryck [this message]
2020-11-29 14:49 ` [PATCH 3/5] make replace_with_pseudo() extern Luc Van Oostenryck
2020-11-29 14:49 ` [PATCH 4/5] memops: move rewrite_load_instruction() here Luc Van Oostenryck
2020-11-29 14:49 ` [PATCH 5/5] replace convert_load_instruction() by replace_with_pseudo() 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=20201129144922.56209-3-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).