implement a simple load elimination pass

This commit is contained in:
Quentin Carbonneaux 2016-09-04 20:22:38 -04:00
parent 8fdea1dd52
commit 3f147ed2e0
3 changed files with 414 additions and 2 deletions

6
all.h
View file

@ -530,7 +530,8 @@ void bsdiff(BSet *, BSet *);
int bsequal(BSet *, BSet *);
int bsiter(BSet *, int *);
static inline int bshas(BSet *bs, uint elt)
static inline int
bshas(BSet *bs, uint elt)
{
assert(elt < bs->nt * NBit);
return (bs->t[elt/NBit] & BIT(elt%NBit)) != 0;
@ -561,6 +562,9 @@ void fillalias(Fn *);
int alias(Ref, int, Ref, int, int *, Fn *);
int escapes(Ref, Fn *);
/* load.c */
void loadopt(Fn *);
/* ssa.c */
void filluse(Fn *);
void fillpreds(Fn *);