Commit 2922c6d1 authored by Matthias Braun's avatar Matthias Braun
Browse files

convert a few more place that mention birg into generic ir_graph* stuff

[r27694]
parent 65a52a96
......@@ -2181,7 +2181,7 @@ static void fix_pic_symconsts(ir_node *node, void *data)
ir_node *load_res;
be_abi_irg_t *env = data;
int arity, i;
be_main_env_t *be = be_birg_from_irg(env->irg)->main_env;
be_main_env_t *be = be_get_irg_main_env(env->irg);
arity = get_irn_arity(node);
for (i = 0; i < arity; ++i) {
......
......@@ -1130,7 +1130,7 @@ static FILE *my_open(const be_chordal_env_t *env, const char *prefix, const char
char buf[1024];
size_t i, n;
char *tu_name;
const char *cup_name = be_birg_from_irg(env->irg)->main_env->cup_name;
const char *cup_name = be_get_irg_main_env(env->irg)->cup_name;
n = strlen(cup_name);
tu_name = XMALLOCN(char, n + 1);
......
......@@ -43,7 +43,7 @@ static FILE *my_open(const be_chordal_env_t *env, const char *prefix, const char
char buf[1024];
size_t i, n;
char *tu_name;
const char *cup_name = be_birg_from_irg(irg)->main_env->cup_name;
const char *cup_name = be_get_irg_main_env(irg)->cup_name;
n = strlen(cup_name);
tu_name = XMALLOCN(char, n + 1);
......
......@@ -48,17 +48,17 @@ void be_free_birg(ir_graph *irg);
* backend structures
*/
typedef struct be_irg_t {
ir_graph *irg;
be_main_env_t *main_env;
be_abi_irg_t *abi;
arch_code_generator_t *cg;
ir_exec_freq *exec_freq;
be_dom_front_info_t *dom_front;
be_lv_t *lv;
struct obstack obst; /**< birg obstack (mainly used to keep
register constraints which we can't keep
in the irg obst, because it gets replace
during code selection) */
ir_graph *irg;
be_main_env_t *main_env;
be_abi_irg_t *abi;
arch_code_generator_t *cg;
ir_exec_freq *exec_freq;
be_dom_front_info_t *dom_front;
be_lv_t *lv;
struct obstack obst; /**< birg obstack (mainly used to keep
register constraints which we can't keep
in the irg obst, because it gets replace
during code selection) */
} be_irg_t;
static inline be_irg_t *be_birg_from_irg(const ir_graph *irg)
......@@ -66,6 +66,11 @@ static inline be_irg_t *be_birg_from_irg(const ir_graph *irg)
return (be_irg_t*) irg->be_data;
}
static inline be_main_env_t *be_get_irg_main_env(const ir_graph *irg)
{
return be_birg_from_irg(irg)->main_env;
}
static inline be_lv_t *be_get_irg_liveness(const ir_graph *irg)
{
return be_birg_from_irg(irg)->lv;
......
......@@ -114,7 +114,7 @@ static FILE *my_open(const be_chordal_env_t *env, const char *prefix, const char
char buf[1024];
size_t i, n;
char *tu_name;
const char *cup_name = be_birg_from_irg(env->irg)->main_env->cup_name;
const char *cup_name = be_get_irg_main_env(env->irg)->cup_name;
n = strlen(cup_name);
tu_name = XMALLOCN(char, n + 1);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment