Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/coreclr/jit/compiler.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1849,7 +1849,7 @@ inline GenTree* Compiler::gtNewNothingNode()

inline bool GenTree::IsNothingNode() const
{
return OperIs(GT_NOP) && TypeIs(TYP_VOID);
return OperIs(GT_NOP);
}

/*****************************************************************************
Expand Down
16 changes: 1 addition & 15 deletions src/coreclr/jit/gentree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20412,21 +20412,7 @@ bool GenTree::canBeContained() const
bool GenTree::isContained() const
{
assert(OperIsLIR());
const bool isMarkedContained = ((gtFlags & GTF_CONTAINED) != 0);

#ifdef DEBUG
if (!canBeContained())
{
assert(!isMarkedContained);
}

// if it's contained it can't be unused.
if (isMarkedContained)
{
assert(!IsUnusedValue());
}
#endif // DEBUG
return isMarkedContained;
return (gtFlags & GTF_CONTAINED) != 0;
}

// return true if node is contained and an indir
Expand Down
6 changes: 0 additions & 6 deletions src/coreclr/jit/gentree.h
Original file line number Diff line number Diff line change
Expand Up @@ -1939,12 +1939,6 @@ struct GenTree

bool OperIsLIR() const
{
if (OperIs(GT_NOP))
{
// NOPs may only be present in LIR if they do not produce a value.
return IsNothingNode();
}

return (DebugOperKind() & DBK_NOTLIR) == 0;
}

Expand Down
6 changes: 6 additions & 0 deletions src/coreclr/jit/lir.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1630,6 +1630,12 @@ bool LIR::Range::CheckLIR(Compiler* compiler, bool checkUnusedValues) const
// Verify that the node is allowed in LIR.
assert(node->OperIsLIR());

if (node->isContained())
{
assert(node->canBeContained());
assert(!node->IsUnusedValue());
}

// Some nodes should never be marked unused, as they must be contained in the backend.
// These may be marked as unused during dead code elimination traversal, but they *must* be subsequently
// removed.
Expand Down
Loading