diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-02-18 22:21:20 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-02-24 10:49:15 +0100 |
| commit | e22588735b2ed54a08d1b3fb593cc3a26afb320b (patch) | |
| tree | eabe76ccc942877e8d74749861410f314fc06e1f | |
| parent | 6114de42604a7b8c8e98ae7e55a359622cfc8826 (diff) | |
| download | sparse-dev-e22588735b2ed54a08d1b3fb593cc3a26afb320b.tar.gz | |
move liveness interface to its own header
Currently, the interface for liveness analysis is declared
in the flow.h header file. There is no a real need to move
it to its own file but it's the dual of the previous patch
and help a bit to make the code structure clearer.
Move the prototype for liveness analysis to its own header.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
| -rw-r--r-- | flow.h | 4 | ||||
| -rw-r--r-- | liveness.c | 1 | ||||
| -rw-r--r-- | liveness.h | 11 | ||||
| -rw-r--r-- | optimize.c | 1 |
4 files changed, 13 insertions, 4 deletions
@@ -41,10 +41,6 @@ void convert_load_instruction(struct instruction *, pseudo_t); void rewrite_load_instruction(struct instruction *, struct pseudo_list *); int dominates(pseudo_t pseudo, struct instruction *insn, struct instruction *dom, int local); -extern void clear_liveness(struct entrypoint *ep); -extern void track_pseudo_liveness(struct entrypoint *ep); -extern void track_pseudo_death(struct entrypoint *ep); - extern void vrfy_flow(struct entrypoint *ep); extern int pseudo_in_list(struct pseudo_list *list, pseudo_t pseudo); @@ -7,6 +7,7 @@ #include <assert.h> +#include "liveness.h" #include "parse.h" #include "expression.h" #include "linearize.h" diff --git a/liveness.h b/liveness.h new file mode 100644 index 00000000..882167ce --- /dev/null +++ b/liveness.h @@ -0,0 +1,11 @@ +#ifndef LIVENESS_H +#define LIVENESS_H + +struct entrypoint; + +/* liveness.c */ +void clear_liveness(struct entrypoint *ep); +void track_pseudo_liveness(struct entrypoint *ep); +void track_pseudo_death(struct entrypoint *ep); + +#endif @@ -7,6 +7,7 @@ #include "optimize.h" #include "linearize.h" +#include "liveness.h" #include "flow.h" |
