// This file is part of the Luau programming language and is licensed under MIT License; see LICENSE.txt for details #pragma once #include "Luau/IrData.h" #include #include namespace Luau { namespace CodeGen { struct CfgInfo; const char* getCmdName(IrCmd cmd); const char* getBlockKindName(IrBlockKind kind); struct IrToStringContext { std::string& result; std::vector& blocks; std::vector& constants; CfgInfo& cfg; }; void toString(IrToStringContext& ctx, const IrInst& inst, uint32_t index); void toString(IrToStringContext& ctx, const IrBlock& block, uint32_t index); // Block title void toString(IrToStringContext& ctx, IrOp op); void toString(std::string& result, IrConst constant); void toStringDetailed(IrToStringContext& ctx, const IrInst& inst, uint32_t index, bool includeUseInfo); void toStringDetailed(IrToStringContext& ctx, const IrBlock& block, uint32_t index, bool includeUseInfo); // Block title std::string toString(IrFunction& function, bool includeUseInfo); std::string dump(IrFunction& function); std::string toDot(IrFunction& function, bool includeInst); std::string dumpDot(IrFunction& function, bool includeInst); } // namespace CodeGen } // namespace Luau