Repository: dotnet/runtime
File: src/coreclr/jit/lower.cpp (C++)

Code before:
            assert(comp->fgFirstBB == comp->compCurBB);
            GenTree* noOp = new (comp, GT_NO_OP) GenTree(GT_NO_OP, TYP_VOID);
            BlockRange().InsertBefore(startNonGCNode, noOp);
        }
    }

    // Insert GT_PROF_HOOK node to emit profiler tail call hook. This should be
    // inserted before the args are setup but after the side effects of args are
    // computed. That is, GT_PROF_HOOK node needs to be inserted before GT_START_NONGC
    // node if one exists.
    if (comp->compIsProfilerHookNeeded())
    {
        InsertProfTailCallHook(call, startNonGCNode);
    }

#else // !FEATURE_FASTTAILCALL

    // Platform does not implement fast tail call mechanism. This cannot be
    // reached because we always choose to do a tailcall via helper on those
    // platforms (or no tailcall at all).
    unreached();
#endif
}

//------------------------------------------------------------------------
// FirstEvaluatedOperand:
//   Find the earliest operand of a node.
//
// Arguments:
//   node - The node
//
// Returns:
//   The earliest evaluated operand.
//
GenTree* Lowering::FirstOperand(GenTree* node)
{
    struct Helper
    {
        GenTree* Result = nullptr;

        void Visit(GenTree* node)
        {
            node->VisitOperands([=](GenTree* op) {
                Result = Result == nullptr ? op : LIR::FirstNode(Result, op);

                if (op->isContained())
                {
                    Visit(op);
                }

                return GenTree::VisitResult::Continue;

Review comment (suggestion):
The function name in the documentation comment is `FirstEvaluatedOperand`, but the actual function name is `FirstOperand`. These should match.
```suggestion
// FirstOperand:
```

Code after:
            BlockRange().InsertBefore(startNonGCNode, noOp);
        }
    }

    // Insert GT_PROF_HOOK node to emit profiler tail call hook. This should be
    // inserted before the args are setup but after the side effects of args are
    // computed. That is, GT_PROF_HOOK node needs to be inserted before GT_START_NONGC
    // node if one exists.
    if (comp->compIsProfilerHookNeeded())
    {
        InsertProfTailCallHook(call, startNonGCNode);
    }

#else // !FEATURE_FASTTAILCALL

    // Platform does not implement fast tail call mechanism. This cannot be
    // reached because we always choose to do a tailcall via helper on those
    // platforms (or no tailcall at all).
    unreached();
#endif
}

//------------------------------------------------------------------------
// FirstOperand:
//   Find the earliest operand of a node.
//
// Arguments:
//   node - The node
//
// Returns:
//   The earliest evaluated operand.
//
GenTree* Lowering::FirstOperand(GenTree* node)
{
    struct Helper
    {
        GenTree* Result = nullptr;

        void Visit(GenTree* node)
        {
            node->VisitOperands([=](GenTree* op) {
                Result = Result == nullptr ? op : LIR::FirstNode(Result, op);

                if (op->isContained())
                {
                    Visit(op);
                }

                return GenTree::VisitResult::Continue;
            });
        }