[llvm-dev] Source to Source compiler to implement "#pragma forceinline [recursive]" using clang

David Castells Rufas via llvm-dev llvm-dev at lists.llvm.org
Thu Feb 23 05:19:03 PST 2017


Hi,

I would like to see the effects of inlining C/C++ functions at the source
code level.
After some searchs it looks like IDEs like Eclipse can do that on Java
code, but not in C/C++. Am I right?

Also I would like to control when to inline or not inline a function at the
calling site. I understand that Intel's ICC "#pragma forceinline" is
exactly addressing this, in contrast to the GCC
"__attribute__((always_inline))" which is addressing all the function
invocations.

I understand that it would be possible to implement such translation using
clang. Do you foresee any major roadblock for that?
I am also wondering if anyone has done anything similar, or there exist
other alternatives I haven't though of...

Regards,
David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170223/9b81204d/attachment.html>


More information about the llvm-dev mailing list