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

2021-02-26 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D64146#2591830 , @jrtc27 wrote: > In D64146#2591732 , @jrtc27 wrote: > >> In D64146#2567710 , @nand wrote: >> >>> CodePtr points into the bytecode

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

2021-02-26 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D64146#2591732 , @jrtc27 wrote: > In D64146#2567710 , @nand wrote: > >> CodePtr points into the bytecode emitted by the byte code compiler. In some >> instances, pointers to auxiliary

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

2021-02-26 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. In D64146#2567710 , @nand wrote: > 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

[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

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

2021-02-16 Thread Jessica Clarke via Phabricator via cfe-commits
jrtc27 added a comment. Herald added a subscriber: dang. So I'm running into issues with this patch, specifically the line annotated below. I'm trying to compile our CHERI-LLVM fork as a native pure-capability CHERI[1] binary (which eventually will mean compiling the Morello-LLVM fork of our

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

2019-09-13 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon accepted this revision. RKSimon added a comment. This revision is now accepted and ready to land. Accepting this to remove the block Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64146/new/ https://reviews.llvm.org/D64146

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

2019-09-12 Thread JF Bastien via Phabricator via cfe-commits
jfb accepted this revision. jfb added a comment. Sounds like this is ready to land again! Thanks for fixing everything. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64146/new/ https://reviews.llvm.org/D64146

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

2019-09-12 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. In D64146#1667567 , @nand wrote: > Thanks for looking into the problem - sorry for the delay! No problem, you still need a specialist to approve the patch though Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION

[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-12 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. Thanks - this builds cleanly on MSVC now 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-11 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. rebase? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D64146/new/ https://reviews.llvm.org/D64146 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

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

2019-09-10 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. In D64146#1665003 , @nand wrote: > 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

[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 Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. In D64146#1663867 , @nand wrote: > 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

[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: [Clang Interpreter] Initial patch for the constexpr interpreter

2019-09-09 Thread Simon Pilgrim via Phabricator via cfe-commits
RKSimon added a comment. @nand The MSVC warnings are self explanatory - you've declared a number of methods (visitIndirectMember, emitConv and getPtrConstFn) but not provided definitions, as they're on template classes MSVC complains, a lot. Repository: rG LLVM Github Monorepo CHANGES

[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. 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-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D64146#1657473 , @nand wrote: > Merged clangInterp and clangAST into a single library while keeping Interp in > a separate folder. > This is required since clangInterp needs access to the AST, but the intry > points to

[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 Simon Pilgrim via Phabricator via cfe-commits
RKSimon requested changes to this revision. RKSimon added a comment. This revision now requires changes to proceed. MSVC builds are seeing template instantiation issues with this patch:

[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 Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D64146#1657146 , @lebedev.ri wrote: > In D64146#1657117 , @svenvh wrote: > > > Shared library builds seem to be broken indeed. I tried fixing by adding > > `Support` and `clangAST`

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

2019-09-04 Thread Roman Lebedev via Phabricator via cfe-commits
lebedev.ri added a comment. In D64146#1657117 , @svenvh wrote: > Shared library builds seem to be broken indeed. I tried fixing by adding > `Support` and `clangAST` as dependencies for `clangInterp`, but that creates > a cyclic dependency between

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

2019-09-04 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh added a comment. Shared library builds seem to be broken indeed. I tried fixing by adding `Support` and `clangAST` as dependencies for `clangInterp`, but that creates a cyclic dependency between `clangAST` <-> `clangInterp`. Which makes me wonder whether `clangInterp` should be a

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

2019-09-04 Thread Guillaume Chatelet via Phabricator via cfe-commits
gchatelet added a comment. This patch broke my build as well (discovered by runnin `git bisect`), command line > cmake -DCMAKE_BUILD_TYPE=Debug -DCMAKE_C_COMPILER=/usr/local/bin/clang > -DCMAKE_ASM_COMPILER=/usr/local/bin/clang > -DCMAKE_CXX_COMPILER=/usr/local/bin/clang++ >

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

2019-08-30 Thread Raphael Isemann via Phabricator via cfe-commits
teemperor added a comment. Seems like this patch introduced a cyclic dependency between Basic and AST when building with LLVM_ENABLE_MODULES=On: While building module 'Clang_AST' imported from llvm/lldb/include/lldb/Symbol/ClangUtil.h:14: While building module 'Clang_Basic' imported from

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

2019-08-26 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I think we're past the point of large-scale structural comments that are better addressed before the first commit, and it'd be much better to make incremental improvements from here. Please go ahead and commit this, and we can iterate in-tree from now on. Thanks!

[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] 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-12 Thread Richard Smith - zygoloid via Phabricator via cfe-commits
rsmith added a comment. I would like to better understand the big picture for descriptors, pointers, and so on. I'm not yet seeing how the pieces are going to fit together and not frequently require expensive operations. For example, pointer arithmetic requires determining the array bound of