mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
JitIL: Improved the compilation speed by fixing the bug that getNumberOfOperands() initializes the table each time it is called.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6173 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -1105,7 +1105,9 @@ unsigned IRBuilder::getComplexity(InstLoc I) const {
|
|||||||
|
|
||||||
unsigned IRBuilder::getNumberOfOperands(InstLoc I) const {
|
unsigned IRBuilder::getNumberOfOperands(InstLoc I) const {
|
||||||
static unsigned numberOfOperands[256];
|
static unsigned numberOfOperands[256];
|
||||||
if (numberOfOperands[0] == 0) {
|
static bool initialized = false;
|
||||||
|
if (!initialized) {
|
||||||
|
initialized = true;
|
||||||
std::fill_n(numberOfOperands, sizeof(numberOfOperands) / sizeof(numberOfOperands[0]), -1U);
|
std::fill_n(numberOfOperands, sizeof(numberOfOperands) / sizeof(numberOfOperands[0]), -1U);
|
||||||
|
|
||||||
numberOfOperands[Nop] = 0;
|
numberOfOperands[Nop] = 0;
|
||||||
|
Reference in New Issue
Block a user