[Libclc-dev] [PATCH] Move sincos helpers into a header file

Erik Schnetter schnetter at gmail.com
Thu Jul 31 09:25:05 PDT 2014

On Jul 31, 2014, at 11:05 , Jeroen Ketema <j.ketema at imperial.ac.uk> wrote:

> Hi Tom,
> Looks good to me in general. A few comments and questions though:
> * Maybe the helpers should be put in a separate .inc file as is being done in some other parts of the code? I think this would be a bit cleaner.
> * I would not be against prefixing all helper names with some libclc specific prefix. As we’re already in a similar kind of situation with the header files.
> * Is aggressively inlining the way to go in the long run? It might not produce the most compact code, which might be needed in some cases. 
> * Am I correct that post-processing the helper functions to give them the llvm “internal” linkage type is not sufficient when linking against libclc by means of llvm-link, because that tool is not a full-blown linker?

I would keep the helper functions in their own files. This should speed up compiling. There will also be cases where forced inlining will reduce performance (instruction cache size?).

llvm will be able to inline functions later on; this is one of the major advantages of using bytecode.

Also, having the helper functions in a header files doesn't remove the need for using prefixes.


Erik Schnetter <schnetter at gmail.com>

My email is as private as my paper mail. I therefore support encrypting
and signing email messages. Get my PGP key from http://pgp.mit.edu/.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 203 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.llvm.org/pipermail/libclc-dev/attachments/20140731/497a8187/attachment.sig>

More information about the Libclc-dev mailing list