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:
parent
f4a6e585be
commit
6dc16b7416
|
@ -1105,7 +1105,9 @@ unsigned IRBuilder::getComplexity(InstLoc I) const {
|
|||
|
||||
unsigned IRBuilder::getNumberOfOperands(InstLoc I) const {
|
||||
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);
|
||||
|
||||
numberOfOperands[Nop] = 0;
|
||||
|
|
Loading…
Reference in New Issue