Remove the unused parameter const arch_env_t *env from arch_get_sp_bias().
[libfirm] / ir / be / beabi.c
index 26e1b0e..58ecd1e 100644 (file)
@@ -235,8 +235,7 @@ be_abi_call_flags_t be_abi_call_get_flags(const be_abi_call_t *call)
  */
 static be_abi_call_t *be_abi_call_new(const arch_register_class_t *cls_addr)
 {
-       be_abi_call_t *call = xmalloc(sizeof(call[0]));
-       memset(call, 0, sizeof(call[0]));
+       be_abi_call_t *call = XMALLOCZ(be_abi_call_t);
 
        call->flags.val  = 0;
        call->params     = new_set(cmp_call_arg, 16);
@@ -2163,7 +2162,7 @@ static void fix_pic_symconsts(ir_node *node, void *data)
 
 be_abi_irg_t *be_abi_introduce(be_irg_t *birg)
 {
-       be_abi_irg_t *env  = xmalloc(sizeof(env[0]));
+       be_abi_irg_t *env  = XMALLOC(be_abi_irg_t);
        ir_node *old_frame = get_irg_frame(birg->irg);
        ir_graph *irg      = birg->irg;
 
@@ -2387,7 +2386,6 @@ void be_abi_fix_stack_nodes(be_abi_irg_t *env)
  */
 static int process_stack_bias(be_abi_irg_t *env, ir_node *bl, int real_bias)
 {
-       const arch_env_t *arch_env = env->birg->main_env->arch_env;
        int               omit_fp  = env->call->flags.bits.try_omit_fp;
        ir_node          *irn;
        int               wanted_bias = real_bias;
@@ -2400,11 +2398,11 @@ static int process_stack_bias(be_abi_irg_t *env, ir_node *bl, int real_bias)
                   If so, set the true offset (including the bias) for that
                   node.
                 */
-               ir_entity *ent = arch_get_frame_entity(arch_env, irn);
+               ir_entity *ent = arch_get_frame_entity(irn);
                if (ent) {
                        int bias   = omit_fp ? real_bias : 0;
                        int offset = get_stack_entity_offset(&env->frame, ent, bias);
-                       arch_set_frame_offset(arch_env, irn, offset);
+                       arch_set_frame_offset(irn, offset);
                        DBG((env->dbg, LEVEL_2, "%F has offset %d (including bias %d)\n",
                             ent, offset, bias));
                }
@@ -2413,7 +2411,7 @@ static int process_stack_bias(be_abi_irg_t *env, ir_node *bl, int real_bias)
                 * If the node modifies the stack pointer by a constant offset,
                 * record that in the bias.
                 */
-               ofs = arch_get_sp_bias(arch_env, irn);
+               ofs = arch_get_sp_bias(irn);
 
                if (be_is_IncSP(irn)) {
                        /* fill in real stack frame size */