https://github.com/cor3ntin edited
https://github.com/llvm/llvm-project/pull/96023
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/cor3ntin commented:
Thanks Matheus.
I left a few nitpicky comments.
The design looks good to me I think but it's not a trivial change so Ill want
to review it more and have other people look at it too.
https://github.com/llvm/llvm-project/pull/96023
__
@@ -139,7 +139,7 @@ static TemplateDeductionResult
DeduceTemplateArgumentsByTypeMatch(
SmallVectorImpl &Deduced, unsigned TDF,
bool PartialOrdering = false, bool DeducedFromArrayBound = false);
-enum class PackFold { ParameterToArgument, ArgumentToParameter };
+enum c
@@ -2513,49 +2545,76 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList
*TemplateParams,
TemplateDeductionInfo &Info,
SmallVectorImpl &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold) {
@@ -9934,6 +9935,9 @@ class Sema final : public SemaBase {
/// We are instantiating a type alias template declaration.
TypeAliasTemplateInstantiation,
+
+ /// We are performing partial ordering for template template parameters.
+ PartialOrderTTP,
@@ -3351,14 +3416,18 @@ Sema::DeduceTemplateArgumentsFromType(TemplateDecl *TD,
QualType FromType,
if (Inst.isInvalid())
return TemplateDeductionResult::InstantiationDepth;
- if (Trap.hasErrorOccurred())
-return TemplateDeductionResult::SubstitutionFailure;
-
Te
@@ -6369,27 +6451,88 @@ bool
Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
// be inverted between Ps and As. On non-deduced context, matching needs to
// happen both ways, according to [temp.arg.template]p3, but this is
// currently implemented as a spec
@@ -3186,20 +3239,36 @@ static TemplateDeductionResult
FinishTemplateArgumentDeduction(
// Check that we produced the correct argument list.
TemplateParameterList *TemplateParams = Template->getTemplateParameters();
+ auto notSame = [&](unsigned I, const TemplateArgument
@@ -6369,27 +6451,88 @@ bool
Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
// be inverted between Ps and As. On non-deduced context, matching needs to
// happen both ways, according to [temp.arg.template]p3, but this is
// currently implemented as a spec
@@ -2513,49 +2545,76 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList
*TemplateParams,
TemplateDeductionInfo &Info,
SmallVectorImpl &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold) {
@@ -2513,49 +2545,76 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList
*TemplateParams,
TemplateDeductionInfo &Info,
SmallVectorImpl &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold) {
@@ -3284,16 +3345,20 @@ DeduceTemplateArguments(Sema &S, T *Partial,
if (Inst.isInvalid())
return TemplateDeductionResult::InstantiationDepth;
- if (Trap.hasErrorOccurred())
-return TemplateDeductionResult::SubstitutionFailure;
-
TemplateDeductionResult Result;
@@ -6038,14 +6107,23 @@ static bool isAtLeastAsSpecializedAs(Sema &S, QualType
T1, QualType T2,
return false;
const auto *TST1 = cast(T1);
- bool AtLeastAsSpecialized;
+
+ Sema::SFINAETrap Trap(S);
+
+ TemplateDeductionResult Result;
S.runWithSufficientStackSpace(
@@ -8513,64 +8513,46 @@ bool
Sema::CheckTemplateTemplateArgument(TemplateTemplateParmDecl *Param,
<< Template;
}
+ if (!getLangOpts().RelaxedTemplateTemplateArgs)
+return !TemplateParameterListsAreEqual(
+Template->getTemplateParameters(), Params, /*Compl
https://github.com/Endilll commented:
`Sema.h` changes look good.
https://github.com/llvm/llvm-project/pull/96023
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commit
@@ -11,7 +11,7 @@
! V9: unknown membar tag
membar #BadTag
-! V8: instruction requires a CPU feature not currently enabled
+! V8: unexpected token
! V9: invalid membar mask number
membar -127
s-barannikov wrote:
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/96021
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/96021
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/s-barannikov edited
https://github.com/llvm/llvm-project/pull/96021
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
@@ -1735,8 +1737,11 @@ defm : SIBufferAtomicPat<"SIbuffer_atomic_dec", i64,
"BUFFER_ATOMIC_DEC_X2">;
let OtherPredicates = [HasAtomicCSubNoRtnInsts] in
defm : SIBufferAtomicPat<"SIbuffer_atomic_csub", i32, "BUFFER_ATOMIC_CSUB",
["noret"]>;
-let SubtargetPredicate = isGFX12Pl
@@ -1085,13 +1085,24 @@ ParseStatus SparcAsmParser::parseASITag(OperandVector
&Operands) {
SMLoc E = Parser.getTok().getEndLoc();
int64_t ASIVal = 0;
- if (is64Bit() && (getLexer().getKind() == AsmToken::Hash)) {
+ switch (getLexer().getKind()) {
+ case AsmToken::LPare
@@ -11,7 +11,7 @@
! V9: unknown membar tag
membar #BadTag
-! V8: instruction requires a CPU feature not currently enabled
+! V8: unexpected token
! V9: invalid membar mask number
membar -127
s-barannikov wrote:
@@ -2513,49 +2545,76 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList
*TemplateParams,
TemplateDeductionInfo &Info,
SmallVectorImpl &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold) {
@@ -2513,49 +2545,76 @@ DeduceTemplateArguments(Sema &S, TemplateParameterList
*TemplateParams,
TemplateDeductionInfo &Info,
SmallVectorImpl &Deduced,
bool NumberOfArgumentsMustMatch, PackFold PackFold) {
@@ -3284,16 +3345,20 @@ DeduceTemplateArguments(Sema &S, T *Partial,
if (Inst.isInvalid())
return TemplateDeductionResult::InstantiationDepth;
- if (Trap.hasErrorOccurred())
-return TemplateDeductionResult::SubstitutionFailure;
-
TemplateDeductionResult Result;
@@ -6369,27 +6451,88 @@ bool
Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
// be inverted between Ps and As. On non-deduced context, matching needs to
// happen both ways, according to [temp.arg.template]p3, but this is
// currently implemented as a spec
@@ -6369,27 +6451,88 @@ bool
Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
// be inverted between Ps and As. On non-deduced context, matching needs to
// happen both ways, according to [temp.arg.template]p3, but this is
// currently implemented as a spec
@@ -6369,27 +6451,88 @@ bool
Sema::isTemplateTemplateParameterAtLeastAsSpecializedAs(
// be inverted between Ps and As. On non-deduced context, matching needs to
// happen both ways, according to [temp.arg.template]p3, but this is
// currently implemented as a spec
https://github.com/ilya-biryukov edited
https://github.com/llvm/llvm-project/pull/92511
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/ilya-biryukov commented:
Thanks for the change! I have done a round of review and left a few suggestion
and also have a bunch of questions. I am sorry if some of them may look too
obvious, I did try to dig into the code where I could, but Clang's
serialization is complicated
@@ -7650,6 +7647,16 @@ ModuleFile *ASTReader::getOwningModuleFile(GlobalDeclID
ID) const {
return &getModuleManager()[ModuleFileIndex - 1];
}
+ModuleFile *ASTReader::getOwningModuleFile(TypeID ID) const {
+ if (ID < NUM_PREDEF_TYPE_IDS)
+return nullptr;
+
+ uint64_t M
@@ -70,38 +71,53 @@ using DeclID = DeclIDBase::DeclID;
/// An ID number that refers to a type in an AST file.
///
-/// The ID of a type is partitioned into two parts: the lower
+/// The ID of a type is partitioned into three parts:
+/// - the lower
/// three bits are used to
@@ -7100,14 +7084,25 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() {
return TInfo;
}
+std::pair
+ASTReader::translateTypeIDToIndex(serialization::TypeID ID) const {
+ unsigned Index =
+ (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth;
+
+ ModuleF
@@ -3262,17 +3262,18 @@ void ASTWriter::WritePragmaDiagnosticMappings(const
DiagnosticsEngine &Diag,
/// Write the representation of a type to the AST stream.
void ASTWriter::WriteType(QualType T) {
TypeIdx &IdxRef = TypeIdxs[T];
- if (IdxRef.getIndex() == 0) // we haven't
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID,
MacroInfo *MI) {
}
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
- // Always take the highest-numbered type index. This copes with an
interesting
+ // Always take the type index that comes i
@@ -70,38 +71,53 @@ using DeclID = DeclIDBase::DeclID;
/// An ID number that refers to a type in an AST file.
///
-/// The ID of a type is partitioned into two parts: the lower
+/// The ID of a type is partitioned into three parts:
+/// - the lower
/// three bits are used to
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID,
MacroInfo *MI) {
}
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
- // Always take the highest-numbered type index. This copes with an
interesting
+ // Always take the type index that comes i
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID,
MacroInfo *MI) {
}
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
- // Always take the highest-numbered type index. This copes with an
interesting
+ // Always take the type index that comes i
@@ -70,38 +71,53 @@ using DeclID = DeclIDBase::DeclID;
/// An ID number that refers to a type in an AST file.
///
-/// The ID of a type is partitioned into two parts: the lower
+/// The ID of a type is partitioned into three parts:
+/// - the lower
/// three bits are used to
@@ -12,44 +12,44 @@
// RUN: -fmodule-file=Module=%t/Module.pcm -emit-llvm -o - | FileCheck
%t/Object.cppm
// Test again with reduced BMI.
-// RUN: rm -rf %t
-// RUN: mkdir -p %t
-// RUN: split-file %s %t
+// RUNX: rm -rf %t
ilya-biryukov wrote:
are these
@@ -7392,27 +7388,28 @@ QualType ASTReader::GetType(TypeID ID) {
return TypesLoaded[Index].withFastQualifiers(FastQuals);
}
-QualType ASTReader::getLocalType(ModuleFile &F, unsigned LocalID) {
+QualType ASTReader::getLocalType(ModuleFile &F, TypeID LocalID) {
---
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/96023
>From 7c84cd61f2c1bf7ec30d77aaf6b1a87cccf96d2f Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 17 Jun 2024 21:39:08 -0300
Subject: [PATCH] [clang] Finish implementation of P0522
This finishes the clan
https://github.com/mizvekov updated
https://github.com/llvm/llvm-project/pull/96023
>From dd761ef307502c69dd6fdbf2fa56275f56e8cb6a Mon Sep 17 00:00:00 2001
From: Matheus Izvekov
Date: Mon, 17 Jun 2024 21:39:08 -0300
Subject: [PATCH] [clang] Finish implementation of P0522
This finishes the clan
https://github.com/ldionne approved this pull request.
libcxx/ nit LGTM.
https://github.com/llvm/llvm-project/pull/96023
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch
https://github.com/ldionne created
https://github.com/llvm/llvm-project/pull/96116
None
>From 4044e7c930381e5e070c7131c5b14a3dfd373259 Mon Sep 17 00:00:00 2001
From: Louis Dionne
Date: Wed, 19 Jun 2024 16:50:07 -0400
Subject: [PATCH] [libc++] Add release note for #95264
---
libcxx/docs/Relea
https://github.com/ldionne milestoned
https://github.com/llvm/llvm-project/pull/96116
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
llvmbot wrote:
@llvm/pr-subscribers-libcxx
Author: Louis Dionne (ldionne)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/96116.diff
1 Files Affected:
- (modified) libcxx/docs/ReleaseNotes/18.rst (+9)
``diff
diff --git a/libcxx/docs/ReleaseNotes/18.rst b/li
@@ -354,6 +354,23 @@ Given that ``signedPointer`` matches the layout for signed
pointers signed with
the given key, extract the raw pointer from it. This operation does not trap
and cannot fail, even if the pointer is not validly signed.
+``ptrauth_sign_constant``
+^
@@ -58,6 +58,35 @@ void test_string_discriminator(const char *str) {
}
+void test_sign_constant(int *dp, int (*fp)(int)) {
+ __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY); // expected-error
{{too few arguments}}
+ __builtin_ptrauth_sign_constant(&dv, VALID_DATA_KEY,
@@ -354,6 +354,23 @@ Given that ``signedPointer`` matches the layout for signed
pointers signed with
the given key, extract the raw pointer from it. This operation does not trap
and cannot fail, even if the pointer is not validly signed.
+``ptrauth_sign_constant``
+^
https://github.com/kovdan01 approved this pull request.
LGTM with a couple of documentation-related comments
https://github.com/llvm/llvm-project/pull/93904
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/
https://github.com/kovdan01 edited
https://github.com/llvm/llvm-project/pull/93904
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
https://github.com/asl approved this pull request.
Thanks!
https://github.com/llvm/llvm-project/pull/94056
___
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits
ChuanqiXu9 wrote:
> Thanks for the change! I have done a round of review and left a few
> suggestion and also have a bunch of questions. I am sorry if some of them may
> look too obvious, I did try to dig into the code where I could, but Clang's
> serialization is complicated and some things a
@@ -7100,14 +7084,25 @@ TypeSourceInfo *ASTRecordReader::readTypeSourceInfo() {
return TInfo;
}
+std::pair
+ASTReader::translateTypeIDToIndex(serialization::TypeID ID) const {
+ unsigned Index =
+ (ID & llvm::maskTrailingOnes(32)) >> Qualifiers::FastWidth;
+
+ ModuleF
@@ -70,38 +71,53 @@ using DeclID = DeclIDBase::DeclID;
/// An ID number that refers to a type in an AST file.
///
-/// The ID of a type is partitioned into two parts: the lower
+/// The ID of a type is partitioned into three parts:
+/// - the lower
/// three bits are used to
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID,
MacroInfo *MI) {
}
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
- // Always take the highest-numbered type index. This copes with an
interesting
+ // Always take the type index that comes i
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID,
MacroInfo *MI) {
}
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
- // Always take the highest-numbered type index. This copes with an
interesting
+ // Always take the type index that comes i
@@ -12,44 +12,44 @@
// RUN: -fmodule-file=Module=%t/Module.pcm -emit-llvm -o - | FileCheck
%t/Object.cppm
// Test again with reduced BMI.
-// RUN: rm -rf %t
-// RUN: mkdir -p %t
-// RUN: split-file %s %t
+// RUNX: rm -rf %t
ChuanqiXu9 wrote:
Oh, sorry. T
@@ -7392,27 +7388,28 @@ QualType ASTReader::GetType(TypeID ID) {
return TypesLoaded[Index].withFastQualifiers(FastQuals);
}
-QualType ASTReader::getLocalType(ModuleFile &F, unsigned LocalID) {
+QualType ASTReader::getLocalType(ModuleFile &F, TypeID LocalID) {
---
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/92511
>From 57cfb2b7791666022ee46201b5126ac610c19bdd Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 17 May 2024 14:25:53 +0800
Subject: [PATCH 1/2] [serialization] No transitive type change
---
.../include/c
https://github.com/ChuanqiXu9 updated
https://github.com/llvm/llvm-project/pull/92511
>From 57cfb2b7791666022ee46201b5126ac610c19bdd Mon Sep 17 00:00:00 2001
From: Chuanqi Xu
Date: Fri, 17 May 2024 14:25:53 +0800
Subject: [PATCH 1/2] [serialization] No transitive type change
---
.../include/c
@@ -6659,13 +6655,22 @@ void ASTWriter::MacroRead(serialization::MacroID ID,
MacroInfo *MI) {
}
void ASTWriter::TypeRead(TypeIdx Idx, QualType T) {
- // Always take the highest-numbered type index. This copes with an
interesting
+ // Always take the type index that comes i
@@ -7650,6 +7647,16 @@ ModuleFile *ASTReader::getOwningModuleFile(GlobalDeclID
ID) const {
return &getModuleManager()[ModuleFileIndex - 1];
}
+ModuleFile *ASTReader::getOwningModuleFile(TypeID ID) const {
+ if (ID < NUM_PREDEF_TYPE_IDS)
+return nullptr;
+
+ uint64_t M
@@ -3262,17 +3262,18 @@ void ASTWriter::WritePragmaDiagnosticMappings(const
DiagnosticsEngine &Diag,
/// Write the representation of a type to the AST stream.
void ASTWriter::WriteType(QualType T) {
TypeIdx &IdxRef = TypeIdxs[T];
- if (IdxRef.getIndex() == 0) // we haven't
@@ -70,38 +71,53 @@ using DeclID = DeclIDBase::DeclID;
/// An ID number that refers to a type in an AST file.
///
-/// The ID of a type is partitioned into two parts: the lower
+/// The ID of a type is partitioned into three parts:
+/// - the lower
/// three bits are used to
@@ -70,38 +71,53 @@ using DeclID = DeclIDBase::DeclID;
/// An ID number that refers to a type in an AST file.
///
-/// The ID of a type is partitioned into two parts: the lower
+/// The ID of a type is partitioned into three parts:
+/// - the lower
/// three bits are used to
@@ -296,3 +296,21 @@
ConstantAggregateBuilderBase::finishStruct(llvm::StructType *ty) {
buffer.erase(buffer.begin() + Begin, buffer.end());
return constant;
}
+
ojhunt wrote:
@asl Updating to resolve conflict required bringing this function in that was
p
https://github.com/MaskRay created
https://github.com/llvm/llvm-project/pull/96142
The initial check-in of compiler-rt/lib/nsan #94322 has a lot of style
issues. Fix them before the history becomes more useful.
___
llvm-branch-commits mailing list
l
llvmbot wrote:
@llvm/pr-subscribers-compiler-rt-sanitizer
Author: Fangrui Song (MaskRay)
Changes
The initial check-in of compiler-rt/lib/nsan #94322 has a lot of style
issues. Fix them before the history becomes more useful.
---
Patch is 54.71 KiB, truncated to 20.00 KiB below, full ver
70 matches
Mail list logo