[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Avoiding FFI- allocations + using SSE-vectors
- From: Adam Strzelecki <ono@...>
- Date: Tue, 7 Feb 2012 00:10:40 +0100
Mike,
Just one question about allocation sinking and vectors - You said it is easier for SIMD vectors as they are immutable value types. So if we are here to avoid allocation at all when the values do not leave the trace, then where the intermediate results from vector operators (i.e. A = A + B * C) would be kept? Registers, stack, separate static memory pool? The only full reference of allocation sinking I found "Allocation Removal by Partial Evaluation in a Tracing JIT" deals rather with constants, and moving them and alternatively postponing allocation to trace exists.
> And vector operation splitting needs to be made smarter. Otherwise
> it could stay dumb, as it's only used as a fallback for CPUs that
> don't support a particular vector length (the same code runs
> everywhere, but it would be slower on some CPUs).
Yeah I see. If there are to be user-definable operator intrinsics when there would need to be some ABI for passing operands and returning results, right? Like passed via XMM or via stack? Then long vectors won't fit into all registers anyway.
If we want to multiply to 4x4 matrices and fit operands and results into 128-bit registers we would need 12 of them, when they are only 8 in 32-bit SSE. Sounds pretty complicated.
Best regards,
--
Adam