Added beirgmod and benode
[libfirm] / ir / be / benode_t.h
1 /**
2  * @file   benode_t.h
3  * @date   17.05.2005
4  * @author Sebastian Hack
5  *
6  * Backend node support.
7  *
8  * Copyright (C) 2005 Universitaet Karlsruhe
9  * Released under the GPL
10  */
11
12 #ifndef _BENODE_T_H
13 #define _BENODE_T_H
14
15 #include "irmode.h"
16 #include "irnode.h"
17
18 #include "bearch.h"
19
20 typedef struct _be_node_factory_t                       be_node_factory_t;
21
22 be_node_factory_t *be_new_node_factory(const arch_isa_if_t *isa);
23
24 const arch_irn_handler_t *be_node_get_irn_handler(const be_node_factory_t *f);
25
26 ir_node *new_Spill(const be_node_factory_t *factory,
27     const arch_register_class_t *cls,
28     ir_graph *irg, ir_node *bl, ir_node *node_to_spill);
29
30 ir_node *new_Reload(const be_node_factory_t *factory,
31     const arch_register_class_t *cls,
32     ir_graph *irg, ir_node *bl, ir_node *spill_node);
33
34 ir_node *new_Perm(const be_node_factory_t *factory,
35     const arch_register_class_t *cls,
36     ir_graph *irg, ir_node *bl, int arity, ir_node **in);
37
38 ir_node *new_Copy(const be_node_factory_t *factory,
39     const arch_register_class_t *cls,
40     ir_graph *irg, ir_node *block, ir_node *in);
41
42 ir_node *be_spill(const be_node_factory_t *factory, const arch_env_t *env, ir_node *irn);
43 ir_node *be_reload(const be_node_factory_t *factory, const arch_env_t *env, ir_node *irn);
44
45 int is_Spill(const be_node_factory_t *f, const ir_node *irn);
46
47 ir_node *get_Reload_Spill(ir_node *reload);
48
49 void insert_perm(const be_node_factory_t *factory,
50     const arch_register_class_t *reg_class,
51     ir_node *in_front_of);
52
53 #endif /* _BENODE_T_H */