On Wed, Aug 21, 2013 at 09:00:35PM +0300, Pekka Jääskeläinen wrote:
> What other hacks do you refer to?

The hack is the missing communication of parameter sizes from the
kernel invocation in the backend to the LLVM pass. That would need
some ugly string formatting and parsing for the sizes of local and
constant memory arguments.

You mentioned that a future goal is to migrate from compiler scripts
to direct LLVM API calls. I thought about trying that instead, to
communicate parameters, but then the backend needs to be compiled
with the C++ compiler. Do you intend to keep the backends in C?

The LLVM C API is certainly far from usable for a transformation
such as that of local/constant parameters to module-scope arrays.
I doubt that it would be time well spent to maintain a C wrapper
for all required LLVM C++ functions and data structures. It is
probably better to directly use the LLVM C++ API.

Maybe you could devise style guidelines that allow C++ in the backends
(or everywhere?), but, e.g., disallow the use of the STL?  While very
practical, the STL hides complex functionality behind innocent-looking
one-line constructs, which may not be a good idea for a library with
high performance and low overhead in mind.

Peter

------------------------------------------------------------------------------
Introducing Performance Central, a new site from SourceForge and 
AppDynamics. Performance Central is your source for news, insights, 
analysis and resources for efficient Application Performance Management. 
Visit us today!
http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
_______________________________________________
pocl-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/pocl-devel

Reply via email to