@@ -1917,3 +1917,190 @@ ExprResult Sema::BuildExpressionTrait(ExpressionTrait
ET, SourceLocation KWLoc,
return new (Context)
ExpressionTraitExpr(KWLoc, ET, Queried, Value, RParen, Context.BoolTy);
}
+
+static std::optional StdNameToTypeTrait(StringRef Name) {
+ return
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/141238
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1917,3 +1917,190 @@ ExprResult Sema::BuildExpressionTrait(ExpressionTrait
ET, SourceLocation KWLoc,
return new (Context)
ExpressionTraitExpr(KWLoc, ET, Queried, Value, RParen, Context.BoolTy);
}
+
+static std::optional StdNameToTypeTrait(StringRef Name) {
+ return
@@ -1917,3 +1917,190 @@ ExprResult Sema::BuildExpressionTrait(ExpressionTrait
ET, SourceLocation KWLoc,
return new (Context)
ExpressionTraitExpr(KWLoc, ET, Queried, Value, RParen, Context.BoolTy);
}
+
+static std::optional StdNameToTypeTrait(StringRef Name) {
+ return
https://github.com/erichkeane approved this pull request.
Just a copy&paste refactor that makes a lot of sense. Thanks!
https://github.com/llvm/llvm-project/pull/141245
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi
@@ -0,0 +1,539 @@
+//===- SemaTypeTraits.cpp - Semantic Analysis for C++ Type Traits
-===//
+//
+// 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
@@ -5590,69 +5590,8 @@ static bool isTriviallyEqualityComparableType(Sema &S,
QualType Type, SourceLoca
CanonicalType, /*CheckIfTriviallyCopyable=*/false);
}
-static bool IsCXXTriviallyRelocatableType(Sema &S, const CXXRecordDecl *RD) {
- if (std::optional Info =
-
@@ -0,0 +1,539 @@
+//===- SemaTypeTraits.cpp - Semantic Analysis for C++ Type Traits
-===//
+//
+// 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
@@ -1762,6 +1762,29 @@ def err_user_defined_msg_constexpr : Error<
"%sub{subst_user_defined_msg}0 must be produced by a "
"constant expression">;
+// Type traits explanations
+def note_unsatisfied_trait : Note<"%0 is not %enum_select{"
+ "%
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/140971
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/140971
>From ec6359330368ed72d6e4354afdcf6d0a32f9a2f9 Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Tue, 20 May 2025 08:55:39 -0700
Subject: [PATCH 1/2] [OpenACC][CIR] Add lowering for 'copy' array indexes
The ar
https://github.com/erichkeane approved this pull request.
Seems reasonable
https://github.com/llvm/llvm-project/pull/141163
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3028,6 +3043,19 @@ class CallExpr : public Expr {
bool hasStoredFPFeatures() const { return CallExprBits.HasFPFeatures; }
+ bool usesMemberSyntax() const {
+return CallExprBits.ExplicitObjectMemFunUsingMemberSyntax;
+ }
+ void setUsesMemberSyntax(bool V = true) {
@@ -3187,9 +3215,48 @@ class CallExpr : public Expr {
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getEndLoc() const LLVM_READONLY;
+
@@ -1510,41 +1519,41 @@ CallExpr *CallExpr::Create(const ASTContext &Ctx, Expr
*Fn,
unsigned NumArgs = std::max(Args.size(), MinNumArgs);
unsigned SizeOfTrailingObjects = CallExpr::sizeOfTrailingObjects(
/*NumPreArgs=*/0, NumArgs, FPFeatures.requiresTrailingStorage()
@@ -1510,41 +1519,41 @@ CallExpr *CallExpr::Create(const ASTContext &Ctx, Expr
*Fn,
unsigned NumArgs = std::max(Args.size(), MinNumArgs);
unsigned SizeOfTrailingObjects = CallExpr::sizeOfTrailingObjects(
/*NumPreArgs=*/0, NumArgs, FPFeatures.requiresTrailingStorage()
@@ -3028,6 +3043,19 @@ class CallExpr : public Expr {
bool hasStoredFPFeatures() const { return CallExprBits.HasFPFeatures; }
+ bool usesMemberSyntax() const {
+return CallExprBits.ExplicitObjectMemFunUsingMemberSyntax;
+ }
+ void setUsesMemberSyntax(bool V = true) {
@@ -3187,9 +3215,48 @@ class CallExpr : public Expr {
SourceLocation getRParenLoc() const { return RParenLoc; }
void setRParenLoc(SourceLocation L) { RParenLoc = L; }
- SourceLocation getBeginLoc() const LLVM_READONLY;
- SourceLocation getEndLoc() const LLVM_READONLY;
+
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/141032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/141033
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/140971
The array indexes(and sections) are represented by the acc.bounds operation,
which this ensures we fill in properly. The lowerbound is required, so we
always get that.
The upperbound or extent is required.
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140925
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3727,12 +3734,26 @@ static void GenerateHasAttrSpellingStringSwitch(
}
}
-std::string TestStr = !Test.empty()
- ? Test + " ? " + itostr(Version) + " : 0"
- : itostr(Version);
-if (Scope.empty() ||
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140828
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -260,6 +260,7 @@ static bool isBuiltinHeaderName(StringRef FileName) {
.Case("stdarg.h", true)
.Case("stdatomic.h", true)
.Case("stdbool.h", true)
+ .Case("stdcountof.h", true)
erichkeane wrote:
These too!
https:/
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/140890
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -252,8 +252,8 @@ static bool warnByDefaultOnWrongCase(StringRef Include) {
.Cases("assert.h", "complex.h", "ctype.h", "errno.h", "fenv.h", true)
erichkeane wrote:
The fact that these aren't tablegened somewhere is frightening!
https://github.com/llvm/llv
https://github.com/erichkeane approved this pull request.
I still have no problem with this, but it is now into things I have zero
confidence reviewing :) Please have someone who has ever used modules review
this.
https://github.com/llvm/llvm-project/pull/140890
__
https://github.com/erichkeane approved this pull request.
Thought I'd already +1ed! with teh copyright headers, this LGTM.
https://github.com/llvm/llvm-project/pull/140629
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140890
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
Want someone else to poke at it, but nothing from my end.
https://github.com/llvm/llvm-project/pull/140811
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/
https://github.com/erichkeane commented:
still ok, 1 nit.
https://github.com/llvm/llvm-project/pull/140796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/140796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -26,6 +26,34 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
CIRGenBuilderTy(mlir::MLIRContext &mlirContext, const CIRGenTypeCache &tc)
: CIRBaseBuilderTy(mlirContext), typeCache(tc) {}
+ /// Get a cir::ConstArrayAttr for a string literal.
+ /// Note: Th
@@ -26,6 +26,34 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
CIRGenBuilderTy(mlir::MLIRContext &mlirContext, const CIRGenTypeCache &tc)
: CIRBaseBuilderTy(mlirContext), typeCache(tc) {}
+ /// Get a cir::ConstArrayAttr for a string literal.
+ /// Note: Th
@@ -26,6 +26,34 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
CIRGenBuilderTy(mlir::MLIRContext &mlirContext, const CIRGenTypeCache &tc)
: CIRBaseBuilderTy(mlirContext), typeCache(tc) {}
+ /// Get a cir::ConstArrayAttr for a string literal.
+ /// Note: Th
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140796
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ auto Loc = TheCall->getBeginLoc();
+ auto Args = Mutab
@@ -5406,6 +5408,103 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ SourceLocation Loc = TheCall->getBeginLoc();
+ auto Ar
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/116709
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
I'm happy as-is. Please give Aaron a chance to poke if he wants to.
https://github.com/llvm/llvm-project/pull/116709
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.o
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ auto Loc = TheCall->getBeginLoc();
+ auto Args = Mutab
@@ -5406,6 +5408,103 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ SourceLocation Loc = TheCall->getBeginLoc();
+ auto Ar
@@ -5406,6 +5408,103 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ SourceLocation Loc = TheCall->getBeginLoc();
+ auto Ar
@@ -9966,8 +9966,13 @@ AssignConvertType
Sema::CheckSingleAssignmentConstraints(QualType LHSType,
// If there is a conversion of some kind, check to see what kind of
// pointer conversion happened so we can diagnose a C++ compatibility
// diagnostic if the co
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140724
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ auto Loc = TheCall->getBeginLoc();
+ auto Args = Mutab
@@ -1611,29 +1611,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind
TagTokKind,
Tok.isOneOf(
#define TRANSFORM_TYPE_TRAIT_DEF(_, Trait) tok::kw___##Trait,
#include "clang/Basic/TransformTypeTraits.def"
- tok::kw___is_abstract,
- tok::kw___is_aggregat
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ auto Loc = TheCall->getBeginLoc();
+ auto Args = Mutab
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ auto Loc = TheCall->getBeginLoc();
+ auto Args = Mutab
@@ -5406,6 +5408,101 @@ ExprResult Sema::ConvertVectorExpr(Expr *E,
TypeSourceInfo *TInfo,
RParenLoc, CurFPFeatureOverrides());
}
+ExprResult Sema::BuiltinInvoke(CallExpr *TheCall) {
+ auto Loc = TheCall->getBeginLoc();
eri
https://github.com/erichkeane commented:
Couple of nits, else I'm reasonably ok with this. Interested to hear what
@AaronBallman has to say, else I think this is beneficial.
https://github.com/llvm/llvm-project/pull/116709
___
cfe-commits mailing lis
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/116709
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -9966,8 +9966,13 @@ AssignConvertType
Sema::CheckSingleAssignmentConstraints(QualType LHSType,
// If there is a conversion of some kind, check to see what kind of
// pointer conversion happened so we can diagnose a C++ compatibility
// diagnostic if the co
@@ -9966,8 +9966,13 @@ AssignConvertType
Sema::CheckSingleAssignmentConstraints(QualType LHSType,
// If there is a conversion of some kind, check to see what kind of
// pointer conversion happened so we can diagnose a C++ compatibility
// diagnostic if the co
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140725
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
I don't see anything of concern, lgtm!
https://github.com/llvm/llvm-project/pull/140636
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cf
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/140586
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140612
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
So @Rajveer100 : I think I bottomed out with Aaron. I think the solution of
'create a function to diagnose these, but only if not in a dependent
`DeclContext`', then call this both from where we do the current checking, plus
during `TreeTransform` of these things is the 'rig
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr {
def Cleanup : InheritableAttr {
let Spellings = [GCC<"cleanup">];
- let Args = [DeclArgument];
+ let Args = [DeclArgument,
+ ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>];
erichkeane
erichkeane wrote:
> > I would be against said RFC. If you asked me in 1996/whatever, I could be
> > talked into it. But we're 30+ years of this behavior.
>
> Doesn't stop WG21 from changing the behavior 30 years later. ;-) My biggest
> concern is actually that C++ is changing exception handlin
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr {
def Cleanup : InheritableAttr {
let Spellings = [GCC<"cleanup">];
- let Args = [DeclArgument];
+ let Args = [DeclArgument,
+ ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>];
erichkeane
erichkeane wrote:
> > I feel like this issue is a little too niche to be adding such complexity,
> > maybe just covering those specific uses cases before codegen might be the
> > way to go?
>
> I think disabling the keywords entirely is a large ask (requires an RFC at a
> minimum) and so we d
@@ -1351,7 +1352,8 @@ def OSConsumesThis : InheritableAttr {
def Cleanup : InheritableAttr {
let Spellings = [GCC<"cleanup">];
- let Args = [DeclArgument];
+ let Args = [DeclArgument,
+ ExprArgument<"Expr", /*opt=*/0, /*fake=*/1>];
erichkeane
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/140586
Having the whole clause emission be in a header file ended up being pragmatic,
but ended up being a sizable negative for a variety of reasons. This patch
moves it to its own .cpp file and makes CIRGenFuncti
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/140304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140578
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140576
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/140304
>From a4e63bb357688f7200113d4dc39c83d95d72ce6e Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 12 May 2025 08:59:40 -0700
Subject: [PATCH 1/4] [OpenACC][CIR] Implement beginning of 'copy' lowering for
c
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140571
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
Alright, I've done all as requested. Would love a 2nd review/approval from
Bruno.
@bcardosolopes : If it is alright, I'd like to just do the OpenACC clause
refactor in a followup patch. I'll work on it 'next', immediately after this
one. I'd origina
@@ -14622,7 +14622,8 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl
*var) {
Diag(var->getLocation(), diag::err_thread_nontrivial_dtor);
if (getLangOpts().CPlusPlus11)
Diag(var->getLocation(), diag::note_use_thread_local);
-} else if (getLangOpts
@@ -14608,6 +14608,10 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl
*var) {
std::optional CacheHasConstInit;
const Expr *CacheCulprit = nullptr;
auto checkConstInit = [&]() mutable {
+const Expr *Init = var->getInit();
+if (Init->isInstantiationDependent
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140542
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14608,6 +14608,10 @@ void Sema::CheckCompleteVariableDeclaration(VarDecl
*var) {
std::optional CacheHasConstInit;
const Expr *CacheCulprit = nullptr;
auto checkConstInit = [&]() mutable {
+const Expr *Init = var->getInit();
+if (Init->isInstantiationDependent
@@ -36,6 +37,76 @@ template constexpr bool isCombinedType =
false;
template
constexpr bool isCombinedType> = true;
+namespace {
+struct DataOperandInfo {
+ mlir::Location beginLoc;
+ mlir::Value varValue;
+ llvm::StringRef name;
+ mlir::ValueRange bounds;
+
+ DataOpera
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/140304
>From a4e63bb357688f7200113d4dc39c83d95d72ce6e Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 12 May 2025 08:59:40 -0700
Subject: [PATCH 1/2] [OpenACC][CIR] Implement beginning of 'copy' lowering for
c
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/140304
>From a4e63bb357688f7200113d4dc39c83d95d72ce6e Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Mon, 12 May 2025 08:59:40 -0700
Subject: [PATCH 1/3] [OpenACC][CIR] Implement beginning of 'copy' lowering for
c
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/140304
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -36,6 +37,76 @@ template constexpr bool isCombinedType =
false;
template
constexpr bool isCombinedType> = true;
+namespace {
+struct DataOperandInfo {
+ mlir::Location beginLoc;
+ mlir::Value varValue;
+ llvm::StringRef name;
+ mlir::ValueRange bounds;
+
+ DataOpera
@@ -36,6 +37,76 @@ template constexpr bool isCombinedType =
false;
template
constexpr bool isCombinedType> = true;
+namespace {
+struct DataOperandInfo {
+ mlir::Location beginLoc;
+ mlir::Value varValue;
+ llvm::StringRef name;
+ mlir::ValueRange bounds;
+
+ DataOpera
@@ -36,6 +37,76 @@ template constexpr bool isCombinedType =
false;
template
constexpr bool isCombinedType> = true;
+namespace {
+struct DataOperandInfo {
+ mlir::Location beginLoc;
+ mlir::Value varValue;
+ llvm::StringRef name;
+ mlir::ValueRange bounds;
+
+ DataOpera
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140253
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
>What are the use cases for disabling exceptions but still allowing the
>constructs in source? e.g., do we want to start disabling the keywords
>entirely, and thus they won't appear in the AST? Or do we want them to be a
>codegen-only option, at which point they do appear in
https://github.com/erichkeane created
https://github.com/llvm/llvm-project/pull/140304
…structs
This is a partial implementation of the 'copy' lowering. It is missing 3
things, which are coming in future patches:
1- does not handle subscript/subarrays for emission as variables 2- does not
ha
@@ -250,14 +420,26 @@ class OpenACCClauseCIREmitter final
}
void VisitAsyncClause(const OpenACCAsyncClause &clause) {
+hasAsyncClause = true;
if constexpr (isOneOfTypes) {
if (!clause.hasIntExpr())
operation.addAsyncOnly(builder.getContext(), lastD
@@ -157,6 +222,103 @@ class OpenACCClauseCIREmitter final
computeEmitter.Visit(&c);
}
+ template
+ void addDataOperand(const Expr *varOperand, mlir::acc::DataClause dataClause,
+ bool structured, bool implicit) {
+DataOperandInfo opInfo =
+
@@ -0,0 +1,45 @@
+//===- CirGenCXXABI.cpp - Interface to C++ ABIs
---===//
+//
+// 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: Apa
@@ -0,0 +1,45 @@
+//===- CirGenCXXABI.cpp - Interface to C++ ABIs
---===//
+//
+// 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: Apa
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> > So I'd need to see some codegen tests that show that we're doing the right
> > thing for these, plus some sort of testing that shows that we do the right
> > thing with llvm codegen.
>
> Sure, I'll work on this.
Thanks! This was really just a "tests would be a PITA to w
https://github.com/erichkeane commented:
I don't have a problem with this, but I'd need to see a LOT more tests here.
We have this restriction because it wasn't clear whether the semantics work
correctly for codegen/llvm backends.
So I'd need to see some codegen tests that show that we're doi
@@ -5043,16 +5037,18 @@ PseudoObjectExpr::PseudoObjectExpr(QualType type,
ExprValueKind VK,
: Expr(PseudoObjectExprClass, type, VK, OK_Ordinary) {
PseudoObjectExprBits.NumSubExprs = semantics.size() + 1;
PseudoObjectExprBits.ResultIndex = resultIndex + 1;
-
- for (uns
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/140102
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> Moving the checks does work for these limited cases, but now that we don't
> have them there, one of the old tests now doesn't show up the diagnosis:
>
> ```c++
> void f() {
> throw;
> }
>
> void g() {
> try {
> f();
> } catch (...) {
> }
> }
> ```
>
> Since th
https://github.com/erichkeane commented:
First, please take a look at the LLVM coding standard re the use of 'auto'.
Second: The use of a special type for these builtins is a little novel (though
I see the predicate type already exists?), but I guess I'm ok with it. I have
some concerns with
@@ -13338,4 +13338,23 @@ def err_acc_device_type_multiple_archs
// AMDGCN builtins diagnostics
def err_amdgcn_load_lds_size_invalid_value : Error<"invalid size value">;
def note_amdgcn_load_lds_size_valid_value : Note<"size must be %select{1, 2,
or 4|1, 2, 4, 12 or 16}0">;
+de
@@ -581,6 +581,9 @@ llvm::Type *CodeGenTypes::ConvertType(QualType T) {
case BuiltinType::Id:
\
return llvm::TargetExtType::get(getLLVMContext(), "amdgcn.named.barrier",
\
{}, {S
@@ -366,4 +367,72 @@ void SemaAMDGPU::handleAMDGPUMaxNumWorkGroupsAttr(Decl *D,
addAMDGPUMaxNumWorkGroupsAttr(D, AL, AL.getArgAsExpr(0), YExpr, ZExpr);
}
+Expr *SemaAMDGPU::ExpandAMDGPUPredicateBI(CallExpr *CE) {
+ auto &Ctx = getASTContext();
erichkeane wr
1 - 100 of 2528 matches
Mail list logo