llvm-ci wrote:
LLVM Buildbot has detected a new failure on builder
`sanitizer-x86_64-linux-bootstrap-msan` running on `sanitizer-buildbot6` while
building `clang` at step 2 "annotate".
Full details are available at:
https://lab.llvm.org/buildbot/#/builders/164/builds/9589
Here is the releva
https://github.com/andykaylor closed
https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/138222
>From b3ae2d60a178f3c5bb8950804041386a667abc6e Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Tue, 29 Apr 2025 15:47:01 -0700
Subject: [PATCH 1/4] [CIR] Refactor global variable emission and
initialization
@@ -365,46 +406,108 @@ mlir::Value CIRGenModule::getAddrOfGlobalVar(const
VarDecl *d, mlir::Type ty,
void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd,
bool isTentative) {
const QualType astTy = vd->getType();
- c
@@ -90,8 +90,100 @@ class ConstExprEmitter
}
mlir::Attribute VisitCastExpr(CastExpr *e, QualType destType) {
-cgm.errorNYI(e->getBeginLoc(), "ConstExprEmitter::VisitCastExpr");
-return {};
+if (const auto *ece = dyn_cast(e))
+ cgm.errorNYI(e->getBeginLoc()
@@ -31,6 +31,15 @@ class ConstantEmitter {
private:
bool abstract = false;
+ /// Whether non-abstract components of the emitter have been initialized.
+ bool initializedNonAbstract = false;
andykaylor wrote:
Yes, these are just for debugging. Wrapping the
@@ -365,46 +406,108 @@ mlir::Value CIRGenModule::getAddrOfGlobalVar(const
VarDecl *d, mlir::Type ty,
void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd,
bool isTentative) {
const QualType astTy = vd->getType();
- c
@@ -118,7 +210,26 @@ class ConstExprEmitter
}
mlir::Attribute VisitInitListExpr(InitListExpr *ile, QualType t) {
-cgm.errorNYI(ile->getBeginLoc(), "ConstExprEmitter::VisitInitListExpr");
+if (ile->isTransparent())
+ return Visit(ile->getInit(0), t);
+
+if
https://github.com/mmha commented:
Mostly a few nits.
https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -365,46 +406,108 @@ mlir::Value CIRGenModule::getAddrOfGlobalVar(const
VarDecl *d, mlir::Type ty,
void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd,
bool isTentative) {
const QualType astTy = vd->getType();
- c
@@ -118,7 +210,26 @@ class ConstExprEmitter
}
mlir::Attribute VisitInitListExpr(InitListExpr *ile, QualType t) {
-cgm.errorNYI(ile->getBeginLoc(), "ConstExprEmitter::VisitInitListExpr");
+if (ile->isTransparent())
+ return Visit(ile->getInit(0), t);
+
+if
@@ -365,46 +406,108 @@ mlir::Value CIRGenModule::getAddrOfGlobalVar(const
VarDecl *d, mlir::Type ty,
void CIRGenModule::emitGlobalVarDefinition(const clang::VarDecl *vd,
bool isTentative) {
const QualType astTy = vd->getType();
- c
@@ -31,6 +31,15 @@ class ConstantEmitter {
private:
bool abstract = false;
+ /// Whether non-abstract components of the emitter have been initialized.
+ bool initializedNonAbstract = false;
mmha wrote:
Is this just for sanity checking? Should this be wrap
@@ -90,8 +90,100 @@ class ConstExprEmitter
}
mlir::Attribute VisitCastExpr(CastExpr *e, QualType destType) {
-cgm.errorNYI(e->getBeginLoc(), "ConstExprEmitter::VisitCastExpr");
-return {};
+if (const auto *ece = dyn_cast(e))
+ cgm.errorNYI(e->getBeginLoc()
https://github.com/mmha edited https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/138222
>From b3ae2d60a178f3c5bb8950804041386a667abc6e Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Tue, 29 Apr 2025 15:47:01 -0700
Subject: [PATCH 1/3] [CIR] Refactor global variable emission and
initialization
@@ -46,6 +55,14 @@ class ConstantEmitter {
ConstantEmitter(const ConstantEmitter &other) = delete;
ConstantEmitter &operator=(const ConstantEmitter &other) = delete;
+ ~ConstantEmitter();
+
+ /// Try to emit the initiaizer of the given declaration as an abstract
https://github.com/AmrDeveloper approved this pull request.
https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -269,6 +269,40 @@ mlir::Operation *CIRGenModule::getGlobalValue(StringRef
name) {
return mlir::SymbolTable::lookupSymbolIn(theModule, name);
}
+cir::GlobalOp CIRGenModule::createGlobalOp(CIRGenModule &cgm,
+ mlir::Location loc, S
https://github.com/erichkeane approved this pull request.
https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -269,6 +269,40 @@ mlir::Operation *CIRGenModule::getGlobalValue(StringRef
name) {
return mlir::SymbolTable::lookupSymbolIn(theModule, name);
}
+cir::GlobalOp CIRGenModule::createGlobalOp(CIRGenModule &cgm,
+ mlir::Location loc, S
https://github.com/andykaylor updated
https://github.com/llvm/llvm-project/pull/138222
>From b3ae2d60a178f3c5bb8950804041386a667abc6e Mon Sep 17 00:00:00 2001
From: Andy Kaylor
Date: Tue, 29 Apr 2025 15:47:01 -0700
Subject: [PATCH 1/2] [CIR] Refactor global variable emission and
initialization
@@ -269,6 +269,40 @@ mlir::Operation *CIRGenModule::getGlobalValue(StringRef
name) {
return mlir::SymbolTable::lookupSymbolIn(theModule, name);
}
+cir::GlobalOp CIRGenModule::createGlobalOp(CIRGenModule &cgm,
+ mlir::Location loc, S
@@ -324,8 +358,16 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName,
mlir::Type ty,
return entry;
}
- errorNYI(d->getSourceRange(), "reference of undeclared global");
- return {};
+ mlir::Location loc = getLoc(d->getSourceRange());
+
+ // mlir::SymbolTab
https://github.com/xlauko approved this pull request.
lgtm
https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/xlauko edited
https://github.com/llvm/llvm-project/pull/138222
___
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/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/erichkeane commented:
Just 2 small comments, though I'd rather we get @bcardosolopes to take a
lookhere.
https://github.com/llvm/llvm-project/pull/138222
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org
@@ -324,8 +358,16 @@ CIRGenModule::getOrCreateCIRGlobal(StringRef mangledName,
mlir::Type ty,
return entry;
}
- errorNYI(d->getSourceRange(), "reference of undeclared global");
- return {};
+ mlir::Location loc = getLoc(d->getSourceRange());
+
+ // mlir::SymbolTab
@@ -269,6 +269,40 @@ mlir::Operation *CIRGenModule::getGlobalValue(StringRef
name) {
return mlir::SymbolTable::lookupSymbolIn(theModule, name);
}
+cir::GlobalOp CIRGenModule::createGlobalOp(CIRGenModule &cgm,
+ mlir::Location loc, S
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Andy Kaylor (andykaylor)
Changes
When global variable support was initially upstreamed, we took some shortcuts
and only implemented the minimum support for simple variables and constant
initializers.
This change refactors the code that c
https://github.com/andykaylor created
https://github.com/llvm/llvm-project/pull/138222
When global variable support was initially upstreamed, we took some shortcuts
and only implemented the minimum support for simple variables and constant
initializers.
This change refactors the code that cre
32 matches
Mail list logo