Descriptioncmd/gc: don't give credit for NOPs during register allocation
The register allocator decides which variables should be placed into registers by charging for each load/store and crediting for each use, and then selecting an allocation with minimal cost. NOPs will be eliminated, however, so using a variable in a NOP should not generate credit.
Issue 7867 arises from attempted registerization of multi-word variables because they are used in NOPs. By not crediting for that use, they will no longer be considered for registerization.
This fix could theoretically lead to better register allocation, but NOPs are rare relative to other instructions.
Fixes issue 7867.
Patch Set 1 #Patch Set 2 : diff -r eba73fe6f55e https://code.google.com/p/go #Patch Set 3 : diff -r eba73fe6f55e https://code.google.com/p/go #Patch Set 4 : diff -r 8f49b5cc8196 https://code.google.com/p/go #
MessagesTotal messages: 9
|