lua-users home
lua-l archive

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

I am not sure to understand but basically, I am however able to
generate many small traces by removing some "unrolling" I had before.
As I said, I have a SIMD machine to simulate and therefore, initially,
I just unrolled the per-lane computations.
When you do:
vec0 = vec1 + vec2
I basically output something like:
vec0[0] = vec1[0] + vec2[0]
vec0[1] = vec1[1] + vec2[1]

If I do:
for i=1,simd_width do vec0[i] = vec1[i] + vec2[i] end
then a trace is generated for this small loop

Basically, I am not able to generate few large traces with LuaJIT but
I am able to generate many small ones.


On Wed, Jul 20, 2011 at 6:49 AM, Benjamin Segovia
<> wrote:
> 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