}
// reverse map of tracked number to var number
- unsigned lvaTrackedToVarNum[lclMAX_TRACKED];
+ unsigned* lvaTrackedToVarNum;
#if DOUBLE_ALIGN
#ifdef DEBUG
lvaGenericsContextUseCount = 0;
+ lvaTrackedToVarNum = nullptr;
+
lvaSortAgain = false; // false: We don't need to call lvaSortOnly()
lvaTrackedFixed = false; // false: We can still add new tracked variables
}
}
+ if (lvaTrackedToVarNum == nullptr)
+ {
+ lvaTrackedToVarNum = static_cast<unsigned*>(compGetMemArray(lclMAX_TRACKED, sizeof(unsigned), CMK_LvaTable));
+ }
+
#ifdef DEBUG
// Re-Initialize to -1 for safety in debug build.
- memset(lvaTrackedToVarNum, -1, sizeof(lvaTrackedToVarNum));
+ memset(lvaTrackedToVarNum, -1, lclMAX_TRACKED);
#endif
/* Assign indices to all the variables we've decided to track */