becopyopt: Remove the unnecessary attribute name from struct copy_opt_t.
[libfirm] / ir / be / beinfo.h
1 /*
2  * This file is part of libFirm.
3  * Copyright (C) 2012 University of Karlsruhe.
4  */
5
6 /**
7  * @file
8  * @brief       additional backend node infos
9  * @author      Matthias Braun
10  */
11 #ifndef FIRM_BE_BEINFO_H
12 #define FIRM_BE_BEINFO_H
13
14 #include "be_types.h"
15 #include "irnode_t.h"
16
17 /**
18  * The schedule structure which is present at each ir node.
19  *
20  * Currently, only basic blocks are scheduled. The list head of
21  * every block schedule list is the Block list.
22  */
23 struct sched_info_t {
24         ir_node          *next;
25         ir_node          *prev;
26         sched_timestep_t  time_step;    /**< If a is after b in a schedule, its time step is larger than b's. */
27 };
28
29 struct reg_out_info_t {
30         const arch_register_t     *reg;
31         const arch_register_req_t *req;
32 };
33
34 struct backend_info_t {
35         sched_info_t                sched_info;
36         const arch_register_req_t **in_reqs;
37         reg_out_info_t             *out_infos;
38         arch_irn_flags_t            flags;
39 };
40
41 static inline backend_info_t *be_get_info(const ir_node *node)
42 {
43         assert(!is_Proj(node));
44         return (backend_info_t*) node->backend_info;
45 }
46
47 void be_info_init(void);
48 void be_info_free(void);
49 void be_info_init_irg(ir_graph *irg);
50 void be_info_new_node(ir_graph *irg, ir_node *node);
51
52 int be_nodes_equal(const ir_node *node1, const ir_node *node2);
53
54 #endif