2 * Dumps Firm into CPU specific assembler format (the concrete
3 * implementations can be found in the <arch> subdirectories)
4 * @author Christian Wuerdig
9 #include "pseudo_irg.h"
14 #include "firm2arch.h"
17 * Transforms all irgs into assembler irgs.
18 * Calls the interface function transform_node() which
19 * needs to be implemented for each architecture.
21 void transform_firm(ir_graph *irg) {
22 firm_dbg_module_t *dbg = firm_dbg_register("be.transform");
23 if (! is_pseudo_ir_graph(irg))
24 irg_walk_blkwise_graph(irg, NULL, transform_node, dbg);
28 * Finishes the firm transformation. This function is called
29 * after register allocation and scheduling to build everything
30 * which can only be build after those phases e.g. function prolog
32 * Calls the interface function finish_node_transformation which needs
33 * to be implemented for each architecture.
35 void finish_transform(ir_graph *irg) {
36 if (! is_pseudo_ir_graph(irg)) {
37 // irg_walk_blkwise_graph(irg, NULL, finish_node_transformation, NULL);
42 * Generates the architecture specific assembler code.
43 * Calls the interface functions firmbe_gen_decls() (dumps all global
44 * decls) and firmbe_gen_routine() (generates code for all routines) which
45 * need to be implemented for each architecture.
47 void firmbe_gen_code(FILE *out) {
50 firmbe_gen_decls(out);
51 for (i = 0; i < get_irp_n_irgs(); ++i) {
52 ir_graph *irg = get_irp_irg(i);
54 // if (! is_pseudo_ir_graph(irg))
55 // firmbe_gen_routine(out, irg);