[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-20 Thread Timm Bäder via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rG6dfe55569d88: [clang][Interp] Rework initializers (authored by tbaeder). Changed prior to commit: https://reviews.llvm.org/D156027?vs=548522&id=55

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-09 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land. LGTM! Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:545-547 + // TODO(perf): For int and bool types, we can probably just skip this + // sinc

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:545-547 + // TODO(perf): For int and bool types, we can probably just skip this + // since we memset our Block*s to 0 and so we have the desired value + // without this. ---

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-09 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 548522. tbaeder marked an inline comment as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156027/new/ https://reviews.llvm.org/D156027 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/In

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-08-02 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:545-547 + // TODO(perf): For int and bool types, we can probably just skip this + // since we memset our Block*s to 0 and so we have the desired value + // without this. -

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545929. tbaeder added a comment. merge `visitConditional()` into its only caller, `VisitAbstractConditionalOperator()`. This works now sine the initializer and non-initializer code paths are the same. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D1

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545928. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156027/new/ https://reviews.llvm.org/D156027 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Context.cpp clang/test/AST/Interp/l

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-31 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545926. tbaeder added a comment. Add `::delegate(const Expr *E)` and squash previous commits into this one. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156027/new/ https://reviews.llvm.org/D156027 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-31 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added a comment. In D156027#4544346 , @tbaeder wrote: > Do you want me to squash the patches I abandoned into this one? I think that could help us to see the bigger picture; I'm assuming that only adds a bit of code rather than three full

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Do you want me to squash the patches I abandoned into this one? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156027/new/ https://reviews.llvm.org/D156027 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https:

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/Context.cpp:131 if (T->isFunctionPointerType() || T->isFunctionReferenceType() || - T->isFunctionType()) + T->isFunctionType() || T->isSpecificBuiltinType(BuiltinType::BoundMember)) return PT_FnPtr

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-29 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240 +return Initializing ? this->visitInitializer(SubExpr) +: this->visit(SubExpr); aaron.ballman wrote: > tbaeder wrote: > > This pattern shows up a

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 545336. tbaeder marked 3 inline comments as done. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156027/new/ https://reviews.llvm.org/D156027 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/In

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-28 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder marked an inline comment as done. tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:2090 + assert(Initializing); + if (!isa(E)) { +if (!this->emitDupPtr(E)) aaron.ballman wrote: > And if it is a member c

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-28 Thread Aaron Ballman via Phabricator via cfe-commits
aaron.ballman added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240 +return Initializing ? this->visitInitializer(SubExpr) +: this->visit(SubExpr); tbaeder wrote: > This pattern shows up a few times, so it m

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-26 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added inline comments. Comment at: clang/lib/AST/Interp/ByteCodeExprGen.cpp:240 +return Initializing ? this->visitInitializer(SubExpr) +: this->visit(SubExpr); This pattern shows up a few times, so it might make sense to add

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-25 Thread Corentin Jabot via Phabricator via cfe-commits
cor3ntin added a comment. In D156027#4534090 , @tbaeder wrote: > Note that this patch also supercedes: > > 1. https://reviews.llvm.org/D153616 > 2. https://reviews.llvm.org/D153653 > 3. https://reviews.llvm.org/D147591 > > since it handles those cases mor

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-25 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder added a comment. Note that this patch also supercedes: 1. https://reviews.llvm.org/D153616 2. https://reviews.llvm.org/D153653 3. https://reviews.llvm.org/D147591 since it handles those cases more generally. Comment at: clang/lib/AST/Interp/Context.cpp:131 if (T->i

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-22 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder updated this revision to Diff 543255. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D156027/new/ https://reviews.llvm.org/D156027 Files: clang/lib/AST/Interp/ByteCodeExprGen.cpp clang/lib/AST/Interp/ByteCodeExprGen.h clang/lib/AST/Interp/Context.cpp Index: clang/lib/AST/Int

[PATCH] D156027: [clang][Interp] Rework how initializers work

2023-07-22 Thread Timm Bäder via Phabricator via cfe-commits
tbaeder created this revision. tbaeder added reviewers: aaron.ballman, erichkeane, shafik, cor3ntin. Herald added a project: All. tbaeder requested review of this revision. Herald added a project: clang. Herald added a subscriber: cfe-commits. Before this patch, we had `visitRecordInitializer()` a