https://github.com/erichkeane approved this pull request.
Seems like a reasonable assumption for now. THOUGH, I wonder if we'd be better
off at one point instead to figure out which ones we DO know how to handle, and
use the 'nobuiltin' as a fallback instead? That way we can exercise the
bui
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
return emitAutoVarDecl(d);
}
+static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) {
+ if (cgm.getLangOpts().CPlusPlus)
+return cgm.getMangledName(&d).str();
+
+ // If this
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
if (d.hasExternalStorage())
return;
- if (d.getStorageDuration() != SD_Automatic)
-cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration");
+ if (d.getStorageDuration() !=
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
return emitAutoVarDecl(d);
}
+static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) {
+ if (cgm.getLangOpts().CPlusPlus)
+return cgm.getMangledName(&d).str();
+
+ // If this
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
return emitAutoVarDecl(d);
}
+static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) {
+ if (cgm.getLangOpts().CPlusPlus)
+return cgm.getMangledName(&d).str();
+
+ // If this
@@ -219,6 +236,252 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
return emitAutoVarDecl(d);
}
+static std::string getStaticDeclName(CIRGenModule &cgm, const VarDecl &d) {
+ if (cgm.getLangOpts().CPlusPlus)
+return cgm.getMangledName(&d).str();
+
+ // If this
@@ -185,11 +185,23 @@ class CIRBaseBuilderTy : public mlir::OpBuilder {
global.getSymName());
}
+ mlir::Value createGetGlobal(cir::GlobalOp global) {
+return createGetGlobal(global.getLoc(), global);
+ }
+
cir::StoreOp createStore
https://github.com/erichkeane approved this pull request.
Minor suggestions, else LGTM.
https://github.com/llvm/llvm-project/pull/143980
___
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/143980
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -208,8 +208,25 @@ void CIRGenFunction::emitVarDecl(const VarDecl &d) {
if (d.hasExternalStorage())
return;
- if (d.getStorageDuration() != SD_Automatic)
-cgm.errorNYI(d.getSourceRange(), "emitVarDecl automatic storage duration");
+ if (d.getStorageDuration() !=
@@ -1981,8 +1983,16 @@ static ExtractedTypeTraitInfo
ExtractTypeTraitFromExpression(const Expr *E) {
Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
-for (const auto &Arg : VD->getTemplateArgs().asArray())
- Args.push_back(Arg.getAsTyp
@@ -1981,8 +1983,16 @@ static ExtractedTypeTraitInfo
ExtractTypeTraitFromExpression(const Expr *E) {
Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
-for (const auto &Arg : VD->getTemplateArgs().asArray())
- Args.push_back(Arg.getAsTyp
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/143932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -267,23 +267,60 @@ class AggValueSlot {
Address addr;
clang::Qualifiers quals;
+ /// This is set to true if some external code is responsible for setting up a
+ /// destructor for the slot. Otherwise the code which constructs it should
+ /// push the appropriate cle
https://github.com/erichkeane approved this pull request.
bitfields are specified problematically, else lgtm.
https://github.com/llvm/llvm-project/pull/143932
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailma
@@ -2253,6 +2260,53 @@ static void DiagnoseNonTriviallyCopyableReason(Sema
&SemaRef,
}
}
+static void DiagnoseNonConstructibleReason(
+Sema &SemaRef, SourceLocation Loc,
+const llvm::SmallVector &Ts) {
+ for (const auto &ArgTy : Ts) {
+if (ArgTy->isVoidType())
@@ -2253,6 +2260,53 @@ static void DiagnoseNonTriviallyCopyableReason(Sema
&SemaRef,
}
}
+static void DiagnoseNonConstructibleReason(
+Sema &SemaRef, SourceLocation Loc,
+const llvm::SmallVector &Ts) {
+ for (const auto &ArgTy : Ts) {
erichkeane wr
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo
ExtractTypeTraitFromExpression(const Expr *E) {
Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
-for (const auto &Arg : VD->getTemplateArgs().asArray())
- Args.push_back(Arg.getAsTyp
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo
ExtractTypeTraitFromExpression(const Expr *E) {
Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
-for (const auto &Arg : VD->getTemplateArgs().asArray())
- Args.push_back(Arg.getAsTyp
https://github.com/erichkeane approved this pull request.
Few comments, but generally looks good to me.
https://github.com/llvm/llvm-project/pull/143309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/list
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/143309
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1981,8 +1982,14 @@ static ExtractedTypeTraitInfo
ExtractTypeTraitFromExpression(const Expr *E) {
Trait = StdNameToTypeTrait(Name);
if (!Trait)
return std::nullopt;
-for (const auto &Arg : VD->getTemplateArgs().asArray())
- Args.push_back(Arg.getAsTyp
https://github.com/erichkeane commented:
I find myself wondering based on the patch: DO we actually care about the token
itself, or just the kind? Could we instead have `peekNextPPToken` instead be
`peekNextPPTokenKind` and just return the next token kind?
That way we don't need the optional,
@@ -4503,7 +4510,7 @@ static CompleteObject findCompleteObject(EvalInfo &Info,
const Expr *E,
} else {
const Expr *Base = LVal.Base.dyn_cast();
-if (!Frame) {
+if (AK != clang::AK_ReferenceInitialization && !Frame) {
erichkeane wrote:
Can we mo
https://github.com/erichkeane commented:
2 comments. Else, I'm not really the best one to review th is part of the
code, but everything looks appropriate.
https://github.com/llvm/llvm-project/pull/143667
___
cfe-commits mailing list
cfe-commits@lists
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/143667
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4418,6 +4420,9 @@ static CompleteObject findCompleteObject(EvalInfo &Info,
const Expr *E,
return CompleteObject();
}
+// if(AK == clang::AK_ReferenceInitialization)
erichkeane wrote:
This is commented out?
https://github.com/llvm/llvm-proj
https://github.com/erichkeane commented:
Typically we set limits like this for at least somewhat of a reasoned-reason.
Can we do some archeology to figure out when/why we decided on this limit?
Many times these limits are a result of our own stack space limits, so it would
be interesting to
erichkeane wrote:
> Erich, is there a good point-of-contact at nvidia who can review CUDA
> intrinsic header changes in the future?
For the most part, we don't have ANYTHING to do with CUDA in clang as far as I
know. I also don't know much about CUDA, but I'll ping an internal slack
channel
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/143751
___
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/143751
PR #143720 adds a requirement to the ACC dialect that every acc.loop must have
a seq, independent, or auto attribute for the 'default' device_type. The
standard has rules for how this can be intuited:
orpha
https://github.com/erichkeane updated
https://github.com/llvm/llvm-project/pull/143751
>From 644612d088f28a21f7f59496de00f8c14de89c1d Mon Sep 17 00:00:00 2001
From: erichkeane
Date: Wed, 11 Jun 2025 09:54:46 -0700
Subject: [PATCH 1/2] [OpenACC][CIR] Add parallelism determ. to all acc.loops
PR
@@ -21,6 +21,88 @@
using namespace clang;
using namespace clang::CIRGen;
+/// Checks whether the given constructor is a valid subject for the
+/// complete-to-base constructor delgation optimization, i.e. emitting the
erichkeane wrote:
```suggestion
/// compl
@@ -21,6 +21,88 @@
using namespace clang;
using namespace clang::CIRGen;
+/// Checks whether the given constructor is a valid subject for the
+/// complete-to-base constructor delgation optimization, i.e. emitting the
+/// complete constructor as a simple call to the base cons
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -37,6 +37,10 @@ class CIRGenCXXABI {
void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr);
+ /// Emit a single constructor/destructor with the gien type from a C++
erichkeane wrote:
```suggestion
/// Emit a single constructor/destructor
@@ -72,6 +82,72 @@ void
CIRGenItaniumCXXABI::emitInstanceFunctionProlog(SourceLocation loc,
}
}
+void CIRGenItaniumCXXABI::addImplicitStructorParams(CIRGenFunction &cgf,
+QualType &retTY,
+
@@ -55,12 +59,29 @@ class CIRGenCXXABI {
return md->getParent();
}
+ /// Return whether the given global decl needs a VTT parameter.
erichkeane wrote:
can we say what a VTT parameter is?
https://github.com/llvm/llvm-project/pull/143639
___
@@ -37,6 +37,10 @@ class CIRGenCXXABI {
void setCXXABIThisValue(CIRGenFunction &cgf, mlir::Value thisPtr);
+ /// Emit a single constructor/destructor with the gien type from a C++
+ /// constructor Decl.
erichkeane wrote:
```suggestion
/// constructor/
https://github.com/erichkeane approved this pull request.
A few nits, but happy once the others are.
https://github.com/llvm/llvm-project/pull/143639
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinf
erichkeane wrote:
I'm disturbed at how much of these fixes are ending up being `getCanonicalDecl`
sprinkled around. IMO we need to start being better about making the functions
we use to 'check' things auto-canonicalizing.
https://github.com/llvm/llvm-project/pull/143661
_
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143661
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -63,3 +66,74 @@ Address CIRGenFunction::getAddressOfBaseClass(
return value;
}
+
+void CIRGenFunction::emitCXXConstructorCall(const clang::CXXConstructorDecl *d,
+clang::CXXCtorType type,
+
@@ -141,6 +190,44 @@ arrangeFreeFunctionLikeCall(CIRGenTypes &cgt, CIRGenModule
&cgm,
return cgt.arrangeCIRFunctionInfo(retType, argTypes, required);
}
+/// Arrange a call to a C++ method, passing the given arguments.
+///
+/// passProtoArgs indicates whether `args` has arg
@@ -76,6 +83,48 @@ static void appendParameterTypes(const CIRGenTypes &cgt,
cgt.getCGModule().errorNYI("appendParameterTypes: hasExtParameterInfos");
}
+const CIRGenFunctionInfo &
+CIRGenTypes::arrangeCXXStructorDeclaration(GlobalDecl gd) {
+ auto *md = cast(gd.getDecl());
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/107768
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -63,3 +66,74 @@ Address CIRGenFunction::getAddressOfBaseClass(
return value;
}
+
+void CIRGenFunction::emitCXXConstructorCall(const clang::CXXConstructorDecl *d,
+clang::CXXCtorType type,
+
@@ -141,6 +190,44 @@ arrangeFreeFunctionLikeCall(CIRGenTypes &cgt, CIRGenModule
&cgm,
return cgt.arrangeCIRFunctionInfo(retType, argTypes, required);
}
+/// Arrange a call to a C++ method, passing the given arguments.
+///
+/// passProtoArgs indicates whether `args` has arg
@@ -63,3 +66,74 @@ Address CIRGenFunction::getAddressOfBaseClass(
return value;
}
+
+void CIRGenFunction::emitCXXConstructorCall(const clang::CXXConstructorDecl *d,
+clang::CXXCtorType type,
+
@@ -76,6 +83,48 @@ static void appendParameterTypes(const CIRGenTypes &cgt,
cgt.getCGModule().errorNYI("appendParameterTypes: hasExtParameterInfos");
}
+const CIRGenFunctionInfo &
+CIRGenTypes::arrangeCXXStructorDeclaration(GlobalDecl gd) {
+ auto *md = cast(gd.getDecl());
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/143487
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -260,6 +260,11 @@ static void CheckStringInit(Expr *Str, QualType &DeclT,
const ArrayType *AT,
diag::ext_initializer_string_for_char_array_too_long)
<< Str->getSourceRange();
else if (StrLength - 1 == ArrayLen) {
+ // If the string literal is
https://github.com/erichkeane commented:
Please add tests for other encodings.
Also, needs a release note.
https://github.com/llvm/llvm-project/pull/143487
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/
https://github.com/erichkeane approved this pull request.
I spent a while with these changes, and they all seem correct to me best I can
tell. As most seems to just be deletions, its as good as I can figure.
It would be cool if we could have done this more gradually, but I'm happy to
commit-a
@@ -201,6 +201,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; }
cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; }
+ cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal);
+
+ cir
@@ -0,0 +1,30 @@
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu
-Wno-unused-value -fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -std=c++11 -triple x86_64-unknown-linux-gnu
-Wno-unused-value -fcla
@@ -0,0 +1,55 @@
+//===--===//
+//
+// 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: Apac
@@ -229,6 +230,36 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; }
cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; }
+ cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal);
+
+ cir
@@ -229,6 +230,36 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; }
cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; }
+ cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal);
+
+ cir
@@ -38,3 +38,25 @@ mlir::Value CIRGenBuilderTy::getArrayElement(mlir::Location
arrayLocBegin,
const mlir::Type flatPtrTy = basePtr.getType();
return create(arrayLocEnd, flatPtrTy, basePtr, idx);
}
+
+cir::ConstantOp CIRGenBuilderTy::getConstInt(mlir::Location loc,
+
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143243
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -4431,7 +4431,11 @@ destroy the object before returning. The lifetime of the
copy of the parameter
in the caller ends without a destructor call when the call begins.
If a type is trivial for the purpose of calls, it is assumed to be trivially
-relocatable for the purpose o
@@ -4431,7 +4431,11 @@ destroy the object before returning. The lifetime of the
copy of the parameter
in the caller ends without a destructor call when the call begins.
If a type is trivial for the purpose of calls, it is assumed to be trivially
-relocatable for the purpose o
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143265
___
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/143195
___
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/143214
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1677,6 +1678,34 @@ bool CIRGenModule::verifyModule() const {
return mlir::verify(theModule).succeeded();
}
+// TODO(cir): this can be shared with LLVM codegen.
+CharUnits CIRGenModule::computeNonVirtualBaseClassOffset(
+const CXXRecordDecl *derivedClass, CastExpr::pa
@@ -1677,6 +1678,34 @@ bool CIRGenModule::verifyModule() const {
return mlir::verify(theModule).succeeded();
}
+// TODO(cir): this can be shared with LLVM codegen.
+CharUnits CIRGenModule::computeNonVirtualBaseClassOffset(
+const CXXRecordDecl *derivedClass, CastExpr::pa
@@ -0,0 +1,69 @@
+//===--===//
+//
+// 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: Apac
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143195
___
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.
Once this passes CI/goes green check, I think we're good to click the 'merge'
button.
https://github.com/llvm/llvm-project/pull/142800
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
ht
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/143136
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> It looks like we have a number of approvals and I haven't seen any objections
> yet.
>
> Should we go ahead with merging this in the current state? If so, I'll need
> help there since I don't have commit access yet. @tarunprabhu would you mind
> volunteering to mash the me
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143176
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -3167,3 +3167,29 @@ void tools::handleInterchangeLoopsArgs(const ArgList
&Args,
options::OPT_fno_loop_interchange, EnableInterchange))
CmdArgs.push_back("-floop-interchange");
}
+
+std::optional tools::ParseMPreferVectorWidthOption(
+clang::Diagno
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143125
___
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/143136
'host_data' has its own Op kind, so this handles the lowering there, it looks
exactly like the other ones we've done so far, so nothing novel here.
host_data takes 3 clauses, 1 of which is required.
'use_de
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143034
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext
&Ctx) const {
return Ctx.getReferenceQualifiedType(this);
}
+std::pair
+ObjCMessageExpr::getUnusedResultAttr(ASTContext &Ctx) const {
+ // If the callee is marked nodiscard, return that attribute
+
@@ -272,6 +273,26 @@ QualType ObjCMessageExpr::getCallReturnType(ASTContext
&Ctx) const {
return Ctx.getReferenceQualifiedType(this);
}
+std::pair
erichkeane wrote:
I think we're decades past 'maybe we'll support other kinds some day' :D
If you're willi
https://github.com/erichkeane closed
https://github.com/llvm/llvm-project/pull/142998
___
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 think this is a strict improvement, and I think looks correct to me.
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.l
@@ -0,0 +1,35 @@
+#ifndef LLVM_CLANG_BASIC_ATTRIBUTESCOPEINFO_H
erichkeane wrote:
This needs a file header.
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/141305
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
erichkeane wrote:
> Nice job with the testing! I had a moment of panic seeing the size of this
> change, only to find that it's mostly test cases. I have a couple of
> questions, but it looks good.
Honestly you're not wrong :) I wrote all of these tests in advance expecting
this to be 6-7 di
@@ -754,12 +754,320 @@ void acc_compute(int parmVar) {
// CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64
// CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64
// CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32)
extent(%[[ONE_CAST2]]
@@ -754,12 +754,320 @@ void acc_compute(int parmVar) {
// CHECK-NEXT: %[[ZERO_CONST:.*]] = arith.constant 0 : i64
// CHECK-NEXT: %[[ONE_CONST2:.*]] = arith.constant 1 : i64
// CHECK-NEXT: %[[BOUNDS3:.*]] = acc.bounds lowerbound(%[[ONE_CAST]] : si32)
extent(%[[ONE_CAST2]]
@@ -226,6 +228,10 @@ class OpenACCClauseCIREmitter final
mlir::Location exprLoc = cgf.cgm.getLoc(curVarExpr->getBeginLoc());
llvm::SmallVector bounds;
+std::string exprString;
+llvm::raw_string_ostream os(exprString);
+e->printPretty(os, nullptr, cgf.getCon
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/143032
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,88 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-llvm %s -o
@@ -0,0 +1,88 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-cir %s -o %t.cir
+// RUN: FileCheck --input-file=%t.cir %s -check-prefix=CIR
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -Wno-unused-value
-fclangir -emit-llvm %s -o
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/143029
___
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.
2 nits, else lgtm.
https://github.com/llvm/llvm-project/pull/143029
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1858,6 +1858,40 @@ def FuncOp : CIR_Op<"func", [
let hasVerifier = 1;
}
+//===--===//
+// LLVMIntrinsicCallOp
+//===--===//
+
+def LLVM
@@ -44,16 +44,25 @@ class CIRGenCalleeInfo {
class CIRGenCallee {
enum class SpecialKind : uintptr_t {
Invalid,
+Builtin,
erichkeane wrote:
Line 49 needs to be updated for this.
https://github.com/llvm/llvm-project/pull/142981
__
@@ -201,6 +201,19 @@ class CIRGenBuilderTy : public cir::CIRBaseBuilderTy {
cir::IntType getUInt32Ty() { return typeCache.UInt32Ty; }
cir::IntType getUInt64Ty() { return typeCache.UInt64Ty; }
+ cir::ConstantOp getConstInt(mlir::Location loc, llvm::APSInt intVal);
+
+ cir
@@ -1004,8 +1004,48 @@ static cir::FuncOp emitFunctionDeclPointer(CIRGenModule
&cgm, GlobalDecl gd) {
return cgm.getAddrOfFunction(gd);
}
-static CIRGenCallee emitDirectCallee(CIRGenModule &cgm, GlobalDecl gd) {
- assert(!cir::MissingFeatures::opCallBuiltinFunc());
+// Det
@@ -47,6 +47,10 @@ class CIRGenFunction : public CIRGenTypeCache {
/// is where the next operations will be introduced.
CIRGenBuilderTy &builder;
+ /// Largest vector width used in ths function. Will be used to create a
erichkeane wrote:
```suggestion
https://github.com/erichkeane edited
https://github.com/llvm/llvm-project/pull/142981
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
1 - 100 of 2735 matches
Mail list logo