Skip to content

Commit

Permalink
move liveness interface to its own header
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
lucvoo committed Feb 24, 2018
1 parent 6114de4 commit e225887
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 4 deletions.
4 changes: 0 additions & 4 deletions flow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
1 change: 1 addition & 0 deletions liveness.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <assert.h>

#include "liveness.h"
#include "parse.h"
#include "expression.h"
#include "linearize.h"
Expand Down
11 changes: 11 additions & 0 deletions liveness.h
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions optimize.c
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include "optimize.h"
#include "linearize.h"
#include "liveness.h"
#include "flow.h"


Expand Down

0 comments on commit e225887

Please sign in to comment.