* of operands the tree will push on the x87 (coprocessor) stack. Also sets
* genFPstkLevel, tmpDoubleSpillMax, and possibly gtFPstLvlRedo.
* 5. Sometimes sets GTF_ADDRMODE_NO_CSE on nodes in the tree.
- * 6. DEBUG-only: clears GTF_DEBUG_MORPHED.
+ * 6. DEBUG-only: clears GTF_DEBUG_NODE_MORPHED.
*/
#ifdef _PREFAST_
assert(tree->gtOper != GT_STMT);
#ifdef DEBUG
- /* Clear the GTF_DEBUG_MORPHED flag as well */
- tree->gtDebugFlags &= ~GTF_DEBUG_MORPHED;
+ /* Clear the GTF_DEBUG_NODE_MORPHED flag as well */
+ tree->gtDebugFlags &= ~GTF_DEBUG_NODE_MORPHED;
#endif
/* Is this a FP value? */
}
copy->gtFlags |= tree->gtFlags & ~GTF_NODE_MASK;
+#if defined(DEBUG)
+ copy->gtDebugFlags |= tree->gtDebugFlags & ~GTF_DEBUG_NODE_MASK;
+#endif // defined(DEBUG)
+
return copy;
}
}
// We can call gtCloneExpr() before we have called fgMorph when we expand a GT_INDEX node in fgMorphArrayIndex()
- // The method gtFoldExpr() expects to be run after fgMorph so it will set the GTF_DEBUG_MORPHED
+ // The method gtFoldExpr() expects to be run after fgMorph so it will set the GTF_DEBUG_NODE_MORPHED
// flag on nodes that it adds/modifies. Then when we call fgMorph we will assert.
// We really only will need to fold when this method is used to replace references to
// local variable with an integer.
/* GTF_COLON_COND should be propagated from 'tree' to 'copy' */
copy->gtFlags |= (tree->gtFlags & GTF_COLON_COND);
+#if defined(DEBUG)
+ // Non-node debug flags should be propagated from 'tree' to 'copy'
+ copy->gtDebugFlags |= (tree->gtDebugFlags & ~GTF_DEBUG_NODE_MASK);
+#endif
+
/* Make sure to copy back fields that may have been initialized */
copy->CopyRawCosts(tree);
printf("%c", (flags & GTF_CALL ) ? 'C' : '-');
printf("%c", (flags & GTF_EXCEPT ) ? 'X' : '-');
printf("%c", (flags & GTF_GLOB_REF ) ? 'G' : '-');
- printf("%c", (debugFlags & GTF_DEBUG_MORPHED) ? '+' : // First print '+' if GTF_DEBUG_MORPHED is set
+ printf("%c", (debugFlags & GTF_DEBUG_NODE_MORPHED) ? '+' : // First print '+' if GTF_DEBUG_NODE_MORPHED is set
(flags & GTF_ORDER_SIDEEFF ) ? 'O' : '-'); // otherwise print 'O' or '-'
printf("%c", (flags & GTF_COLON_COND ) ? '?' : '-');
printf("%c", (flags & GTF_DONT_CSE ) ? 'N' : // N is for No cse
}
}
- assert(!fgGlobalMorph || (arrElem->gtDebugFlags & GTF_DEBUG_MORPHED));
+ assert(!fgGlobalMorph || (arrElem->gtDebugFlags & GTF_DEBUG_NODE_MORPHED));
addr = arrElem->gtOp.gtOp1;
copyBlk = fgMorphTree(copyBlk);
GenTree* result = gtNewOperNode(GT_COMMA, TYP_VOID, call, copyBlk);
#ifdef DEBUG
- result->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ result->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
return result;
}
}
#ifdef DEBUG
- tree->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
if (verbose)
{
}
#ifdef DEBUG
- tree->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
if (verbose)
{
GenTree* op2 = gtNewIconNode(index);
tree = gtNewSIMDNode(baseType, simdStructNode, op2, SIMDIntrinsicGetItem, baseType, simdSize);
#ifdef DEBUG
- tree->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
}
return tree;
gtNewIconNode(simdSize),
false);
#ifdef DEBUG
- tree->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
}
{
GenTreePtr zeroNode = gtNewZeroConNode(typ);
#ifdef DEBUG
- zeroNode->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ zeroNode->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
DEBUG_DESTROY_NODE(tree);
return zeroNode;
commaNode->gtType = typ;
commaNode->gtFlags = (treeFlags & ~GTF_REVERSE_OPS); // Bashing the GT_COMMA flags here is dangerous, clear the GTF_REVERSE_OPS at least.
#ifdef DEBUG
- commaNode->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ commaNode->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
while (commaNode->gtOp.gtOp2->gtOper == GT_COMMA)
{
commaNode->gtType = typ;
commaNode->gtFlags = (treeFlags & ~GTF_REVERSE_OPS); // Bashing the GT_COMMA flags here is dangerous, clear the GTF_REVERSE_OPS at least.
#ifdef DEBUG
- commaNode->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ commaNode->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
}
bool wasArrIndex = (tree->gtFlags & GTF_IND_ARR_INDEX) != 0;
GetArrayInfoMap()->Set(op1, arrInfo);
}
#ifdef DEBUG
- op1->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ op1->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
commaNode->gtOp.gtOp2 = op1;
return tree;
{
commaNode->gtType = op1->gtType; commaNode->gtFlags |= op1->gtFlags;
#ifdef DEBUG
- commaNode->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ commaNode->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
commaNode = commaNode->gtOp.gtOp2;
}
GenTree* sub = gtNewOperNode(GT_SUB, type, numerator, mul);
#ifdef DEBUG
- sub->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ sub->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
return sub;
GenTree* sub = gtNewOperNode(GT_SUB, type, gtCloneExpr(numerator), mul);
#ifdef DEBUG
- sub->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ sub->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
return sub;
DISPTREE(result);
#ifdef DEBUG
- result->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ result->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
return result;
if (fgGlobalMorph)
{
/* Ensure that we haven't morphed this node already */
- assert(((tree->gtDebugFlags & GTF_DEBUG_MORPHED) == 0) && "ERROR: Already morphed this node!");
+ assert(((tree->gtDebugFlags & GTF_DEBUG_NODE_MORPHED) == 0) && "ERROR: Already morphed this node!");
#if LOCAL_ASSERTION_PROP
/* Before morphing the tree, we try to propagate any active assertions */
*
* This function is called to complete the morphing of a tree node
* It should only be called once for each node.
- * If DEBUG is defined the flag GTF_DEBUG_MORPHED is checked and updated,
+ * If DEBUG is defined the flag GTF_DEBUG_NODE_MORPHED is checked and updated,
* to enforce the invariant that each node is only morphed once.
* If LOCAL_ASSERTION_PROP is enabled the result tree may be replaced
* by an equivalent tree.
if ((oldTree != NULL) && (oldTree != tree))
{
/* Ensure that we have morphed this node */
- assert((tree->gtDebugFlags & GTF_DEBUG_MORPHED) && "ERROR: Did not morph this node!");
+ assert((tree->gtDebugFlags & GTF_DEBUG_NODE_MORPHED) && "ERROR: Did not morph this node!");
#ifdef DEBUG
TransferTestDataToNode(oldTree, tree);
else
{
// Ensure that we haven't morphed this node already
- assert(((tree->gtDebugFlags & GTF_DEBUG_MORPHED) == 0) && "ERROR: Already morphed this node!");
+ assert(((tree->gtDebugFlags & GTF_DEBUG_NODE_MORPHED) == 0) && "ERROR: Already morphed this node!");
}
if (tree->OperKind() & GTK_CONST)
#ifdef DEBUG
/* Mark this node as being morphed */
- tree->gtDebugFlags |= GTF_DEBUG_MORPHED;
+ tree->gtDebugFlags |= GTF_DEBUG_NODE_MORPHED;
#endif
}
but the flag still got set, clear it here... */
#ifdef DEBUG
- tree->gtDebugFlags &= ~GTF_DEBUG_MORPHED;
+ tree->gtDebugFlags &= ~GTF_DEBUG_NODE_MORPHED;
#endif
noway_assert(compTailCallUsed);
noway_assert((tree->gtOper == GT_CALL) && tree->AsCall()->IsTailCall());