https://github.com/isuckatcs closed
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tbaederr approved this pull request.
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/isuckatcs updated
https://github.com/llvm/llvm-project/pull/68039
>From 6748bd2171cca24c46ade12d57b57e97c3312501 Mon Sep 17 00:00:00 2001
From: isuckatcs <65320245+isucka...@users.noreply.github.com>
Date: Mon, 2 Oct 2023 22:29:14 +0200
Subject: [PATCH 1/6] impl
---
clang/li
@@ -847,7 +845,33 @@ template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
if (Initializing)
return this->visitInitializer(E->getSourceExpr());
- return this->visit(E->getSourceExpr());
+
+ PrimType CacheVariableTy = classify(E).value_or(PT_Pt
@@ -847,7 +845,33 @@ template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
if (Initializing)
return this->visitInitializer(E->getSourceExpr());
- return this->visit(E->getSourceExpr());
+
+ PrimType CacheVariableTy = classify(E).value_or(PT_Pt
@@ -810,9 +810,7 @@ bool ByteCodeExprGen::VisitArrayInitLoopExpr(
const ArrayInitLoopExpr *E) {
assert(Initializing);
assert(!DiscardResult);
- // TODO: This compiles to quite a lot of bytecode if the array is larger.
- // Investigate compiling this to a loop, or at
https://github.com/tbaederr edited
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -847,7 +845,33 @@ template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
if (Initializing)
return this->visitInitializer(E->getSourceExpr());
- return this->visit(E->getSourceExpr());
+
+ PrimType CacheVariableTy = classify(E).value_or(PT_Pt
https://github.com/tbaederr requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -847,7 +845,33 @@ template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
if (Initializing)
return this->visitInitializer(E->getSourceExpr());
- return this->visit(E->getSourceExpr());
+
+ PrimType CacheVariableTy = classify(E).value_or(PT_Pt
@@ -847,7 +845,33 @@ template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
if (Initializing)
return this->visitInitializer(E->getSourceExpr());
- return this->visit(E->getSourceExpr());
+
+ PrimType CacheVariableTy = classify(E).value_or(PT_Pt
https://github.com/isuckatcs updated
https://github.com/llvm/llvm-project/pull/68039
>From 6748bd2171cca24c46ade12d57b57e97c3312501 Mon Sep 17 00:00:00 2001
From: isuckatcs <65320245+isucka...@users.noreply.github.com>
Date: Mon, 2 Oct 2023 22:29:14 +0200
Subject: [PATCH 1/5] impl
---
clang/li
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
https://github.com/isuckatcs updated
https://github.com/llvm/llvm-project/pull/68039
>From baf0fc082f2cfa86346a93b22c39b92e9e7e261b Mon Sep 17 00:00:00 2001
From: isuckatcs <65320245+isucka...@users.noreply.github.com>
Date: Mon, 2 Oct 2023 22:29:14 +0200
Subject: [PATCH 1/5] impl
---
clang/li
https://github.com/isuckatcs updated
https://github.com/llvm/llvm-project/pull/68039
>From baf0fc082f2cfa86346a93b22c39b92e9e7e261b Mon Sep 17 00:00:00 2001
From: isuckatcs <65320245+isucka...@users.noreply.github.com>
Date: Mon, 2 Oct 2023 22:29:14 +0200
Subject: [PATCH 1/5] impl
---
clang/li
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
@@ -827,6 +829,9 @@ bool ByteCodeExprGen::VisitArrayInitLoopExpr(
template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
+ if (OpaqueExprs.contains(E))
+return this->emitGetLocal(*classify(E), OpaqueExprs[E], E);
isuckatcs wrote:
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
@@ -827,6 +829,9 @@ bool ByteCodeExprGen::VisitArrayInitLoopExpr(
template
bool ByteCodeExprGen::VisitOpaqueValueExpr(const OpaqueValueExpr *E) {
+ if (OpaqueExprs.contains(E))
+return this->emitGetLocal(*classify(E), OpaqueExprs[E], E);
tbaederr wrote:
@@ -366,8 +363,7 @@ namespace ArrayInitLoop {
auto [a, b, c] = f(n).arr;
return a + b + c;
}
- static_assert(g() == 6); // expected-error {{failed}} \
- // expected-note {{15 == 6}}
+ static_assert(g() == 6);
tbaederr w
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
@@ -478,6 +480,43 @@ template class SourceLocScope final {
bool Enabled = false;
};
+template class StoredOpaqueValueScope final {
+public:
+ StoredOpaqueValueScope(ByteCodeExprGen *Ctx) : Ctx(Ctx) {}
+
+ bool VisitAndStoreOpaqueValue(const OpaqueValueExpr *Ove) {
+a
https://github.com/tbaederr edited
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/tbaederr requested changes to this pull request.
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
isuckatcs wrote:
ping @tbaederr
https://github.com/llvm/llvm-project/pull/68039
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
github-actions[bot] wrote:
:warning: C/C++ code formatter, clang-format found issues in your code.
:warning:
You can test this locally with the following command:
``bash
git-clang-format --diff 55d8f0cd31311ed3ebc85bef2c9b5cfca1579076
3724f695e7699840998d8af16a60f02f90f64b95 --
https://github.com/isuckatcs updated
https://github.com/llvm/llvm-project/pull/68039
>From baf0fc082f2cfa86346a93b22c39b92e9e7e261b Mon Sep 17 00:00:00 2001
From: isuckatcs <65320245+isucka...@users.noreply.github.com>
Date: Mon, 2 Oct 2023 22:29:14 +0200
Subject: [PATCH 1/4] impl
---
clang/li
llvmbot wrote:
@llvm/pr-subscribers-clang
Changes
At the moment in `Interp` the source array initialization (`getCommonExpr()`)
of an `ArrayInitLoopExpr` is evaluated during every iteration, when it should
only be evaluated once.
The initializer is always wrapped inside an `OpaqueValueEx
https://github.com/isuckatcs updated
https://github.com/llvm/llvm-project/pull/68039
>From baf0fc082f2cfa86346a93b22c39b92e9e7e261b Mon Sep 17 00:00:00 2001
From: isuckatcs <65320245+isucka...@users.noreply.github.com>
Date: Mon, 2 Oct 2023 22:29:14 +0200
Subject: [PATCH 1/3] impl
---
clang/li
https://github.com/isuckatcs created
https://github.com/llvm/llvm-project/pull/68039
At the moment in `Interp` the source array initialization (`getCommonExpr()`)
of an `ArrayInitLoopExpr` is evaluated during every iteration, when it should
only be evaluated once.
The initializer is always wr
33 matches
Mail list logo