Repository: dotnet/runtime
File: src/coreclr/jit/compiler.h (C/C++)

Code before:

        SpecialCodeKind acdKind;
        unsigned acdData;
    };

    typedef JitHashTable<AddCodeDscKey, AddCodeDscKey, AddCodeDsc*> AddCodeDscMap;
    AddCodeDscMap* fgGetAddCodeDscMap();

private:
    static unsigned acdHelper(SpecialCodeKind codeKind);

    AddCodeDscMap* fgAddCodeDscMap = nullptr;
    AddCodeDsc* fgCreateAddCodeDsc(BasicBlock* fromBlock, SpecialCodeKind kind);
    void fgCreateThrowHelperBlock(AddCodeDsc* add);

public:

    bool fgRngChkThrowAdded = false;
    bool fgHasAddCodeDscMap() const { return fgAddCodeDscMap != nullptr; }
    AddCodeDsc* fgGetExcptnTarget(SpecialCodeKind kind, BasicBlock* fromBlock, bool createIfNeeded = false);
    bool fgUseThrowHelperBlocks();
    void fgCreateThrowHelperBlockCode(AddCodeDsc* add);
    void fgSequenceLocals(Statement* stmt);

private:
    bool fgIsThrowHlpBlk(BasicBlock* block);

#if !FEATURE_FIXED_OUT_ARGS
    unsigned fgThrowHlpBlkStkLevel(BasicBlock* block);
#endif // !FEATURE_FIXED_OUT_ARGS

    unsigned fgCheckInlineDepthAndRecursion(InlineInfo* inlineInfo);
    bool IsDisallowedRecursiveInline(InlineContext* ancestor, InlineInfo* inlineInfo);
    bool ContextComplexityExceeds(CORINFO_CONTEXT_HANDLE handle, int max);
    bool MethodInstantiationComplexityExceeds(CORINFO_METHOD_HANDLE handle, int& cur, int max);
    bool TypeInstantiationComplexityExceeds(CORINFO_CLASS_HANDLE handle, int& cur, int max);

    void fgInvokeInlineeCompiler(GenTreeCall* call, InlineResult* result, InlineContext** createdContext);
    void fgInsertInlineeBlocks(InlineInfo* pInlineInfo);
    void fgInsertInlineeArgument(const InlArgInfo& argInfo, BasicBlock* block, Statement** afterStmt, Statement** newStmt, const DebugInfo& callDI);
    Statement* fgInlinePrependStatements(InlineInfo* inlineInfo);
    void fgInlineAppendStatements(InlineInfo* inlineInfo, BasicBlock* block, Statement* stmt);

#ifdef DEBUG
    static fgWalkPreFn fgDebugCheckInlineCandidates;

    void               CheckNoTransformableIndirectCallsRemain();
    static fgWalkPreFn fgDebugCheckForTransformableIndirectCalls;
#endif

    PhaseStatus fgPromoteStructs();

Review comment (refactor):
`fgSetThrowHelpBlockLiveness` appears to be an internal helper only used by `Compiler` methods; it likely doesn't need to be in the public section of `Compiler`. Consider moving it to the private area alongside the other throw-helper block helpers to reduce the exposed surface.
```suggestion
    void fgSequenceLocals(Statement* stmt);

private:
    void fgSetThrowHelpBlockLiveness(BasicBlock* block);
```

Code after:

        SpecialCodeKind acdKind;
        unsigned acdData;
    };

    typedef JitHashTable<AddCodeDscKey, AddCodeDscKey, AddCodeDsc*> AddCodeDscMap;
    AddCodeDscMap* fgGetAddCodeDscMap();

private:
    static unsigned acdHelper(SpecialCodeKind codeKind);

    AddCodeDscMap* fgAddCodeDscMap = nullptr;
    AddCodeDsc* fgCreateAddCodeDsc(BasicBlock* fromBlock, SpecialCodeKind kind);
    void fgCreateThrowHelperBlock(AddCodeDsc* add);

public:

    bool fgRngChkThrowAdded = false;
    bool fgHasAddCodeDscMap() const { return fgAddCodeDscMap != nullptr; }
    AddCodeDsc* fgGetExcptnTarget(SpecialCodeKind kind, BasicBlock* fromBlock, bool createIfNeeded = false);
    bool fgUseThrowHelperBlocks();
    void fgCreateThrowHelperBlockCode(AddCodeDsc* add);
    void fgSetThrowHelpBlockLiveness(BasicBlock* block);
    void fgSequenceLocals(Statement* stmt);

private:
    bool fgIsThrowHlpBlk(BasicBlock* block);

#if !FEATURE_FIXED_OUT_ARGS
    unsigned fgThrowHlpBlkStkLevel(BasicBlock* block);
#endif // !FEATURE_FIXED_OUT_ARGS

    unsigned fgCheckInlineDepthAndRecursion(InlineInfo* inlineInfo);
    bool IsDisallowedRecursiveInline(InlineContext* ancestor, InlineInfo* inlineInfo);
    bool ContextComplexityExceeds(CORINFO_CONTEXT_HANDLE handle, int max);
    bool MethodInstantiationComplexityExceeds(CORINFO_METHOD_HANDLE handle, int& cur, int max);
    bool TypeInstantiationComplexityExceeds(CORINFO_CLASS_HANDLE handle, int& cur, int max);

    void fgInvokeInlineeCompiler(GenTreeCall* call, InlineResult* result, InlineContext** createdContext);
    void fgInsertInlineeBlocks(InlineInfo* pInlineInfo);
    void fgInsertInlineeArgument(const InlArgInfo& argInfo, BasicBlock* block, Statement** afterStmt, Statement** newStmt, const DebugInfo& callDI);
    Statement* fgInlinePrependStatements(InlineInfo* inlineInfo);
    void fgInlineAppendStatements(InlineInfo* inlineInfo, BasicBlock* block, Statement* stmt);

#ifdef DEBUG
    static fgWalkPreFn fgDebugCheckInlineCandidates;

    void               CheckNoTransformableIndirectCallsRemain();
    static fgWalkPreFn fgDebugCheckForTransformableIndirectCalls;
#endif