Skip to content

Commit

Permalink
Hexagon (target/hexagon) remove unused TCG variables
Browse files Browse the repository at this point in the history
Signed-off-by: Taylor Simpson <tsimpson@quicinc.com>
Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
Message-Id: <1622589584-22571-5-git-send-email-tsimpson@quicinc.com>
  • Loading branch information
taylorsimpson committed Jun 29, 2021
1 parent 8872533 commit fb858fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
6 changes: 0 additions & 6 deletions target/hexagon/genptr.c
Expand Up @@ -115,10 +115,7 @@ static void gen_log_reg_write_pair(int rnum, TCGv_i64 val)

static inline void gen_log_pred_write(DisasContext *ctx, int pnum, TCGv val)
{
TCGv zero = tcg_const_tl(0);
TCGv base_val = tcg_temp_new();
TCGv and_val = tcg_temp_new();
TCGv pred_written = tcg_temp_new();

tcg_gen_andi_tl(base_val, val, 0xff);

Expand All @@ -137,10 +134,7 @@ static inline void gen_log_pred_write(DisasContext *ctx, int pnum, TCGv val)
}
tcg_gen_ori_tl(hex_pred_written, hex_pred_written, 1 << pnum);

tcg_temp_free(zero);
tcg_temp_free(base_val);
tcg_temp_free(and_val);
tcg_temp_free(pred_written);
}

static inline void gen_read_p3_0(TCGv control_reg)
Expand Down
11 changes: 2 additions & 9 deletions target/hexagon/translate.c
Expand Up @@ -273,25 +273,21 @@ static void gen_reg_writes(DisasContext *ctx)

static void gen_pred_writes(DisasContext *ctx, Packet *pkt)
{
TCGv zero, control_reg, pval;
int i;

/* Early exit if the log is empty */
if (!ctx->preg_log_idx) {
return;
}

zero = tcg_const_tl(0);
control_reg = tcg_temp_new();
pval = tcg_temp_new();

/*
* Only endloop instructions will conditionally
* write a predicate. If there are no endloop
* instructions, we can use the non-conditional
* write of the predicates.
*/
if (pkt->pkt_has_endloop) {
TCGv zero = tcg_const_tl(0);
TCGv pred_written = tcg_temp_new();
for (i = 0; i < ctx->preg_log_idx; i++) {
int pred_num = ctx->preg_log[i];
Expand All @@ -302,6 +298,7 @@ static void gen_pred_writes(DisasContext *ctx, Packet *pkt)
hex_new_pred_value[pred_num],
hex_pred[pred_num]);
}
tcg_temp_free(zero);
tcg_temp_free(pred_written);
} else {
for (i = 0; i < ctx->preg_log_idx; i++) {
Expand All @@ -314,10 +311,6 @@ static void gen_pred_writes(DisasContext *ctx, Packet *pkt)
}
}
}

tcg_temp_free(zero);
tcg_temp_free(control_reg);
tcg_temp_free(pval);
}

static void gen_check_store_width(DisasContext *ctx, int slot_num)
Expand Down

0 comments on commit fb858fb

Please sign in to comment.