constexpr functions compile-time execution

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

constexpr functions compile-time execution

Nathan Ridge via cfe-dev
Hi,
How are constexpr functions executed at compile-time? Are they actually codegen'erated to Byte code and jit compiled?
Where can I find the relevant code in the repo?

Thanks in advance,
Viktor

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: constexpr functions compile-time execution

Nathan Ridge via cfe-dev
Clang has its own code for evaluating constexprs. It doesn't use LLVM IR at all. I believe most of the code is in lib/AST/ExprConstant.cpp.

~Craig


On Sun, Jun 16, 2019 at 8:20 AM Viktor Was BSc via cfe-dev <[hidden email]> wrote:
Hi,
How are constexpr functions executed at compile-time? Are they actually codegen'erated to Byte code and jit compiled?
Where can I find the relevant code in the repo?

Thanks in advance,
Viktor
_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev