[PATCH] D22822: Adjust coercion of aggregates on RenderScript

Tim Northover via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 26 15:10:38 PDT 2016


t.p.northover added a comment.

> To run a compute kernel, the RenderScript runtime iterates over its input and output buffers using a stride equal to the size of the underlying type and invokes the kernel function on entries in the buffer. Disagreement between the kernel and the the runtime on the sizes of these types can lead to incorrect output,


What language is the runtime written in? I assume LLVM-aware C++ (so it inspects the llvm::Function's parameters before JITing some appropriate loop to do the iteration code)? I think it would be best to pass the stride information through a side channel rather than constraining the front-end to produce sub-optimal code (perhaps a global variable with a special name related to the kernel?).

The runtime dictating the ABI like that seems backwards to me. Ideally you'd start with some given set of functions, decide what the fastest way to run them is, and make sure the runtime is capable of supporting that.

Cheers.

Tim.


https://reviews.llvm.org/D22822





More information about the llvm-commits mailing list