diff options
Diffstat (limited to 'src/jit/optcse.cpp')
-rw-r--r-- | src/jit/optcse.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/jit/optcse.cpp b/src/jit/optcse.cpp index b93930b8ae..424939d9a2 100644 --- a/src/jit/optcse.cpp +++ b/src/jit/optcse.cpp @@ -381,7 +381,8 @@ bool Compiler::optCSE_canSwap(GenTreePtr tree) /***************************************************************************** * - * Compare function passed to qsort() by optLexicalOptimizeCSEs(). + * Compare function passed to qsort() by CSE_Heuristic::SortCandidates + * when (CodeOptKind() != Compiler::SMALL_CODE) */ /* static */ @@ -412,13 +413,14 @@ int __cdecl Compiler::optCSEcostCmpEx(const void *op1, const void *op2) if (diff != 0) return diff; - // In order to ensure that we have a stable sort the lower csdIndex towards to the top + // In order to ensure that we have a stable sort, we break ties using the csdIndex return (int) (dsc1->csdIndex - dsc2->csdIndex); } /***************************************************************************** * - * Compare function passed to qsort() by optLexicalOptimizeCSEs(). + * Compare function passed to qsort() by CSE_Heuristic::SortCandidates + * when (CodeOptKind() == Compiler::SMALL_CODE) */ /* static */ @@ -449,7 +451,7 @@ int __cdecl Compiler::optCSEcostCmpSz(const void *op1, const void *op2) if (diff != 0) return diff; - // In order to ensure that we have a stable sort the lower csdIndex towards to the top + // In order to ensure that we have a stable sort, we break ties using the csdIndex return (int)(dsc1->csdIndex - dsc2->csdIndex); } |