aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-01-02 01:38:56 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-28 11:41:17 +0100
commitffa1eb332ea2c51599f8e1794944cee41065cf61 (patch)
tree57d0296e4d064e896c709f71e6b99e41d1fc6eff
parente1e909ac779e8c5ee099965884a99b291791b1da (diff)
downloadsparse-ffa1eb332ea2c51599f8e1794944cee41065cf61.tar.gz
make a header for simplification
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>
-rw-r--r--flow.h1
-rw-r--r--optimize.c1
-rw-r--r--simplify.c1
-rw-r--r--simplify.h8
4 files changed, 10 insertions, 1 deletions
diff --git a/flow.h b/flow.h
index c3461c8c..7cdc7c2a 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 9b754831..3351e67b 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 29b368e9..69eae4f8 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 00000000..200d79c0
--- /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