[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-08-13 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. updated diff, implemented requested changes Comment at: clang/include/clang/Basic/LangOptions.def:291-294 +BENIGN_LANGOPT(EnableClangInterp, 1, 0, + "enable the experimental clang interpreter") +BENIGN_LANGOPT(ForceClangInterp, 1, 0, +

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-08-13 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. The old path-based approach is slow for most operations, while the new pointer-based approach is fast for the most common ones. For read/write/update operations, it is enough to check the pointer and at most a single descriptor to ensure whether the operation can be

[PATCH] D66808: [ConstExprPreter] Full patch of the interpreter.

2019-08-30 Thread Nandor Licker via Phabricator via cfe-commits
nand updated this revision to Diff 218131. nand added a comment. Added more features Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D66808/new/ https://reviews.llvm.org/D66808 Files: clang/docs/ConstantInterpreter.rst

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-04 Thread Nandor Licker via Phabricator via cfe-commits
nand reopened this revision. nand added a comment. Thanks for identifying these issues - I fixed the cycle detected by modules since then, however I wasn't aware of the issue with shared libs until now. Repository: rL LLVM CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64146/new/

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-04 Thread Nandor Licker via Phabricator via cfe-commits
nand added a reviewer: rnk. nand added a subscriber: rnk. nand added a comment. @jfb suggested I add @rnk: I was wondering if you have any suggestions on how to fix the msvc warnings/errors? I'd be grateful if I had some feedback on what features of C++ I should avoid using and what I should

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-04 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. Does anyone have any suggestions on how to fix the MSVC problems? I am trying to get access to a Windows machine, but it's not guaranteed. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64146/new/

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-04 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. The existing evaluator is not a separate library to start with. Given the tangling between ExprConstants.cpp and the AST nodes, I don't really see any elegant way of dealing with this problem. An example of the problem is `FieldDecl::getBitWidthValue`. Repository: rG

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-12 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. Thanks for looking into the problem - sorry for the delay! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64146/new/ https://reviews.llvm.org/D64146 ___ cfe-commits mailing list

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-10 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. Totally missed that - thanks for noticing. I must have forgotten to remove stuff from the header since clang/gcc don't warn about it. I'll get hold of a Windows machine soon-ish and I'll make sure to fix this problem. Thanks! Repository: rG LLVM Github Monorepo

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-09 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. I am providing definitions in the C++ file - the problem is that they are not available in the header before the extern declaration. The methods are available at the site of the extern definition. gcc and clang accept this, so does Visual Studio 2019. This feels like an

[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 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-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] D70087: [ConstExprPreter] String and basic pointer arithmetic.

2019-11-11 Thread Nandor Licker via Phabricator via cfe-commits
nand created this revision. nand added reviewers: rsmith, jfb, Bigcheese, dexonsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Implemented string constants and the following pointer operations: - AddOffset - SubOffset - Narrow - Expand - LogicalNot To allow for

[PATCH] D70086: [ConstExprPreter] Implemented control flow statements

2019-11-11 Thread Nandor Licker via Phabricator via cfe-commits
nand created this revision. nand added reviewers: Bigcheese, jfb, rsmith, dexonsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. Added support for: - for - switch - do-while - while Also implemented assignment to enable useful tests. The patch also includes

[PATCH] D70071: [ConstExprPreter] Removed the flag forcing the use of the interpreter

2019-11-11 Thread Nandor Licker via Phabricator via cfe-commits
nand created this revision. nand added reviewers: jfb, Bigcheese, rsmith, dexonsmith. Herald added a project: clang. Herald added a subscriber: cfe-commits. nand edited the summary of this revision. Removed the `-fforce-experimental-new-constant-interpreter flag`, leaving only the

[PATCH] D70071: [ConstExprPreter] Removed the flag forcing the use of the interpreter

2019-11-22 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70071/new/ https://reviews.llvm.org/D70071 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2019-12-13 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2019-12-06 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70071: [ConstExprPreter] Removed the flag forcing the use of the interpreter

2019-11-27 Thread Nandor Licker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGf584f04dab69: [ConstExprPreter] Removed the flag forcing the use of the interpreter (authored by nand). Changed prior to commit: https://reviews.llvm.org/D70071?vs=230791=231310#toc Repository: rG

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2019-12-02 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70071: [ConstExprPreter] Removed the flag forcing the use of the interpreter

2019-11-24 Thread Nandor Licker via Phabricator via cfe-commits
nand updated this revision to Diff 230791. nand added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70071/new/ https://reviews.llvm.org/D70071 Files: clang/docs/ConstantInterpreter.rst

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2019-12-20 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75726: [ConstExprPreter] Updated constant interpreter documentation

2020-03-06 Thread Nandor Licker via Phabricator via cfe-commits
nand created this revision. nand added reviewers: rsmith, Bigcheese, dexonsmith, jfb. Herald added a project: clang. Herald added a subscriber: cfe-commits. Updated the documentation to better reflect features implemented on the constexpr branch at https://github.com/nandor/llvm-project and

[PATCH] D70086: [ConstExprPreter] Implemented control flow statements

2020-03-06 Thread Nandor Licker via Phabricator via cfe-commits
nand updated this revision to Diff 248701. nand added a comment. rebase Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70086/new/ https://reviews.llvm.org/D70086 Files: clang/lib/AST/Interp/ByteCodeEmitter.cpp

[PATCH] D74934: [Clang interpreter] Rename Block.{h,cpp} to AllocatedBlock.{h,cpp}

2020-02-21 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. Was wondering if ```InterpBlock``` might be a more suitable name? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D74934/new/ https://reviews.llvm.org/D74934 ___ cfe-commits mailing

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2020-01-03 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75726: [ConstExprPreter] Updated constant interpreter documentation

2020-03-12 Thread Nandor Licker via Phabricator via cfe-commits
nand updated this revision to Diff 249992. nand added a comment. Wrapped to ~80 chars/line Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75726/new/ https://reviews.llvm.org/D75726 Files: clang/docs/ConstantInterpreter.rst Index:

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2020-03-12 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70086: [ConstExprPreter] Implemented control flow statements

2020-03-12 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70086/new/ https://reviews.llvm.org/D70086 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D75726: [ConstExprPreter] Updated constant interpreter documentation

2020-04-09 Thread Nandor Licker via Phabricator via cfe-commits
nand updated this revision to Diff 256346. nand marked 15 inline comments as done. nand added a comment. addressed comments, fixed typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75726/new/ https://reviews.llvm.org/D75726 Files:

[PATCH] D75726: [ConstExprPreter] Updated constant interpreter documentation

2020-04-09 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. Thanks for the comments! I tried to clarify what could be done in the future and what is already supported. Comment at: clang/docs/ConstantInterpreter.rst:174 A block containing a primitive reserved storage only for the primitive.

[PATCH] D75726: [ConstExprPreter] Updated constant interpreter documentation

2020-04-15 Thread Nandor Licker via Phabricator via cfe-commits
nand updated this revision to Diff 257637. nand marked 2 inline comments as done. nand added a comment. fixed typos Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75726/new/ https://reviews.llvm.org/D75726 Files:

[PATCH] D75726: [ConstExprPreter] Updated constant interpreter documentation

2020-04-15 Thread Nandor Licker via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGb3387d1c30ae: [ConstExprPreter] Updated constant interpreter documentation (authored by nand). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D75726/new/

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2020-04-22 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D70073: [ConstExprPreter] Implemented function calls and if statements

2020-05-04 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. ping Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D70073/new/ https://reviews.llvm.org/D70073 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D97606: [Clang interpreter] Avoid storing pointers at unaligned locations

2021-03-03 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. The patches implementing more features/control flow constructs have not yet been committed, so if the pre-existing test passes, the functionality should be fine. Adjustments can be made later on when those patches are rebased. Comment at:

[PATCH] D64146: [Clang Interpreter] Initial patch for the constexpr interpreter

2021-02-17 Thread Nandor Licker via Phabricator via cfe-commits
nand added a comment. CodePtr points into the bytecode emitted by the byte code compiler. In some instances, pointers to auxiliary data structures are embedded into the byte code, such as functions or AST nodes which contain information relevant to the execution of the instruction. Would it