aboutsummaryrefslogtreecommitdiff
path: root/src/opt.c
blob: dac19a6212698917fe6ccb42b924419f45991bdb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>

#include <qbt/opt.h>
#include <qbt/regalloc.h>
#include <qbt/abi.h>

void optimize(struct fn *f)
{
	printf("\n// initial:\n");
	dump_function(f);

	/* unreachability is done in several steps I guess */
	size_t ri = ssa(f);
	printf("\n// after SSA:\n");
	dump_function(f);

	correct(f, ri);
	printf("\n// corrections:\n");
	dump_function(f);

	abi0(f);
	printf("\n// after abi0:\n");
	dump_function(f);

	/* ... do more stuff ... */
	regalloc(f);
	printf("\n// after regalloc:\n");
	dump_function(f);
}