Fix Unix preallocatedArgCount
authorCarol Eidt <carol.eidt@microsoft.com>
Mon, 10 Sep 2018 18:22:20 +0000 (11:22 -0700)
committerCarol Eidt <carol.eidt@microsoft.com>
Mon, 10 Sep 2018 18:26:05 +0000 (11:26 -0700)
This has been an existing ToDo for some time.
This results in 19 bytes reduction in code size for pmi diffs of tests and frameworks.

src/jit/morph.cpp

index 2868c36b00b4a826b957c46ba0bd79f1dea6e552..06446bcc96eadaf79416e81f8fd7db99e0ba2147 100644 (file)
@@ -4351,18 +4351,7 @@ GenTreeCall* Compiler::fgMorphArgs(GenTreeCall* call)
 
 #if defined(UNIX_AMD64_ABI)
         opts.compNeedToAlignFrame = true; // this is currently required for the UNIX ABI to work correctly
-
-        // ToDo: Remove this re-calculation preallocatedArgCount and use the value assigned above.
-
-        // First slots go in registers only, no stack needed.
-        // TODO-Amd64-Unix-CQ This calculation is only accurate for integer arguments,
-        // and ignores floating point args (it is overly conservative in that case).
-        preallocatedArgCount = nonRegPassedStructSlots;
-        if (argSlots > MAX_REG_ARG)
-        {
-            preallocatedArgCount += argSlots - MAX_REG_ARG;
-        }
-#endif // UNIX_AMD64_ABI
+#endif                                    // UNIX_AMD64_ABI
 
         const unsigned outgoingArgSpaceSize = preallocatedArgCount * REGSIZE_BYTES;
         call->fgArgInfo->SetOutArgSize(max(outgoingArgSpaceSize, MIN_ARG_AREA_FOR_CALL));