tcg/optimize: rename tcg_constant_folding

The tcg_constant_folding folding ends up doing all the optimizations
(which is a good thing to avoid looping on all ops multiple time), so
make it clear and just rename it tcg_optimize.

Backports commit 36e60ef6ac5d8a262d0fbeedfdb2b588514cb1ea from qemu
This commit is contained in:
Aurelien Jarno 2018-02-10 21:36:11 -05:00 committed by Lioncash
parent 7b0055d742
commit 42dd2addbe
No known key found for this signature in database
GPG key ID: 4E3C3CC1031BA9C7

View file

@ -577,7 +577,7 @@ static bool swap_commutative2(TCGContext *s, TCGArg *p1, TCGArg *p2)
}
/* Propagate constants and copies, fold constant expressions. */
static void tcg_constant_folding(TCGContext *s)
void tcg_optimize(TCGContext *s)
{
struct tcg_temp_info *temps = s->temps2;
int oi, oi_next, nb_temps, nb_globals;
@ -1332,8 +1332,3 @@ static void tcg_constant_folding(TCGContext *s)
}
}
}
void tcg_optimize(TCGContext *s)
{
tcg_constant_folding(s);
}