Rename cseArrLenMap to optCseArrLenMap
authorJoseph Tremoulet <jotrem@microsoft.com>
Thu, 16 Feb 2017 21:53:47 +0000 (13:53 -0800)
committerJoseph Tremoulet <jotrem@microsoft.com>
Thu, 16 Feb 2017 21:53:47 +0000 (13:53 -0800)
This lines up better with other names in code that optimizes common sub-
expressions.

Commit migrated from https://github.com/dotnet/coreclr/commit/1dbbc0f6433e8fd6c06b925af23d6756d51c24ce

src/coreclr/src/jit/compiler.h
src/coreclr/src/jit/optcse.cpp

index d92c9fb..fa03eb0 100644 (file)
@@ -5412,11 +5412,11 @@ protected:
 
     typedef SimplerHashTable<GenTreePtr, PtrKeyFuncs<GenTree>, GenTreePtr, JitSimplerHashBehavior> NodeToNodeMap;
 
-    NodeToNodeMap* cseArrLenMap; // Maps array length nodes to ancestor compares that should be
-                                 // re-numbered with the array length to improve range check elimination
+    NodeToNodeMap* optCseArrLenMap; // Maps array length nodes to ancestor compares that should be
+                                    // re-numbered with the array length to improve range check elimination
 
     // Given a compare, look for a cse candidate arrlen feeding it and add a map entry if found.
-    void updateCseArrLenMap(GenTreePtr compare);
+    void optCseUpdateArrLenMap(GenTreePtr compare);
 
     void optCSEstop();
 
index 6b1c2bd..c5c0f97 100644 (file)
@@ -510,8 +510,8 @@ void Compiler::optValnumCSE_Init()
     optCSECandidateCount = 0;
     optDoCSE             = false; // Stays false until we find duplicate CSE tree
 
-    // cseArrLenMap is unused in most functions, allocated only when used
-    cseArrLenMap = nullptr;
+    // optCseArrLenMap is unused in most functions, allocated only when used
+    optCseArrLenMap = nullptr;
 }
 
 /*****************************************************************************
@@ -711,7 +711,7 @@ unsigned Compiler::optValnumCSE_Locate()
                     // Check if this compare is a function of (one of) the arrary
                     // length candidate(s); we may want to update its value number
                     // if the array length gets CSEd
-                    updateCseArrLenMap(tree);
+                    optCseUpdateArrLenMap(tree);
                 }
 
                 if (!optIsCSEcandidate(tree))
@@ -766,16 +766,16 @@ unsigned Compiler::optValnumCSE_Locate()
 }
 
 //------------------------------------------------------------------------
-// updateCseArrLenMap: Check if this compare is a tractable function of
+// optCseUpdateArrLenMap: Check if this compare is a tractable function of
 //                     an array length that is a CSE candidate, and insert
-//                     an entry in the cseArrLenMap if so.  This facilitates
+//                     an entry in the optCseArrLenMap if so.  This facilitates
 //                     subsequently updating the compare's value number if
 //                     the array length gets CSEd.
 //
 // Arguments:
 //    compare - The compare node to check
 
-void Compiler::updateCseArrLenMap(GenTreePtr compare)
+void Compiler::optCseUpdateArrLenMap(GenTreePtr compare)
 {
     assert(compare->OperIsCompare());
 
@@ -850,13 +850,13 @@ void Compiler::updateCseArrLenMap(GenTreePtr compare)
             // record this in the map so we can update the compare VN if the array length
             // node gets CSEd.
 
-            if (cseArrLenMap == nullptr)
+            if (optCseArrLenMap == nullptr)
             {
                 // Allocate map on first use.
-                cseArrLenMap = new (getAllocator()) NodeToNodeMap(getAllocator());
+                optCseArrLenMap = new (getAllocator()) NodeToNodeMap(getAllocator());
             }
 
-            cseArrLenMap->Set(arrLen, compare);
+            optCseArrLenMap->Set(arrLen, compare);
         }
     }
 }
@@ -2024,8 +2024,8 @@ public:
                     cse->gtVNPair.SetConservative(defConservativeVN);
 
                     GenTreePtr cmp;
-                    if ((exp->OperGet() == GT_ARR_LENGTH) && (m_pCompiler->cseArrLenMap != nullptr) &&
-                        (m_pCompiler->cseArrLenMap->Lookup(exp, &cmp)))
+                    if ((exp->OperGet() == GT_ARR_LENGTH) && (m_pCompiler->optCseArrLenMap != nullptr) &&
+                        (m_pCompiler->optCseArrLenMap->Lookup(exp, &cmp)))
                     {
                         // Propagate the new value number to this compare node as well, since
                         // subsequent range check elimination will try to correlate it with