benode_t.h 1.48 KB
Newer Older
Sebastian Hack's avatar
Sebastian Hack committed
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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
/**
 * @file   benode_t.h
 * @date   17.05.2005
 * @author Sebastian Hack
 *
 * Backend node support.
 *
 * Copyright (C) 2005 Universitaet Karlsruhe
 * Released under the GPL
 */

#ifndef _BENODE_T_H
#define _BENODE_T_H

#include "irmode.h"
#include "irnode.h"

#include "bearch.h"

typedef struct _be_node_factory_t 			be_node_factory_t;

be_node_factory_t *be_new_node_factory(const arch_isa_if_t *isa);

const arch_irn_handler_t *be_node_get_irn_handler(const be_node_factory_t *f);

ir_node *new_Spill(const be_node_factory_t *factory,
    const arch_register_class_t *cls,
    ir_graph *irg, ir_node *bl, ir_node *node_to_spill);

ir_node *new_Reload(const be_node_factory_t *factory,
    const arch_register_class_t *cls,
    ir_graph *irg, ir_node *bl, ir_node *spill_node);

ir_node *new_Perm(const be_node_factory_t *factory,
    const arch_register_class_t *cls,
    ir_graph *irg, ir_node *bl, int arity, ir_node **in);

ir_node *new_Copy(const be_node_factory_t *factory,
    const arch_register_class_t *cls,
    ir_graph *irg, ir_node *block, ir_node *in);

ir_node *be_spill(const be_node_factory_t *factory, const arch_env_t *env, ir_node *irn);
ir_node *be_reload(const be_node_factory_t *factory, const arch_env_t *env, ir_node *irn);

int is_Spill(const be_node_factory_t *f, const ir_node *irn);

ir_node *get_Reload_Spill(ir_node *reload);

void insert_perm(const be_node_factory_t *factory,
    const arch_register_class_t *reg_class,
    ir_node *in_front_of);

#endif /* _BENODE_T_H */