diff options
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 9 |
1 files changed, 9 insertions, 0 deletions
@@ -7,6 +7,8 @@ #include "regalloc.h" #include "to_assembly.h" +#undef DEBUG + extern FILE *yyin; extern int yyparse(void); @@ -29,18 +31,25 @@ int main(int argc, char **argv) { assert(false); } +#ifdef DEBUG node_print(root_node, stdout, 0); printf("\n"); +#endif struct ir *ir = compile(root_node); +#ifdef DEBUG ir_print(ir, stdout); printf("\n"); +#endif struct allocation *alloc = regalloc(ir); to_assembly(ir, alloc); allocation_delete(alloc); +#ifdef DEBUG ir_print(ir, stdout); printf("\n"); +#endif + assemble(ir, stdout); return result; |