create cfg.c for cfg-related functions

This commit is contained in:
Quentin Carbonneaux 2016-12-05 02:09:48 -05:00
parent 2380b5786a
commit 12f9d16c7b
5 changed files with 241 additions and 231 deletions

12
all.h
View file

@ -481,8 +481,6 @@ void die_(char *, char *, ...) __attribute__((noreturn));
void *emalloc(size_t);
void *alloc(size_t);
void freeall(void);
Blk *blknew(void);
void blkdel(Blk *);
void emit(int, int, Ref, Ref, Ref);
void emiti(Ins);
void idup(Ins **, Ins *, ulong);
@ -523,6 +521,16 @@ void printfn(Fn *, FILE *);
void printref(Ref, Fn *, FILE *);
void err(char *, ...) __attribute__((noreturn));
/* cfg.c */
Blk *blknew(void);
void blkdel(Blk *);
void fillpreds(Fn *);
void fillrpo(Fn *);
void filldom(Fn *);
int sdom(Blk *, Blk *);
int dom(Blk *, Blk *);
void fillfron(Fn *);
/* mem.c */
void memopt(Fn *);