https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/121263
>From bdbd11db849506c4d99036dd674f03d1eda815cc Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sat, 28 Dec 2024 13:23:33 +0100
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentNameType` Matcher
---
cl
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/118872
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 2024 22:18:37 +0100
Subject: [PATCH 1/5] [Clang] Warning as error Array Comparisons from C++26
St
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/118872
Starting from C++26 the array comparison warning should converted to an error.
Fixes: #117859
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 20
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/118872
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 2024 22:18:37 +0100
Subject: [PATCH 1/4] [Clang] Warning as error Array Comparisons from C++26
St
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/118872
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 2024 22:18:37 +0100
Subject: [PATCH 1/3] [Clang] Warning as error Array Comparisons from C++26
St
@@ -428,6 +428,9 @@ New Compiler Flags
- The ``-Warray-compare`` warning has been added to warn about array comparison
on versions older than C++20.
+- The ``-Warray-compare-cxx26`` warning has been added to warn about array
comparison
+ starting from C++26, this warn is e
@@ -239,7 +239,7 @@ C++2c implementation status
Remove Deprecated Array Comparisons from C++26
https://wg21.link/P2865R6";>P2865R6
- No
+ Clang 20
AmrDeveloper wrote:
Done, thanks
https://github.com/llvm/llvm-project/pull/118872
__
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/118872
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 2024 22:18:37 +0100
Subject: [PATCH 1/3] [Clang] Warning as error Array Comparisons from C++26
St
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/118872
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 2024 22:18:37 +0100
Subject: [PATCH 1/2] [Clang] Warning as error Array Comparisons from C++26
St
@@ -10274,6 +10274,11 @@ def warn_array_comparison : Warning<
"to compare array addresses, use unary '+' to decay operands to pointers">,
InGroup>;
+def warn_array_comparison_cxx26 : Warning<
+ "comparison between two arrays compare their addresses not their contents; "
-
@@ -10274,6 +10274,11 @@ def warn_array_comparison : Warning<
"to compare array addresses, use unary '+' to decay operands to pointers">,
InGroup>;
+def warn_array_comparison_cxx26 : Warning<
+ "comparison between two arrays compare their addresses not their contents; "
-
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/118872
>From 30eb50c2fff14d4f79b3f3bd2b36e511bcb2db27 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Thu, 5 Dec 2024 22:18:37 +0100
Subject: [PATCH 1/6] [Clang] Warning as error Array Comparisons from C++26
St
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/121975
>From 353f3ca4e997f658c65570e75749220e1abcad72 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Tue, 7 Jan 2025 19:13:26 +0100
Subject: [PATCH 1/2] [Clang][ASTMatcher] Extend `hasDependentName` matcher to
@@ -2251,6 +2251,14 @@ TEST_P(ASTMatchersTest,
HasDependentName_DependentScopeDeclRefExpr) {
EXPECT_TRUE(matches("template struct S { static T foo(); };"
"template void x() { S::foo(); }",
dependentScopeDeclRefExpr(hasDependentNa
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call,
bool IsInfOrIsFinite =
AmrDeveloper wrote:
Yes, I agree, i am thinking to change the structure of the function
`CheckInfNaNFunction ` too, because if `HasIdentifier` is false that's
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/123417
>From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 17 Jan 2025 23:32:48 +0100
Subject: [PATCH 1/2] [Clang] Fix invalid use of infinity warning
---
clang/
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/123417
Fix reporting diagnostic for non std functions that has the name `infinity`
Fixes: #123231
>From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 17 Jan 2025
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName,
MathCheck Check) {
llvm_unreachable("unknown MathCheck");
}
+static bool IsInfinityFunction(const FunctionDecl *FDecl) {
+ if (FDecl->getName() != "infinity")
+return false;
+
+ if (const CXX
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName,
MathCheck Check) {
llvm_unreachable("unknown MathCheck");
}
+static bool IsInfinityFunction(const FunctionDecl *FDecl) {
+ if (FDecl->getName() != "infinity")
+return false;
+
+ if (const CXX
https://github.com/AmrDeveloper closed
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -8454,26 +8454,43 @@ static bool IsInfOrNanFunction(StringRef calleeName,
MathCheck Check) {
llvm_unreachable("unknown MathCheck");
}
+static bool IsInfinityFunction(const FunctionDecl *FDecl) {
+ if (FDecl->getName() != "infinity")
+return false;
+
+ if (const CXX
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/123806
Follow up for improving the test after
https://github.com/llvm/llvm-project/pull/123417
>From 38031e9aed519f4fd3b21dff7e79c69a0150efd9 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Tue, 21 Jan 2025 20
@@ -216,11 +244,18 @@ int compareit(float a, float b) {
// no-inf-no-nan-warning@+2 {{use of infinity is undefined behavior due to the
currently enabled floating-point options}}
// no-inf-warning@+1 {{use of infinity is undefined behavior due to the
currently enabled floatin
@@ -8469,7 +8489,7 @@ void Sema::CheckInfNaNFunction(const CallExpr *Call,
bool IsInfOrIsFinite =
AmrDeveloper wrote:
I think it's better now, early return if there is no identifier and check
`NoHonor.. `first before checking for function name
https://gith
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/123417
>From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 17 Jan 2025 23:32:48 +0100
Subject: [PATCH 1/3] [Clang] Fix invalid use of infinity warning
---
clang/
AmrDeveloper wrote:
> Can you add a changelog entry? Thanks
Done, thanks
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/123417
>From 51dd53feb7a35d4fac648dd165fb5b99f73c6c24 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 17 Jan 2025 23:32:48 +0100
Subject: [PATCH 1/4] [Clang] Fix invalid use of infinity warning
---
clang/
AmrDeveloper wrote:
> LGTM with nits
Thank you, I addressed the nits
https://github.com/llvm/llvm-project/pull/123417
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper approved this pull request.
Thanks, LGTM!
https://github.com/llvm/llvm-project/pull/121435
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/121656
Add the `hasDependentName` matcher to match the name of
`DependentScopeDeclRefExpr`
Example: `dependentScopeDeclRefExpr(hasDependentName("name"))`
Fixes: #121610
>From 4cd48886384570e0e5bb0b712f4fd45f8de
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/121656
>From 4cd48886384570e0e5bb0b712f4fd45f8decd27e Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sat, 4 Jan 2025 17:36:05 +0100
Subject: [PATCH 1/2] [Clang][ASTMatcher] Add a matcher for the name of a
Depe
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/121656
>From 4cd48886384570e0e5bb0b712f4fd45f8decd27e Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sat, 4 Jan 2025 17:36:05 +0100
Subject: [PATCH 1/3] [Clang][ASTMatcher] Add a matcher for the name of a
Depe
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest,
ArgumentCountIs_CXXConstructExpr) {
Constructor1Arg));
}
+TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) {
+ if (!GetParam().isCXX() || GetParam().hasDelayedTemplateParsing()) {
+// FIXM
@@ -2235,6 +2235,21 @@ TEST_P(ASTMatchersTest,
ArgumentCountIs_CXXConstructExpr) {
Constructor1Arg));
}
+TEST_P(ASTMatchersTest, hasDependentName_DependentScopeDeclRefExpr) {
AmrDeveloper wrote:
Done
https://github.com/llvm/llvm-project/pul
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/120996
>From a0b71504fa31e55d42cb54e349838b2669f6fde5 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Mon, 23 Dec 2024 19:42:30 +0100
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/120996
Add AST Matcher for `DependentScopeDeclRefExpr`
Fixes: #120937
>From 0e6e3334dafa4aa3a613ff996d55fb452b3fc350 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Mon, 23 Dec 2024 19:42:30 +0100
Subject: [PA
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/120996
>From 56b650ffe1634833b3147261a32b7b2d1c84c079 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Mon, 23 Dec 2024 19:42:30 +0100
Subject: [PATCH] [Clang][ASTMatcher] Add `dependentScopeDeclRefExpr` Matcher
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/126793
Previously in case of multiable aliases exists for the same base we just accept
the first one
https://github.com/llvm/llvm-project/blob/2cf6663d3c86b065edeb693815e6a4b325045cc2/clang/lib/ASTMatchers/ASTMat
@@ -290,9 +378,23 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const
APValue &value,
cgm.errorNYI("ConstExprEmitter::tryEmitPrivate member pointer");
return {};
}
- case APValue::LValue:
-cgm.errorNYI("ConstExprEmitter::tryEmitPrivate lvalue");
+ case APV
https://github.com/AmrDeveloper closed
https://github.com/llvm/llvm-project/pull/131657
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/132093
Follow up PR to address style comment
(https://github.com/llvm/llvm-project/pull/131657#discussion_r2004197917)
>From 04499c516d36a84a632e58e64a9800af1bdfbc4c Mon Sep 17 00:00:00 2001
From: AmrDeveloper
D
https://github.com/AmrDeveloper closed
https://github.com/llvm/llvm-project/pull/130847
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/131657
>From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 14 Mar 2025 21:46:57 +0100
Subject: [PATCH 1/2] [CIR] Upstream global initialization for ArrayType
---
AmrDeveloper wrote:
CI is red because unrelated error
```
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
```
https://github.com/llvm/llvm-project/pull/131657
___
cfe-commits mailing list
cfe-commits
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/131657
>From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 14 Mar 2025 21:46:57 +0100
Subject: [PATCH 1/2] [CIR] Upstream global initialization for ArrayType
---
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/131657
>From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 14 Mar 2025 21:46:57 +0100
Subject: [PATCH 1/3] [CIR] Upstream global initialization for ArrayType
---
@@ -271,16 +314,61 @@ mlir::Attribute ConstantEmitter::tryEmitPrivate(const
APValue &value,
cgm.getASTContext().getTargetInfo().useFP16ConversionIntrinsics()) {
cgm.errorNYI("ConstExprEmitter::tryEmitPrivate half");
return {};
-} else {
- mlir::Typ
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/131657
>From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 14 Mar 2025 21:46:57 +0100
Subject: [PATCH 1/2] [CIR] Upstream global initialization for ArrayType
---
@@ -158,13 +158,56 @@ class ConstExprEmitter
// TODO(cir): this can be shared with LLVM's codegen
static QualType getNonMemoryType(CIRGenModule &cgm, QualType type) {
- if (auto at = type->getAs()) {
+ if (const auto *at = type->getAs()) {
return cgm.getASTContext().get
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/131657
>From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 14 Mar 2025 21:46:57 +0100
Subject: [PATCH 1/3] [CIR] Upstream global initialization for ArrayType
---
AmrDeveloper wrote:
@andykaylor All comments addressed except two points related to NYI
https://github.com/llvm/llvm-project/pull/131657
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper closed
https://github.com/llvm/llvm-project/pull/132093
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/131657
>From 4ae9c422e786f843f5f019a5d9e55232ec6c8694 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 14 Mar 2025 21:46:57 +0100
Subject: [PATCH 1/4] [CIR] Upstream global initialization for ArrayType
---
@@ -45,6 +45,41 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
return false;
}
+ // Return true if this is the null value
AmrDeveloper wrote:
That's right, I updated the comment to describe the implemented cases
https://github.com/llvm/llvm
AmrDeveloper wrote:
> If you just set commonElementType to {} as is done in the incubator, this
> will eventually reach the NYI state in emitConstantArray and this code won't
> need to be updated later.
@andykaylor Yes, this is a better approach, I updated the code
Thanks
https://github.com/
@@ -228,6 +257,42 @@ mlir::Value CIRAttrToValue::visitCirAttr(cir::FPAttr
fltAttr) {
loc, converter->convertType(fltAttr.getType()), fltAttr.getValue());
}
+// ConstArrayAttr visitor
+mlir::Value CIRAttrToValue::visitCirAttr(cir::ConstArrayAttr attr) {
+ mlir::Type llv
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/134536
This change adds ArraySubscriptExpr for fixed size ArrayType
Issue #130197
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
S
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/132974
>From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 21 Mar 2025 21:07:11 +0100
Subject: [PATCH 1/5] [CIR] [Upstream local initialization for ArrayType
---
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/132974
This change adds local initialization for ArrayType
Issue #130197
>From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 21 Mar 2025 21:07:11 +0100
Subject:
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return create(loc, attr.getType(), attr);
}
+ mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) {
+assert(mlir::isa(t) && "expected cir.ptr");
+return getConstPtrAttr(t, 0);
+ }
+
+ mlir::Typ
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/133100
>From b4aafe8bdb2754597d440e256c33b9f8b9a92a91 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Wed, 26 Mar 2025 05:52:17 -0700
Subject: [PATCH] [CIR] Upstream zero init for global variables
---
.../CIR/
https://github.com/AmrDeveloper created
https://github.com/llvm/llvm-project/pull/133100
This change adds zero initialization for global variables
>From 999b8e47c0a8506a983d7d3ac5ce1b82b41966b0 Mon Sep 17 00:00:00 2001
From: JaydeepChauhan14
Date: Wed, 26 Mar 2025 05:52:17 -0700
Subject: [PATC
AmrDeveloper wrote:
> I'm not suggesting errorNYI. I'm suggesting op.emitError(). We can't do that
> here either, but maybe we could do it in the function from which this is
> called?
I think it's easier to keep it as assert, llvm_unreachable or a missing
features as the error message mention
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/132974
>From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 21 Mar 2025 21:07:11 +0100
Subject: [PATCH 1/5] [CIR] [Upstream local initialization for ArrayType
---
@@ -620,6 +684,28 @@ mlir::LogicalResult
CIRToLLVMStoreOpLowering::matchAndRewrite(
return mlir::LogicalResult::success();
}
+/// Switches on the type of attribute and calls the appropriate conversion.
+mlir::Value lowerCirAttrAsValue(mlir::Operation *parentOp,
+
@@ -0,0 +1,150 @@
+//- LoweringHelpers.cpp - Lowering helper functions
---===//
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Ap
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/132974
>From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 21 Mar 2025 21:07:11 +0100
Subject: [PATCH 1/4] [CIR] [Upstream local initialization for ArrayType
---
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/132974
>From 4dc1e77299c71b8f01fb73f7fba5f14e0fbe3edd Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Fri, 21 Mar 2025 21:07:11 +0100
Subject: [PATCH 1/2] [CIR] [Upstream local initialization for ArrayType
---
@@ -67,6 +67,40 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
return create(loc, attr.getType(), attr);
}
+ mlir::TypedAttr getConstNullPtrAttr(mlir::Type t) {
+assert(mlir::isa(t) && "expected cir.ptr");
+return getConstPtrAttr(t, 0);
+ }
+
+ mlir::Typ
@@ -29,8 +29,15 @@ int f[5] = {1, 2};
void func() {
int arr[10];
-
// CHECK: %[[ARR:.*]] = cir.alloca !cir.array,
!cir.ptr>, ["arr"]
+
+ int e = arr[1];
+ // CHECK: %[[INIT:.*]] = cir.alloca !s32i, !cir.ptr, ["e", init]
+ // CHECK: %[[IDX:.*]] = cir.const #cir.int<1>
@@ -232,6 +233,161 @@ LValue CIRGenFunction::emitUnaryOpLValue(const
UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be
@@ -232,6 +233,152 @@ LValue CIRGenFunction::emitUnaryOpLValue(const
UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/5] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/5] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
@@ -232,6 +233,152 @@ LValue CIRGenFunction::emitUnaryOpLValue(const
UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be
https://github.com/AmrDeveloper edited
https://github.com/llvm/llvm-project/pull/134536
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const
UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const
UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be
@@ -27,7 +27,8 @@ using namespace cir;
/// Given an expression of pointer type, try to
/// derive a more accurate bound on the alignment of the pointer.
-Address CIRGenFunction::emitPointerWithAlignment(const Expr *expr) {
+Address CIRGenFunction::emitPointerWithAlignment(cons
@@ -390,6 +391,148 @@ LValue CIRGenFunction::emitUnaryOpLValue(const
UnaryOperator *e) {
llvm_unreachable("Unknown unary operator kind!");
}
+/// If the specified expr is a simple decay from an array to pointer,
+/// return the array subexpression.
+/// FIXME: this could be
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/7] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/7] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/8] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
@@ -110,6 +110,10 @@ class CIRGenFunction : public CIRGenTypeCache {
public:
mlir::Value createDummyValue(mlir::Location loc, clang::QualType qt);
+ void emitAggExpr(const clang::Expr *e, AggValueSlot slot);
AmrDeveloper wrote:
Done, thanks
https://github
@@ -280,6 +280,25 @@ def CIR_BoolType :
}];
}
+//===--===//
+// ArrayType
+//===--===//
+
+def CIR_ArrayType : CIR_Type<"Array", "array",
+
https://github.com/AmrDeveloper updated
https://github.com/llvm/llvm-project/pull/134536
>From 81e1cd76594d3eaeda67d5888e5e5daa63fb0e12 Mon Sep 17 00:00:00 2001
From: AmrDeveloper
Date: Sun, 6 Apr 2025 14:31:35 +0200
Subject: [PATCH 1/3] [CIR] Upstream ArraySubscriptExpr for fixed size array
-
101 - 200 of 426 matches
Mail list logo