efriedma-quic wrote:
The two issues are sort of tied together: if the intrinsic isn't IntrNoMem, I
suspect the assumption cache stops cooperating.
But anyway, I guess the question is really whether we want these constructs
represented explicitly in IR, to try to leverage the AssumptionCache, o
@@ -1060,236 +1061,358 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
@@ -1060,236 +1061,358 @@
CodeGenFunction::evaluateOrEmitBuiltinObjectSize(const Expr *E, unsigned Type,
return ConstantInt::get(ResType, ObjectSize, /*isSigned=*/true);
}
-const FieldDecl *CodeGenFunction::FindFlexibleArrayMemberFieldAndOffset(
-ASTContext &Ctx, const
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/122735
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -86,6 +86,35 @@ IRBuilderBase::createCallHelper(Function *Callee,
ArrayRef Ops,
return CI;
}
+CallInst *IRBuilderBase::CreateCall(FunctionType *FTy, Value *Callee,
+ArrayRef Args,
+ArrayRef OpBundles
https://github.com/efriedma-quic commented:
LGTM with one minor comment
https://github.com/llvm/llvm-project/pull/122735
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
The 32-bit Arm failures are fixed by 7aec7caca30f800811b76ba94291645494788a4f .
The other failures appear to be unrelated.
https://github.com/llvm/llvm-project/pull/120300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
h
Author: Eli Friedman
Date: 2025-01-14T14:49:45-08:00
New Revision: 7aec7caca30f800811b76ba94291645494788a4f
URL:
https://github.com/llvm/llvm-project/commit/7aec7caca30f800811b76ba94291645494788a4f
DIFF:
https://github.com/llvm/llvm-project/commit/7aec7caca30f800811b76ba94291645494788a4f.diff
@@ -1,4 +1,5 @@
;RUN: llc -mtriple=armv7-eabi %s -o - | FileCheck %s
+;RUN: llc -mtriple=armv7-msvc %s -o - | FileCheck %s
efriedma-quic wrote:
That's fine. But the CHECK lines in the new test don't look right (`nobits`
etc. are ELF-specific).
https://github.
@@ -66,6 +66,12 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID
IID) {
}
}
+bool IntrinsicInst::canAccessFPEnvironment(LLVMContext &C, Intrinsic::ID IID) {
+ AttributeList Attrs = Intrinsic::getAttributes(C, IID);
+ MemoryEffects ME = Attrs.getMemoryEffects();
@@ -997,6 +997,9 @@ def warn_npot_ms_struct : Warning<
"data types with sizes that aren't a power of two">,
DefaultError, InGroup;
+def err_itanium_layout_unimplemented : Error<
+ "Itanium-compatible layout for the Microsoft C++ ABI is not yet supported">;
---
@@ -0,0 +1,18 @@
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu %s
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-linux-gnu
-fms-layout-compatibility=microsoft %s
+// RUN: %clang_cc1 -emit-llvm-only -triple x86_64-pc-windows-gnu %s
+// RUN: %clang_cc1 -emi
@@ -66,6 +66,17 @@ bool IntrinsicInst::mayLowerToFunctionCall(Intrinsic::ID
IID) {
}
}
+bool IntrinsicInst::canAccessFPEnvironment(Intrinsic::ID IID) {
+ switch (IID) {
+#define DAG_INSTRUCTION(NAME, NARG, ROUND_MODE, INTRINSIC, DAGN)
\
+case Intrinsic::INTR
@@ -137,6 +137,10 @@ llvm::AllocaInst
*CodeGenFunction::CreateTempAlloca(llvm::Type *Ty,
Alloca =
new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(),
ArraySize, Name, AllocaInsertPt->getIterator());
+ if (Alloca->getName
@@ -82,7 +82,7 @@ define void @test_store(ptr %p) {
@G = external global ptr
define i8 @test_store_capture(ptr %p) {
-; FNATTRS: Function Attrs: mustprogress nofree norecurse nosync nounwind
willreturn memory(readwrite, argmem: read, inaccessiblemem: none)
+; FNATTRS: Functio
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120783
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic commented:
This seems like roughly what I expected from the proposal.
https://github.com/llvm/llvm-project/pull/120783
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listi
efriedma-quic wrote:
Addressed review comments
https://github.com/llvm/llvm-project/pull/120300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120300
>From 12ad982b984a4e533db4220332f6edbf4b4903a2 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 10 Dec 2024 15:23:55 -0800
Subject: [PATCH] [cindex] Add API to query more information about base
clas
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120300
>From ff0f4b551de077ee07331ed30410b102abb06c09 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 10 Dec 2024 15:23:55 -0800
Subject: [PATCH] [cindex] Add API to query more information about base
clas
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120300
>From 0d4bcf69c57457ba79af9069ae60c6de8ee45498 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 10 Dec 2024 15:23:55 -0800
Subject: [PATCH] [cindex] Add API to query more information about base
clas
https://github.com/efriedma-quic closed
https://github.com/llvm/llvm-project/pull/122386
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
I'm tempted to say we should just treat
-fwrapv/-fwrapv-pointer/-fno-strict-overflow as aliases for each other. I
don't think anyone using -fwrapv is going to be happy that we're turning on
overflow optimizations.
https://github.com/llvm/llvm-project/pull/122486
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/122386
>From 2f6e9acc324802854132ff1b48693a47a8466fa4 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 17:46:09 -0800
Subject: [PATCH] [libclang] Allow using PrintingPolicy with types
This allo
@@ -3771,6 +3771,12 @@ CINDEX_LINKAGE enum CXRefQualifierKind
clang_Type_getCXXRefQualifier(CXType T);
*/
CINDEX_LINKAGE unsigned clang_isVirtualBase(CXCursor);
+/**
+ * Returns the offset in bits of a CX_CXXBaseSpecifier relative to the parent
+ * class.
+ */
+CINDEX_LINKAG
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/121788
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/122386
>From 0557238b725ecf3554f91ef264d710ff841fd1e1 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 17:46:09 -0800
Subject: [PATCH] [libclang] Allow using PrintingPolicy with types
This allo
https://github.com/efriedma-quic created
https://github.com/llvm/llvm-project/pull/122386
This allows controlling pretty-printing of types the same way it works with
cursors.
>From a96fbe38f697f77c12c712f5573c2158072a8d2f Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 17:4
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120300
>From 448537876f4377686847120a923dd9d443f7d556 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 10 Dec 2024 15:23:55 -0800
Subject: [PATCH] [cindex] Add API to query more information about base
clas
https://github.com/efriedma-quic closed
https://github.com/llvm/llvm-project/pull/120494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
Oh, looks like that fixed it, thanks.
https://github.com/llvm/llvm-project/pull/120494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/119387
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -137,6 +137,10 @@ llvm::AllocaInst
*CodeGenFunction::CreateTempAlloca(llvm::Type *Ty,
Alloca =
new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(),
ArraySize, Name, AllocaInsertPt->getIterator());
+ if (Alloca->getName
efriedma-quic wrote:
For reference, when it was added, the important thing about StringLiteral was
that it had a constexpr constructor. The StringRef constructor became
constexpr with 57effbdadc0b382db4ef86addcfd03a64c9eda0a, a few years after
StringLiteral was added.
https://github.com/llvm
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/120861
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic approved this pull request.
LGTM
I don't see any reason to mess with the runtime bits: we try to keep them
stable where we can.
https://github.com/llvm/llvm-project/pull/120719
___
cfe-commits mailing list
cfe-commits
@@ -803,10 +804,16 @@ bool ConstStructBuilder::Build(const InitListExpr *ILE,
bool AllowOverwrite) {
if (!AppendField(Field, Layout.getFieldOffset(FieldNo), EltInit,
AllowOverwrite))
return false;
- // After emitting a non-empty field
@@ -389,14 +389,28 @@ void CGRecordLowering::accumulateFields(bool
isNonVirtualBaseType) {
// Empty fields have no storage.
++Field;
} else {
- // Use base subobject layout for the potentially-overlapping field,
- // as it is done in RecordLayoutBuild
@@ -389,14 +389,28 @@ void CGRecordLowering::accumulateFields(bool
isNonVirtualBaseType) {
// Empty fields have no storage.
++Field;
} else {
- // Use base subobject layout for the potentially-overlapping field,
- // as it is done in RecordLayoutBuild
efriedma-quic wrote:
I think you need to do some target-specific stuff to get the builtins library
to build... see, for example, https://reviews.llvm.org/D42958 .
https://github.com/llvm/llvm-project/pull/109164
___
cfe-commits mailing list
cfe-commit
efriedma-quic wrote:
Still failing the same way.
Should I go ahead and merge anyway, or is there someone who can look into this?
https://github.com/llvm/llvm-project/pull/120494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llv
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120494
>From 13a9c0b88afae7a5f48a66e86357f7284fdace95 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 15:25:00 -0800
Subject: [PATCH] [libclang/python] Add python bindings for PrintingPolicy
T
@@ -137,6 +137,10 @@ llvm::AllocaInst
*CodeGenFunction::CreateTempAlloca(llvm::Type *Ty,
Alloca =
new llvm::AllocaInst(Ty, CGM.getDataLayout().getAllocaAddrSpace(),
ArraySize, Name, AllocaInsertPt->getIterator());
+ if (Alloca->getName
@@ -14604,57 +14611,63 @@ bool
Sema::PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall) {
}
bool Sema::BuiltinElementwiseMath(CallExpr *TheCall, bool FPOnly) {
- QualType Res;
- if (BuiltinVectorMath(TheCall, Res, FPOnly))
-return true;
- TheCall->setType(Res);
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) {
_2, _3, _4));
}
+static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) {
+ // Don't promote integer types
+ if (QualType Ty = E->getType();
S.getASTContext().is
efriedma-quic wrote:
I think you're looking for -DLLVM_RUNTIME_TARGETS ?
https://github.com/llvm/llvm-project/pull/109164
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
> However what we want to achieve with this is to make the state of the
> streaming mode known to potentially inlineable called functions, allowing for
> further inlining and identification/removal of dead code
It seems like we're in agreement that the llvm.assume doesn't
efriedma-quic wrote:
I really don't see why we'd want to implement the optimization this way; can't
we just add an instcombine for calls to `llvm.aarch64.sme.in.streaming.mode`?
https://github.com/llvm/llvm-project/pull/121917
___
cfe-commits mailing
efriedma-quic wrote:
@DeinAlptraum any idea why the Python tests are failing?
https://github.com/llvm/llvm-project/pull/120494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/119563
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) {
_2, _3, _4));
}
+static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) {
+ // Don't promote integer types
+ if (QualType Ty = E->getType();
S.getASTContext().is
efriedma-quic wrote:
I think the relevant code that prevents visiting template instantiations is
CursorVisitor::VisitClassTemplateSpecializationDecl. It intentionally skips
implicit template instantiations, I guess because of the origin of the API,
which was focused around code written by the
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120494
>From 13a9c0b88afae7a5f48a66e86357f7284fdace95 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 15:25:00 -0800
Subject: [PATCH] [libclang/python] Add python bindings for PrintingPolicy
T
https://github.com/efriedma-quic closed
https://github.com/llvm/llvm-project/pull/120483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
efriedma-quic wrote:
Missing regression test in clang/test/CodeGen.
We probably want a release note for this (clang/docs/ReleaseNotes.rst).
(If you're interested, there's another x86-64 ABI bug which nobody got around
to fixing: #76017.)
https://github.com/llvm/llvm-project/pull/120670
__
https://github.com/efriedma-quic approved this pull request.
LGTM
I somehow thought you could use arm_sve_vector_bits with tuples, but I guess
not.
https://github.com/llvm/llvm-project/pull/118961
___
cfe-commits mailing list
cfe-commits@lists.llvm.o
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120494
>From 13a9c0b88afae7a5f48a66e86357f7284fdace95 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 15:25:00 -0800
Subject: [PATCH] [libclang/python] Add python bindings for PrintingPolicy
T
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120483
>From ba71a3ddba2ab2f816c6285614aa04ae2614e672 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Wed, 18 Dec 2024 13:55:40 -0800
Subject: [PATCH] [cindex] Add python binding for
clang_Cursor_isAnonymousRe
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120300
>From 448537876f4377686847120a923dd9d443f7d556 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 10 Dec 2024 15:23:55 -0800
Subject: [PATCH] [cindex] Add API to query more information about base
clas
@@ -2663,6 +2671,21 @@ def visitor(field, children):
conf.lib.clang_Type_visitFields(self, fields_visit_callback(visitor),
fields)
return iter(fields)
+def get_bases(self):
+"""Return an iterator for accessing the base classes of this type."""
+
+
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120483
>From 226718966fdbd517f288ce6e4de11cde0aa634cc Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Wed, 18 Dec 2024 13:55:40 -0800
Subject: [PATCH] [cindex] Add python binding for
clang_Cursor_isAnonymousRe
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120483
>From 4a525f61f9b67fcd887ed64a8c80521f7a21016d Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Wed, 18 Dec 2024 13:55:40 -0800
Subject: [PATCH] [cindex] Add python binding for
clang_Cursor_isAnonymousRe
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120494
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120494
>From 4de2bf3b617538fbc299d5f84d8a8e17d3ff5072 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 15:25:00 -0800
Subject: [PATCH] [libclang/python] Add python bindings for PrintingPolicy
T
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120534
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -100,10 +244,17 @@ class Context {
/// Return the identifier name for the specified builtin,
/// e.g. "__builtin_abs".
- llvm::StringRef getName(unsigned ID) const { return getRecord(ID).Name; }
+ std::string getName(unsigned ID) const;
efriedma-quic
@@ -100,10 +244,17 @@ class Context {
/// Return the identifier name for the specified builtin,
/// e.g. "__builtin_abs".
- llvm::StringRef getName(unsigned ID) const { return getRecord(ID).Name; }
+ std::string getName(unsigned ID) const;
+
+ /// Return the identifier
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/114217
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic updated
https://github.com/llvm/llvm-project/pull/120494
>From ec604efdae3e05bf14ade994cbc7d0f1acebd1c6 Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 15:25:00 -0800
Subject: [PATCH] [libclang/python] Add python bindings for PrintingPolicy
-
https://github.com/efriedma-quic created
https://github.com/llvm/llvm-project/pull/120494
None
>From 8f2e784333ed7cdd746dd408b18c2f12297378fe Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Tue, 17 Dec 2024 15:25:00 -0800
Subject: [PATCH] [libclang/python] Add python bindings for PrintingPol
@@ -129,4 +130,224 @@ def PrimitiveInt
: AnyTypeOf<[UInt8, UInt16, UInt32, UInt64, SInt8, SInt16, SInt32, SInt64],
"primitive int", "::cir::IntType">;
+//===--===//
+// FloatType
+//===
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120483
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120300
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic created
https://github.com/llvm/llvm-project/pull/120483
None
>From 16e84acd0e86bf2653d4b3fa132bcf661a34e62f Mon Sep 17 00:00:00 2001
From: Eli Friedman
Date: Wed, 18 Dec 2024 13:55:40 -0800
Subject: [PATCH] [cindex] Add python binding for
clang_Cursor_isAnony
@@ -14585,11 +14585,18 @@ void Sema::CheckAddressOfPackedMember(Expr *rhs) {
_2, _3, _4));
}
+static ExprResult UsualUnaryConversionsNoPromoteInt(Sema &S, Expr *E) {
+ // Don't promote integer types
+ if (QualType Ty = E->getType();
S.getASTContext().is
@@ -68,15 +66,18 @@ void test_builtin_elementwise_add_sat(float f1, float f2,
double d1, double d2,
long long int i2, si8 vi1, si8 vi2,
unsigned u1, unsigned u2, u4 vu1, u4 vu2,
@@ -14604,57 +14611,63 @@ bool
Sema::PrepareBuiltinElementwiseMathOneArgCall(CallExpr *TheCall) {
}
bool Sema::BuiltinElementwiseMath(CallExpr *TheCall, bool FPOnly) {
- QualType Res;
- if (BuiltinVectorMath(TheCall, Res, FPOnly))
-return true;
- TheCall->setType(Res);
https://github.com/efriedma-quic approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/120449
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -1977,15 +1977,15 @@ def AtomicNandFetch : AtomicBuiltin {
let Prototype = "void(...)";
}
-def AtomicTestAndSet : Builtin {
+def AtomicTestAndSet : AtomicBuiltin {
let Spellings = ["__atomic_test_and_set"];
- let Attributes = [NoThrow];
+ let Attributes = [NoThrow, C
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/120449
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/efriedma-quic created
https://github.com/llvm/llvm-project/pull/120300
The first API is clang_visitCXXBaseClasses: this allows visiting the base
classes without going through the generic child visitor (which is awkward, and
doesn't work for template instantiations).
The sec
@@ -5272,8 +5272,11 @@ bool Sema::BuiltinAssumeAligned(CallExpr *TheCall) {
{
ExprResult FirstArgResult =
DefaultFunctionArrayLvalueConversion(FirstArg);
-if (checkBuiltinArgument(*this, TheCall, 0))
efriedma-quic wrote:
Took another look at
efriedma-quic wrote:
Please add a test for a struct containing an SVE tuple.
https://github.com/llvm/llvm-project/pull/118961
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -20,4 +20,7 @@ void vla(int n, ...)
__builtin_va_list ap;
void *p;
p = __builtin_va_arg(ap, typeof (int (*)[++n])); // CHECK: add nsw i32
{{.*}}, 1
+ // Don't crash on some undefined behaviors.
+ p = __builtin_va_arg(ap, typeof (int [++n])); // expected-warning{{sec
@@ -16538,6 +16538,13 @@ ExprResult Sema::BuildVAArgExpr(SourceLocation
BuiltinLoc,
<< TInfo->getTypeLoc().getSourceRange();
}
+if (TInfo->getType()->isVariableArrayType()) {
efriedma-quic wrote:
This should check for any array type; the issu
@@ -6121,6 +6121,8 @@ RValue CodeGenFunction::EmitVAArg(VAArgExpr *VE, Address
&VAListAddr,
VAListAddr = VE->isMicrosoftABI() ? EmitMSVAListRef(VE->getSubExpr())
: EmitVAListRef(VE->getSubExpr());
QualType Ty = VE->getType();
+ if (Ty->
https://github.com/efriedma-quic edited
https://github.com/llvm/llvm-project/pull/118008
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -0,0 +1,112 @@
+//===--- Xtensa.h - Declare Xtensa target feature support ---*- C++
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE
https://github.com/efriedma-quic approved this pull request.
LGTM with one very minor comment
https://github.com/llvm/llvm-project/pull/118008
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-c
efriedma-quic wrote:
If people aren't using the edge cases, they won't notice if we start error'ing
out. If they are, it's pretty easy to adapt the code to build with both old
and new compilers. A quick GitHub search shows exactly one user of the
builtins outside of clang itself, and that co
efriedma-quic wrote:
On the clang side, we've intentionally ignored the nonnull marking on memcpy
and friends for a long time; we made a decision a few years back the
optimization wasn't worthwhile compared to the security risk.
The updated patch doesn't do anything useful; we can prove the po
efriedma-quic wrote:
The function in question is part of the Itanium C++ ABI; the ABI itself doesn't
say anything about address-spaces, so by default we assume everything related
to the C++ ABI is in the flat address-space. If we start messing with that,
we'll need to write a specification so
efriedma-quic wrote:
C standard rules for va_arg: "[...] if *type* is not compatible with the type
of the actual next argument [...], the behavior is undefined [...]". A struct
is never compatible with an array, so yes , it's undefined. (See 6.2.7 for
what constitutes a "compatible type".)
@@ -0,0 +1,62 @@
+//===--- Xtensa.cpp - Implement Xtensa target feature support
-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE.
efriedma-quic wrote:
My concern here is there's a tradeoff: there's less complexity constructing the
type, maybe, but as a result you've scattered checks all over the code for a
type that's basically the same as a VectorType. At first glance, this doesn't
seem like the right tradeoff.
https:
efriedma-quic wrote:
Even with this fix, the behavior with mixed types still seems really confusing,
especially if you mix signed/unsigned inputs. Can we address that somehow?
https://github.com/llvm/llvm-project/pull/119423
___
cfe-commits mailing l
efriedma-quic wrote:
Please add a testcase to clang/test/CodeGen/ . Put it in an existing file if
there's already some related test. (See also
https://llvm.org/docs/Contributing.html#how-to-submit-a-patch )
I don't think EmitAggregateCopy is the right place to call
EmitVariablyModifiedType:
@@ -0,0 +1,141 @@
+//===--- Xtensa.h - Declare Xtensa target feature support ---*- C++
-*-===//
+//
+// The LLVM Compiler Infrastructure
+//
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM
Exceptions.
+// See https://llvm.org/LICENSE
1 - 100 of 1337 matches
Mail list logo