Changes for Zero Asm Diffs
authorBrian Sullivan <briansul@microsoft.com>
Thu, 26 Oct 2017 20:36:23 +0000 (13:36 -0700)
committerBrian Sullivan <briansul@microsoft.com>
Thu, 26 Oct 2017 20:36:23 +0000 (13:36 -0700)
src/jit/flowgraph.cpp
src/jit/gentree.cpp
src/jit/importer.cpp
src/jit/morph.cpp

index a11f26e..603b03f 100644 (file)
@@ -7035,8 +7035,6 @@ GenTreeCall* Compiler::fgGetStaticsCCtorHelper(CORINFO_CLASS_HANDLE cls, CorInfo
     if (pmoduleID)
     {
         opModuleIDArg = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)pmoduleID, GTF_ICON_MID_HDL, true);
-        // This indirection also is invariant.
-        opModuleIDArg->gtFlags |= GTF_IND_INVARIANT;
     }
     else
     {
@@ -7047,7 +7045,7 @@ GenTreeCall* Compiler::fgGetStaticsCCtorHelper(CORINFO_CLASS_HANDLE cls, CorInfo
     {
         if (pclsID)
         {
-            opClassIDArg = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)pclsID, GTF_ICON_CLASS_HDL, true);
+            opClassIDArg = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)pclsID, GTF_ICON_CLASS_HDL, false);
         }
         else
         {
index 455c7e1..c7118d6 100644 (file)
@@ -6209,8 +6209,12 @@ GenTreePtr Compiler::gtNewIconEmbHndNode(void* value, void* pValue, unsigned ico
 
         // This indirection won't cause an exception.
         handleNode->gtFlags |= GTF_IND_NONFAULTING;
+#if 0
+        // It should also be invariant, but marking it as such leads to bad diffs.
+
         // This indirection also is invariant.
         handleNode->gtFlags |= GTF_IND_INVARIANT;
+#endif
     }
 
     iconNode->gtIntCon.gtCompileTimeHandle = (size_t)compileTimeHandle;
@@ -6227,7 +6231,7 @@ GenTreePtr Compiler::gtNewStringLiteralNode(InfoAccessType iat, void* pValue)
     {
         case IAT_PVALUE: // The value needs to be accessed via an indirection
             // Create an indirection
-            tree = gtNewIndOfIconHandleNode(TYP_REF, (size_t)pValue, GTF_ICON_STR_HDL, true);
+            tree = gtNewIndOfIconHandleNode(TYP_REF, (size_t)pValue, GTF_ICON_STR_HDL, false);
             break;
 
         case IAT_PPVALUE: // The value needs to be accessed via a double indirection
index 730f79e..7f8f49e 100644 (file)
@@ -3269,7 +3269,7 @@ GenTreePtr Compiler::impInitializeArrayIntrinsic(CORINFO_SIG_INFO* sig)
 
     GenTreePtr dst = gtNewOperNode(GT_ADD, TYP_BYREF, arrayLocalNode, gtNewIconNode(dataOffset, TYP_I_IMPL));
     GenTreePtr blk = gtNewBlockVal(dst, blkSize);
-    GenTreePtr src = gtNewIndOfIconHandleNode(TYP_STRUCT, (size_t)initData, GTF_ICON_STATIC_HDL, true);
+    GenTreePtr src = gtNewIndOfIconHandleNode(TYP_STRUCT, (size_t)initData, GTF_ICON_STATIC_HDL, false);
 
     return gtNewBlkOpNode(blk,     // dst
                           src,     // src
index a65b750..aea64a9 100644 (file)
@@ -6673,7 +6673,7 @@ GenTreePtr Compiler::fgMorphField(GenTreePtr tree, MorphAddrContext* mac)
             if (tree->gtField.gtFieldLookup.accessType == IAT_PVALUE)
             {
                 offsetNode = gtNewIndOfIconHandleNode(TYP_I_IMPL, (size_t)tree->gtField.gtFieldLookup.addr,
-                                                      GTF_ICON_FIELD_HDL, true);
+                                                      GTF_ICON_FIELD_HDL, false);
             }
             else
             {