lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Alex Bradbury wrote:
> My hope is this will allow
> LuaJIT to optimise away instances of bit.bor($(imm), 0) and the like,
> which occur pretty frequently. Though I haven't checked to see if it
> does this yet.

It does. It has an extensive set of constant folding rules,
reassociation rules, strength-reduction rules and algebraic
simplifications.

If you notice a missing fold rule, it's quite easy to add it to
src/lj_opt_fold.c.

--Mike