lua-users home
lua-l archive

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


Hello all,
still in the context of asm-from-one-machine to lua translation, I am
facing some difficulties.
For various reasons (mostly because the machine I am simulating is a
SIMD vector machine), I need to handle forward jumps with the idiom:

while true do
{... a lot of compute ...}
if some_condition_on_the_lane_of_the_simd_vector then break end
{... a lot of compute ...}
break -- this one is to exit anyway
end

So, basic blocks are handled with these idioms.

This creates a large number of nested branches but statiscally in my
example, they are always taken in the same way.

Unfortunately, as the nesting grows, luaJIT finally "breaks" ie it is
not able to generate x86 code even if the quantity of serial
computations (no branch) is huge.

Mostly, I think the error is "loop unroll limit reached"

Strangely, there is no loops to unroll in my code.

Is there anyway to change luaJIT heuristics to force compilation?

Each basic block has a pretty large amount of compute but still,
luaJIT is still very sensitive to the number of "while true do {  ...
} end" statements I added.

I can email the trace but it is pretty big

Ben