mirror of
git://c9x.me/qbe.git
synced 2026-04-05 18:09:47 +00:00
enable constant folding
This commit is contained in:
parent
d8770d112b
commit
abe45f1ab0
2
Makefile
2
Makefile
@ -4,7 +4,7 @@ ABI = sysv
|
||||
V = @
|
||||
OBJDIR = obj
|
||||
|
||||
SRC = main.c util.c parse.c mem.c ssa.c copy.c live.c $(ABI).c isel.c spill.c rega.c emit.c
|
||||
SRC = main.c util.c parse.c mem.c ssa.c copy.c fold.c live.c $(ABI).c isel.c spill.c rega.c emit.c
|
||||
OBJ = $(SRC:%.c=$(OBJDIR)/%.o)
|
||||
|
||||
CFLAGS += -Wall -Wextra -std=c99 -g -pedantic
|
||||
|
||||
3
all.h
3
all.h
@ -533,6 +533,9 @@ void ssa(Fn *);
|
||||
/* copy.c */
|
||||
void copy(Fn *);
|
||||
|
||||
/* fold.c */
|
||||
void fold(Fn *);
|
||||
|
||||
/* live.c */
|
||||
void liveon(BSet *, Blk *, Blk *);
|
||||
void filllive(Fn *);
|
||||
|
||||
3
main.c
3
main.c
@ -11,6 +11,7 @@ char debug['Z'+1] = {
|
||||
['M'] = 0, /* memory optimization */
|
||||
['N'] = 0, /* ssa construction */
|
||||
['C'] = 0, /* copy elimination */
|
||||
['F'] = 0, /* constant folding */
|
||||
['S'] = 0, /* spilling */
|
||||
['R'] = 0, /* reg. allocation */
|
||||
};
|
||||
@ -48,6 +49,8 @@ func(Fn *fn)
|
||||
ssa(fn);
|
||||
filluse(fn);
|
||||
copy(fn);
|
||||
filluse(fn);
|
||||
fold(fn);
|
||||
abi(fn);
|
||||
filluse(fn);
|
||||
isel(fn);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user