Commit eda38c30 authored by Christian Würdig's avatar Christian Würdig
Browse files

added attribute and function to retrieve barrier from start block

parent 4f36fe0c
......@@ -69,6 +69,8 @@ struct _be_abi_irg_t {
ir_node *init_sp; /**< The node representing the stack pointer
at the start of the function. */
ir_node *start_barrier; /**< The barrier of the start block */
ir_node *reg_params; /**< The reg params node. */
pmap *regs; /**< A map of all callee-save and ignore regs to
their Projs to the RegParams node. */
......@@ -1674,7 +1676,7 @@ static void modify_irg(be_abi_irg_t *env)
env->init_sp = be_new_IncSP(sp, irg, bl, env->init_sp, BE_STACK_FRAME_SIZE_EXPAND);
be_abi_reg_map_set(env->regs, sp, env->init_sp);
barrier = create_barrier(env, bl, &mem, env->regs, 0);
env->start_barrier = barrier = create_barrier(env, bl, &mem, env->regs, 0);
env->init_sp = be_abi_reg_map_get(env->regs, sp);
arch_set_irn_register(env->birg->main_env->arch_env, env->init_sp, sp);
......@@ -1976,6 +1978,11 @@ ir_node *be_abi_get_ignore_irn(be_abi_irg_t *abi, const arch_register_t *reg)
return pmap_get(abi->regs, (void *) reg);
}
ir_node *be_abi_get_start_barrier(be_abi_irg_t *abi)
{
return abi->start_barrier;
}
/*
_____ _____ _ _ _ _ _ _
|_ _| __ \| \ | | | | | | | | |
......
......@@ -125,6 +125,7 @@ void be_abi_put_ignore_regs(be_abi_irg_t *abi, const arch_register_class_t *cls,
ir_node *be_abi_get_callee_save_irn(be_abi_irg_t *abi, const arch_register_t *reg);
ir_node *be_abi_get_ignore_irn(be_abi_irg_t *abi, const arch_register_t *reg);
ir_node *be_abi_get_start_barrier(be_abi_irg_t *abi);
#define be_abi_reg_map_get(map, reg) pmap_get((map), (void *) (reg))
#define be_abi_reg_map_set(map, reg, irn) pmap_insert((map), (void *) (reg), (irn))
......
Markdown is supported
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