[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-31 Thread Nandor Licker via Phabricator via cfe-commits
nand marked 40 inline comments as done. nand added a comment. I have applied most of the changes you suggested to my HEAD which had significantly more functionality, including a replacement of Opcodes.in with TableGen. Quite a few of your concerns are answered by the features I have added

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-29 Thread Nandor Licker via Phabricator via cfe-commits
nand marked 10 inline comments as done. nand added a comment. We can add a separate integer type which tracks all the additional information required by `__builtin_constant_p` and compile all integers to it in this context. A later patch added an APInt fallback to the interpreter if an

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-29 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. In D64146#1604717 , @nand wrote: > > How do you intend to represent pointers cast to integer types? Allocating > > 64 bits of state for a 64-bit integer is insufficient to model that case. > > Is this ever going to be allowed in

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-29 Thread JF Bastien via Phabricator via cfe-commits
jfb added a comment. In D64146#1604717 , @nand wrote: > > How do you intend to represent pointers cast to integer types? Allocating > > 64 bits of state for a 64-bit integer is insufficient to model that case. > > Is this ever going to be allowed in

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-29 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. > How do you intend to represent pointers cast to integer types? Allocating 64 > bits of state for a 64-bit integer is insufficient to model that case. Is this ever going to be allowed in constexpr? If that is the case, we'll add a separate type for all integers which are

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. How do you intend to represent pointers cast to integer types? Allocating 64 bits of state for a 64-bit integer is insufficient to model that case. Comment at: clang/include/clang/AST/ASTContext.h:583-584 + /// Returns the constexpr VM context. +

[PATCH] D64146: [ConstExprPreter][WIP] Initial patch for the constexpr interpreter

2019-07-11 Thread JF Bastien via Phabricator via cfe-commits
jfb added inline comments. Comment at: clang/lib/AST/ExprVM/Compiler.cpp:85 +/* isArray */ false, +/* isGlobal */ false); + ParamDescriptors.insert({ParamOffset,