Repository navigation
Closed
Labels
area-Infrastructure-coreclrOnly use for closed issues
Description
My pull request introduced some CoreCLR JIT format errors.
The format.patch artifact was corrupt. It contained superfluous diffs. The superfluous diffs included files from mono which my PR didn't touch as well as a diff of format.patch itself.
diff --git a/src/coreclr/format.patch b/src/coreclr/format.patch
index 3759a98..e69de29 100644
--- a/src/coreclr/format.patch
+++ b/src/coreclr/format.patch
@@ -1,47 +0,0 @@
-diff --git a/src/coreclr/src/jit/importer.cpp b/src/coreclr/src/jit/importer.cpp
-index a71c325ff48..c0569355c89 100644
---- a/src/coreclr/src/jit/importer.cpp
-+++ b/src/coreclr/src/jit/importer.cpp
-@@ -15184,41 +15184,41 @@ void Compiler::impImportBlockCode(BasicBlock* block)
- info.compCompHnd->compareTypesForEquality(resolvedToken.hClass, clsHnd);
-
- if (compare == TypeCompareState::Must)
- {
- JITDUMP("\nOptimizing %s (%s) -- type test will succeed\n",
- opcode == CEE_UNBOX ? "UNBOX" : "UNBOX.ANY", eeGetClassName(clsHnd));
-
- // For UNBOX, null check (if necessary), and then leave the box payload byref on the stack.
- if (opcode == CEE_UNBOX)
- {
- GenTree* cloneOperand;
- op1 = impCloneExpr(op1, &cloneOperand, NO_CLASS_HANDLE, (unsigned)CHECK_SPILL_ALL,
- nullptr DEBUGARG("optimized unbox clone"));
-
- GenTree* boxPayloadOffset = gtNewIconNode(TARGET_POINTER_SIZE, TYP_I_IMPL);
- GenTree* boxPayloadAddress =
- gtNewOperNode(GT_ADD, TYP_BYREF, cloneOperand, boxPayloadOffset);
- GenTree* nullcheck = gtNewOperNode(GT_NULLCHECK, TYP_I_IMPL, op1);
- block->bbFlags |= BBF_HAS_NULLCHECK;
- optMethodFlags |= OMF_HAS_NULLCHECK;
-- GenTree* result = gtNewOperNode(GT_COMMA, TYP_BYREF, nullcheck, boxPayloadAddress);
-+ GenTree* result = gtNewOperNode(GT_COMMA, TYP_BYREF, nullcheck, boxPayloadAddress);
- impPushOnStack(result, tiRetVal);
- break;
- }
-
- // For UNBOX.ANY load the struct from the box payload byref (the load will nullcheck)
- assert(opcode == CEE_UNBOX_ANY);
- GenTree* boxPayloadOffset = gtNewIconNode(TARGET_POINTER_SIZE, TYP_I_IMPL);
- GenTree* boxPayloadAddress = gtNewOperNode(GT_ADD, TYP_BYREF, op1, boxPayloadOffset);
- impPushOnStack(boxPayloadAddress, tiRetVal);
- oper = GT_OBJ;
- goto OBJ;
- }
- else
- {
- JITDUMP("\nUnable to optimize %s -- can't resolve type comparison\n",
- opcode == CEE_UNBOX ? "UNBOX" : "UNBOX.ANY");
- }
- }
- else
- {
diff --git a/src/coreclr/src/jit/codegencommon.cpp b/src/coreclr/src/jit/codegencommon.cpp
index f82cc2a..21f5f36 100644
--- a/src/coreclr/src/jit/codegencommon.cpp
+++ b/src/coreclr/src/jit/codegencommon.cpp
@@ -7415,41 +7415,41 @@ void CodeGen::genFnProlog()
#ifdef TARGET_ARM
/*-------------------------------------------------------------------------
*
* Now start emitting the part of the prolog which sets up the frame
*/
if (regSet.rsMaskPreSpillRegs(true) != RBM_NONE)
{
inst_IV(INS_push, (int)regSet.rsMaskPreSpillRegs(true));
compiler->unwindPushMaskInt(regSet.rsMaskPreSpillRegs(true));
}
#endif // TARGET_ARM
#ifdef TARGET_XARCH
if (doubleAlignOrFramePointerUsed())
{
inst_RV(INS_push, REG_FPBASE, TYP_REF);
compiler->unwindPush(REG_FPBASE);
#ifdef USING_SCOPE_INFO
psiAdjustStackLevel(REGSIZE_BYTES);
-#endif // USING_SCOPE_INFO
+#endif // USING_SCOPE_INFO
#ifndef TARGET_AMD64 // On AMD64, establish the frame pointer after the "sub rsp"
genEstablishFramePointer(0, /*reportUnwindData*/ true);
#endif // !_TARGET_AMD64_
#if DOUBLE_ALIGN
if (compiler->genDoubleAlign())
{
noway_assert(isFramePointerUsed() == false);
noway_assert(!regSet.rsRegsModified(RBM_FPBASE)); /* Trashing EBP is out. */
inst_RV_IV(INS_AND, REG_SPBASE, -8, EA_PTRSIZE);
}
#endif // DOUBLE_ALIGN
}
#endif // TARGET_XARCH
#ifdef TARGET_ARM64
// Probe large frames now, if necessary, since genPushCalleeSavedRegisters() will allocate the frame. Note that
// for arm64, genAllocLclFrame only probes the frame; it does not actually allocate it (it does not change SP).
// For arm64, we are probing the frame before the callee-saved registers are saved. The 'initReg' might have
diff --git a/src/coreclr/src/jit/emit.cpp b/src/coreclr/src/jit/emit.cpp
index cfa4b1f..236eceb 100644
--- a/src/coreclr/src/jit/emit.cpp
+++ b/src/coreclr/src/jit/emit.cpp
@@ -7002,41 +7002,41 @@ void emitter::emitNxtIG(bool extend)
{
emitCurIG->igFlags |= IGF_EXTEND;
#if EMITTER_STATS
emitTotalIGExtend++;
#endif // EMITTER_STATS
}
// We've created a new IG; no need to force another one.
emitForceNewIG = false;
}
/*****************************************************************************
*
* emitGetInsSC: Get the instruction's constant value.
*/
target_ssize_t emitter::emitGetInsSC(instrDesc* id)
{
#ifdef TARGET_ARM // should it be TARGET_ARMARCH? Why do we need this? Note that on ARM64 we store scaled immediates
- // for some formats
+ // for some formats
if (id->idIsLclVar())
{
int varNum = id->idAddr()->iiaLclVar.lvaVarNum();
regNumber baseReg;
int offs = id->idAddr()->iiaLclVar.lvaOffset();
#if defined(TARGET_ARM)
int adr =
emitComp->lvaFrameAddress(varNum, id->idIsLclFPBase(), &baseReg, offs, CodeGen::instIsFP(id->idIns()));
int dsp = adr + offs;
if ((id->idIns() == INS_sub) || (id->idIns() == INS_subw))
dsp = -dsp;
#elif defined(TARGET_ARM64)
// TODO-ARM64-Cleanup: this is currently unreachable. Do we need it?
bool FPbased;
int adr = emitComp->lvaFrameAddress(varNum, &FPbased);
int dsp = adr + offs;
if (id->idIns() == INS_sub)
dsp = -dsp;
#endif
diff --git a/src/coreclr/src/jit/simd.cpp b/src/coreclr/src/jit/simd.cpp
index cb925b5..c128b92 100644
--- a/src/coreclr/src/jit/simd.cpp
+++ b/src/coreclr/src/jit/simd.cpp
@@ -1713,41 +1713,41 @@ GenTree* Compiler::impSIMDAbs(CORINFO_CLASS_HANDLE typeHnd, var_types baseType,
// Abs is a no-op on unsigned integer type vectors
retVal = op1;
}
else
{
assert(getSIMDSupportLevel() >= SIMD_SSE4_Supported);
assert(baseType != TYP_LONG);
retVal = gtNewSIMDNode(simdType, op1, SIMDIntrinsicAbs, baseType, size);
}
#elif defined(TARGET_ARM64)
if (varTypeIsUnsigned(baseType))
{
// Abs is a no-op on unsigned integer type vectors
retVal = op1;
}
else
{
retVal = gtNewSIMDNode(simdType, op1, SIMDIntrinsicAbs, baseType, size);
}
-#else // !defined(_TARGET_XARCH)_ && !defined(TARGET_ARM64)
+#else // !defined(_TARGET_XARCH)_ && !defined(TARGET_ARM64)
assert(!"Abs intrinsic on non-xarch target not implemented");
#endif // !_TARGET_XARCH_
return retVal;
}
// Creates a GT_SIMD tree for Select operation
//
// Arguments:
// typeHnd - type handle of SIMD vector
// baseType - base type of SIMD vector
// size - SIMD vector size
// op1 - first operand = Condition vector vc
// op2 - second operand = va
// op3 - third operand = vb
//
// Return Value:
// Returns GT_SIMD tree that computes Select(vc, va, vb)
//
GenTree* Compiler::impSIMDSelect(
diff --git a/src/mono/mono/arch/arm/arm-wmmx.h b/src/mono/mono/arch/arm/arm-wmmx.h
index e43ac77..6f2fc78 100644
--- a/src/mono/mono/arch/arm/arm-wmmx.h
+++ b/src/mono/mono/arch/arm/arm-wmmx.h
@@ -1,178 +1,178 @@
-/*
- * ARM CodeGen
- * XScale WirelessMMX extensions
- * Copyright 2002 Wild West Software
- * Licensed under the MIT license. See LICENSE file in the project root for full license information.
- */
-
- }
-}
Truncated ....
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Debug",
+ "System": "Information",
+ "Microsoft": "Information"
+ }
+ }
+}
diff --git a/src/mono/netcore/sample/AspNetCore/appsettings.json b/src/mono/netcore/sample/AspNetCore/appsettings.json
index 81ff877..d9d9a9b 100644
--- a/src/mono/netcore/sample/AspNetCore/appsettings.json
+++ b/src/mono/netcore/sample/AspNetCore/appsettings.json
@@ -1,10 +1,10 @@
-{
- "Logging": {
- "LogLevel": {
- "Default": "Information",
- "Microsoft": "Warning",
- "Microsoft.Hosting.Lifetime": "Information"
- }
- },
- "AllowedHosts": "*"
-}
+{
+ "Logging": {
+ "LogLevel": {
+ "Default": "Information",
+ "Microsoft": "Warning",
+ "Microsoft.Hosting.Lifetime": "Information"
+ }
+ },
+ "AllowedHosts": "*"
+}Metadata
Metadata
Assignees
Labels
area-Infrastructure-coreclrOnly use for closed issues
Activity
lpereira commentedon Jan 29, 2020
I know that Mono has some
.gitattributesforcing some files to have CRLF line endings (I don't know about why; the source history wasn't much helpful; maybe those files should be nuked?). Maybe related?sdmaclea commentedon Jan 29, 2020
sdmaclea commentedon Jan 29, 2020
Looks like #1735 added format.patch into src/coreclr. @erozenfeld I assume this was accidental.
Created #2323... Merged the format.patch part of the issue is resolved. The mono part still needs investigation.
sdmaclea commentedon Jan 29, 2020
@BruceForstall I was pretty sure the format checking used to only check the coreclr src/jit directory. Perhaps mono also support format checking, but their formatting is broken...
BruceForstall commentedon Jan 29, 2020
Yes, the format job should only check src/coreclr/src/jit. If that's not true, it's a bug.
sdmaclea commentedon Jan 29, 2020
So I understand the failure. @lpereira guess was good.
From the logs
So part of the problem is that the jit diff is generated by running clang-tidy to modify the files in place. Then we run
git diffon the repo whole to generate the patch. Because these files are in the repo wrong they show up in the diff.We can make this more robust by only running the git diff on
src/coreclr/src/jitBruceForstall commentedon Jan 29, 2020
Related: #2222