mirror of https://github.com/xemu-project/xemu.git
tcg: Optimize past conditional branches
We already register allocate through extended basic blocks, optimize through extended basic blocks as well. Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
bfefdbea9e
commit
d97f8f3941
|
@ -688,12 +688,14 @@ static void finish_folding(OptContext *ctx, TCGOp *op)
|
||||||
int i, nb_oargs;
|
int i, nb_oargs;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* For an opcode that ends a BB, reset all temp data.
|
* We only optimize extended basic blocks. If the opcode ends a BB
|
||||||
* We do no cross-BB optimization.
|
* and is not a conditional branch, reset all temp data.
|
||||||
*/
|
*/
|
||||||
if (def->flags & TCG_OPF_BB_END) {
|
if (def->flags & TCG_OPF_BB_END) {
|
||||||
memset(&ctx->temps_used, 0, sizeof(ctx->temps_used));
|
|
||||||
ctx->prev_mb = NULL;
|
ctx->prev_mb = NULL;
|
||||||
|
if (!(def->flags & TCG_OPF_COND_BRANCH)) {
|
||||||
|
memset(&ctx->temps_used, 0, sizeof(ctx->temps_used));
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue