diff options
author | Mike Danes <onemihaid@hotmail.com> | 2017-11-13 22:36:50 +0200 |
---|---|---|
committer | Mike Danes <onemihaid@hotmail.com> | 2018-07-19 07:29:44 +0300 |
commit | 72a1d0ee7c9f5989edc9f449df24b5b87a5844ce (patch) | |
tree | d0ee59011a0f538a9a129289c7285fadc4d51fd0 /src/jit/lclvars.cpp | |
parent | 624f72d55a92e49aef3c3cd6e69150fa3b085fac (diff) | |
download | coreclr-72a1d0ee7c9f5989edc9f449df24b5b87a5844ce.tar.gz coreclr-72a1d0ee7c9f5989edc9f449df24b5b87a5844ce.tar.bz2 coreclr-72a1d0ee7c9f5989edc9f449df24b5b87a5844ce.zip |
Eliminate duplicate SSA number bookkeeping
During SSA construction SsaRenameState keeps a definition count for each variable in an array. But each variable has a lvPerSsaData array that does almost the same thing, count the definitions. "Almost" because lvPerSsaData is a JitExpandArray that tracks only the array size and not the number of elements actually stored in the array.
Replace JitExpandArray with purposely designed "array" that is in charge with allocating new SSA numbers and handles their intricacies - RESERVED_SSA_NUM, UNINIT_SSA_NUM and FIRST_SSA_NUM.
This also allows the removal of the allocator from the array. Allocating new SSA numbers happens only during SSA construction and it's reasonable to pass the allocator to AllocSsaNum rather than increasing the size of PerSsaArray and LclVarDsc.
Diffstat (limited to 'src/jit/lclvars.cpp')
-rw-r--r-- | src/jit/lclvars.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/jit/lclvars.cpp b/src/jit/lclvars.cpp index b9b5038650..c034427362 100644 --- a/src/jit/lclvars.cpp +++ b/src/jit/lclvars.cpp @@ -221,7 +221,7 @@ void Compiler::lvaInitTypeRef() memset(lvaTable, 0, tableSize); for (unsigned i = 0; i < lvaTableCnt; i++) { - new (&lvaTable[i], jitstd::placement_t()) LclVarDsc(this); // call the constructor. + new (&lvaTable[i], jitstd::placement_t()) LclVarDsc(); // call the constructor. } //------------------------------------------------------------------------- |