mirror of
https://github.com/luau-lang/luau.git
synced 2024-12-13 05:20:38 +00:00
1fa8311a18
* Fix #817 * Fix #850 * Optimize math.floor/ceil/round with SSE4.1 * Results in a ~7-9% speedup on the math-cordic benchmark. * Optimized table.sort. * table.sort is now ~4.1x faster (when not using a predicate) and ~2.1x faster when using a simple predicate. Performance may improve further in the future. * Reorganize the memory ownership of builtin type definitions. * This is a small initial step toward affording parallel typechecking. The new type solver is coming along nicely. We are working on fixing crashes and bugs. A few major changes to native codegen landed this week: * Fixed lowering of Luau IR mod instruction when first argument is a constant * Added VM register data-flow/capture analysis * Fixed issues with optimizations in unreachable blocks --------- Co-authored-by: Arseny Kapoulkine <arseny.kapoulkine@gmail.com> Co-authored-by: Vyacheslav Egorov <vegorov@roblox.com>
41 lines
1.1 KiB
C++
41 lines
1.1 KiB
C++
// 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 <string>
|
|
#include <vector>
|
|
|
|
namespace Luau
|
|
{
|
|
namespace CodeGen
|
|
{
|
|
|
|
struct CfgInfo;
|
|
|
|
const char* getCmdName(IrCmd cmd);
|
|
const char* getBlockKindName(IrBlockKind kind);
|
|
|
|
struct IrToStringContext
|
|
{
|
|
std::string& result;
|
|
std::vector<IrBlock>& blocks;
|
|
std::vector<IrConst>& 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);
|
|
|
|
} // namespace CodeGen
|
|
} // namespace Luau
|