Skip to content

Commit 40c6c15

Browse files
Merge branch 'llvm:main' into cfi-show
2 parents ce980fd + 827d775 commit 40c6c15

File tree

401 files changed

+23142
-8092
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

401 files changed

+23142
-8092
lines changed

.ci/all_requirements.txt

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ ml-dtypes==0.5.1 ; python_version < "3.13" \
194194
--hash=sha256:d13755f8e8445b3870114e5b6240facaa7cb0c3361e54beba3e07fa912a6e12b \
195195
--hash=sha256:fd918d4e6a4e0c110e2e05be7a7814d10dc1b95872accbf6512b80a109b71ae1
196196
# via -r mlir/python/requirements.txt
197-
nanobind==2.9.2 \
198-
--hash=sha256:c37957ffd5eac7eda349cff3622ecd32e5ee1244ecc912c99b5bc8188bafd16e \
199-
--hash=sha256:e7608472de99d375759814cab3e2c94aba3f9ec80e62cfef8ced495ca5c27d6e
197+
nanobind==2.7.0 \
198+
--hash=sha256:73b12d0e751d140d6c1bf4b215e18818a8debfdb374f08dc3776ad208d808e74 \
199+
--hash=sha256:f9f1b160580c50dcf37b6495a0fd5ec61dc0d95dae5f8004f87dd9ad7eb46b34
200200
# via -r mlir/python/requirements.txt
201201
numpy==2.0.2 \
202202
--hash=sha256:0123ffdaa88fa4ab64835dcbde75dcdf89c453c922f18dced6e27c90d1d0ec5a \
@@ -383,10 +383,6 @@ swig==4.3.1 \
383383
--hash=sha256:efec16327029f682f649a26da726bb0305be8800bd0f1fa3e81bf0769cf5b476 \
384384
--hash=sha256:fc496c0d600cf1bb2d91e28d3d6eae9c4301e5ea7a0dec5a4281b5efed4245a8
385385
# via -r lldb/test/requirements.txt
386-
typing-extensions==4.15.0 \
387-
--hash=sha256:0cea48d173cc12fa28ecabc3b837ea3cf6f38c6d1136f85cbaaf598984861466 \
388-
--hash=sha256:f0fa19c6845758ab08074a0cfa8b7aecb71c999ca73d62883bc25cc018c4e548
389-
# via -r mlir/python/requirements.txt
390386
urllib3==2.5.0 \
391387
--hash=sha256:3fc47733c7e419d4bc3f6b3dc2b4f890bb743906a30d56ba4a5bfa4bbff92760 \
392388
--hash=sha256:e6b01673c0fa6a13e374b50871808eb3bf7046c4b125b216f6bf1cc604cff0dc

bolt/lib/Target/AArch64/AArch64MCPlusBuilder.cpp

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2517,21 +2517,17 @@ class AArch64MCPlusBuilder : public MCPlusBuilder {
25172517
createInstrIncMemory(const MCSymbol *Target, MCContext *Ctx, bool IsLeaf,
25182518
unsigned CodePointerSize) const override {
25192519
unsigned int I = 0;
2520-
InstructionListType Instrs(10);
2520+
InstructionListType Instrs(6);
25212521

25222522
createPushRegisters(Instrs[I++], AArch64::X0, AArch64::X1);
2523-
getSystemFlag(Instrs[I++], AArch64::X1);
25242523
InstructionListType Addr = materializeAddress(Target, Ctx, AArch64::X0);
25252524
assert(Addr.size() == 2 && "Invalid Addr size");
25262525
std::copy(Addr.begin(), Addr.end(), Instrs.begin() + I);
25272526
I += Addr.size();
2528-
storeReg(Instrs[I++], AArch64::X2, AArch64::SP);
2529-
InstructionListType Insts = createIncMemory(AArch64::X0, AArch64::X2);
2527+
InstructionListType Insts = createIncMemory(AArch64::X0, AArch64::X1);
25302528
assert(Insts.size() == 2 && "Invalid Insts size");
25312529
std::copy(Insts.begin(), Insts.end(), Instrs.begin() + I);
25322530
I += Insts.size();
2533-
loadReg(Instrs[I++], AArch64::X2, AArch64::SP);
2534-
setSystemFlag(Instrs[I++], AArch64::X1);
25352531
createPopRegisters(Instrs[I++], AArch64::X0, AArch64::X1);
25362532
return Instrs;
25372533
}

clang/docs/OpenMPSupport.rst

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -366,16 +366,25 @@ implementation.
366366
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
367367
| threadset clause | :part:`in progress` | :none:`unclaimed` | |
368368
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
369-
| Recording of task graphs | :none:`unclaimed` | :none:`unclaimed` | |
369+
| Recording of task graphs | :part:`in progress` | :part:`in progress` | clang: jtb20, flang: kparzysz |
370370
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
371371
| Parallel inductions | :none:`unclaimed` | :none:`unclaimed` | |
372372
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
373373
| init_complete for scan directive | :none:`unclaimed` | :none:`unclaimed` | |
374374
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
375-
| Loop transformation constructs | :none:`unclaimed` | :none:`unclaimed` | |
375+
| loop interchange transformation | :good:`done` | :none:`unclaimed` | Clang (interchange): https://github.com/llvm/llvm-project/pull/93022 |
376+
| | | | Clang (permutation): https://github.com/llvm/llvm-project/pull/92030 |
377+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
378+
| loop reverse transformation | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/92916 |
376379
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
377380
| loop stripe transformation | :good:`done` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/119891 |
378381
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
382+
| loop fusion transformation | :part:`in progress` | :none:`unclaimed` | https://github.com/llvm/llvm-project/pull/139293 |
383+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
384+
| loop index set splitting transformation | :none:`unclaimed` | :none:`unclaimed` | |
385+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
386+
| loop transformation apply clause | :none:`unclaimed` | :none:`unclaimed` | |
387+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
379388
| workdistribute construct | | :none:`in progress` | @skc7, @mjklemm |
380389
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
381390
| task_iteration | :none:`unclaimed` | :none:`unclaimed` | |
@@ -446,7 +455,7 @@ implementation.
446455
| Optionally omit array length expression | :good:`done` | :none:`unclaimed` | (Parse) https://github.com/llvm/llvm-project/pull/148048, |
447456
| | | | (Sema) https://github.com/llvm/llvm-project/pull/152786 |
448457
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
449-
| Canonical loop sequences | :none:`unclaimed` | :part:`In Progress` | |
458+
| Canonical loop sequences | :part:`in progress` | :part:`in progress` | Clang: https://github.com/llvm/llvm-project/pull/139293 |
450459
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
451460
| Clarifications to Fortran map semantics | :none:`unclaimed` | :none:`unclaimed` | |
452461
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
@@ -507,6 +516,10 @@ implementation.
507516
| | | | https://github.com/llvm/llvm-project/pull/152830 |
508517
| | | | https://github.com/llvm/llvm-project/pull/152831) |
509518
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
519+
| loop flatten transformation | :none:`unclaimed` | :none:`unclaimed` | |
520+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
521+
| loop grid/tile modifiers for sizes clause | :none:`unclaimed` | :none:`unclaimed` | |
522+
+-------------------------------------------------------------+---------------------------+---------------------------+--------------------------------------------------------------------------+
510523

511524

512525
OpenMP Extensions

clang/docs/ReleaseNotes.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,9 @@ Bug Fixes to C++ Support
350350
authentication enabled. (#GH152601)
351351
- Fix the check for narrowing int-to-float conversions, so that they are detected in
352352
cases where converting the float back to an integer is undefined behaviour (#GH157067).
353+
- Fix a crash when applying binary or ternary operators to two same function types with different spellings,
354+
where at least one of the function parameters has an attribute which affects
355+
the function type.
353356
- Fix an assertion failure when a ``constexpr`` variable is only referenced through
354357
``__builtin_addressof``, and related issues with builtin arguments. (#GH154034)
355358

clang/include/clang/AST/Expr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ class Expr : public ValueStmt {
10381038
// PointerLikeTypeTraits is specialized so it can be used with a forward-decl of
10391039
// Expr. Verify that we got it right.
10401040
static_assert(llvm::PointerLikeTypeTraits<Expr *>::NumLowBitsAvailable <=
1041-
llvm::detail::ConstantLog2<alignof(Expr)>::value,
1041+
llvm::CTLog2<alignof(Expr)>(),
10421042
"PointerLikeTypeTraits<Expr*> assumes too much alignment.");
10431043

10441044
using ConstantExprKind = Expr::ConstantExprKind;

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,20 @@ BUILTIN(__builtin_amdgcn_workgroup_id_x, "Ui", "nc")
3434
BUILTIN(__builtin_amdgcn_workgroup_id_y, "Ui", "nc")
3535
BUILTIN(__builtin_amdgcn_workgroup_id_z, "Ui", "nc")
3636

37+
TARGET_BUILTIN(__builtin_amdgcn_cluster_id_x, "Ui", "nc", "gfx1250-insts")
38+
TARGET_BUILTIN(__builtin_amdgcn_cluster_id_y, "Ui", "nc", "gfx1250-insts")
39+
TARGET_BUILTIN(__builtin_amdgcn_cluster_id_z, "Ui", "nc", "gfx1250-insts")
40+
41+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_id_x, "Ui", "nc", "gfx1250-insts")
42+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_id_y, "Ui", "nc", "gfx1250-insts")
43+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_id_z, "Ui", "nc", "gfx1250-insts")
44+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_flat_id, "Ui", "nc", "gfx1250-insts")
45+
46+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_max_id_x, "Ui", "nc", "gfx1250-insts")
47+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_max_id_y, "Ui", "nc", "gfx1250-insts")
48+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_max_id_z, "Ui", "nc", "gfx1250-insts")
49+
TARGET_BUILTIN(__builtin_amdgcn_cluster_workgroup_max_flat_id, "Ui", "nc", "gfx1250-insts")
50+
3751
BUILTIN(__builtin_amdgcn_workitem_id_x, "Ui", "nc")
3852
BUILTIN(__builtin_amdgcn_workitem_id_y, "Ui", "nc")
3953
BUILTIN(__builtin_amdgcn_workitem_id_z, "Ui", "nc")
@@ -364,6 +378,31 @@ BUILTIN(__builtin_amdgcn_endpgm, "v", "nr")
364378
BUILTIN(__builtin_amdgcn_get_fpenv, "WUi", "n")
365379
BUILTIN(__builtin_amdgcn_set_fpenv, "vWUi", "n")
366380

381+
//===----------------------------------------------------------------------===//
382+
383+
// Wave Reduction builtins.
384+
385+
//===----------------------------------------------------------------------===//
386+
387+
BUILTIN(__builtin_amdgcn_wave_reduce_add_u32, "ZUiZUiZi", "nc")
388+
BUILTIN(__builtin_amdgcn_wave_reduce_sub_u32, "ZUiZUiZi", "nc")
389+
BUILTIN(__builtin_amdgcn_wave_reduce_min_i32, "ZiZiZi", "nc")
390+
BUILTIN(__builtin_amdgcn_wave_reduce_min_u32, "ZUiZUiZi", "nc")
391+
BUILTIN(__builtin_amdgcn_wave_reduce_max_i32, "ZiZiZi", "nc")
392+
BUILTIN(__builtin_amdgcn_wave_reduce_max_u32, "ZUiZUiZi", "nc")
393+
BUILTIN(__builtin_amdgcn_wave_reduce_and_b32, "ZiZiZi", "nc")
394+
BUILTIN(__builtin_amdgcn_wave_reduce_or_b32, "ZiZiZi", "nc")
395+
BUILTIN(__builtin_amdgcn_wave_reduce_xor_b32, "ZiZiZi", "nc")
396+
BUILTIN(__builtin_amdgcn_wave_reduce_add_u64, "WUiWUiZi", "nc")
397+
BUILTIN(__builtin_amdgcn_wave_reduce_sub_u64, "WUiWUiZi", "nc")
398+
BUILTIN(__builtin_amdgcn_wave_reduce_min_i64, "WiWiZi", "nc")
399+
BUILTIN(__builtin_amdgcn_wave_reduce_min_u64, "WUiWUiZi", "nc")
400+
BUILTIN(__builtin_amdgcn_wave_reduce_max_i64, "WiWiZi", "nc")
401+
BUILTIN(__builtin_amdgcn_wave_reduce_max_u64, "WUiWUiZi", "nc")
402+
BUILTIN(__builtin_amdgcn_wave_reduce_and_b64, "WiWiZi", "nc")
403+
BUILTIN(__builtin_amdgcn_wave_reduce_or_b64, "WiWiZi", "nc")
404+
BUILTIN(__builtin_amdgcn_wave_reduce_xor_b64, "WiWiZi", "nc")
405+
367406
//===----------------------------------------------------------------------===//
368407
// R600-NI only builtins.
369408
//===----------------------------------------------------------------------===//

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,27 +1057,27 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
10571057
}
10581058

10591059
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1060-
def vpdpbusd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Vector<4, int>)">;
1060+
def vpdpbusd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<16, unsigned char>, _Vector<16, char>)">;
10611061
}
10621062

10631063
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1064-
def vpdpbusd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>, _Vector<8, int>)">;
1064+
def vpdpbusd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<32, unsigned char>, _Vector<32, char>)">;
10651065
}
10661066

10671067
let Features = "avx512vnni", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1068-
def vpdpbusd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>)">;
1068+
def vpdpbusd512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<64, unsigned char>, _Vector<64, char>)">;
10691069
}
10701070

10711071
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {
1072-
def vpdpbusds128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>, _Vector<4, int>)">;
1072+
def vpdpbusds128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<16, unsigned char>, _Vector<16, char>)">;
10731073
}
10741074

10751075
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] in {
1076-
def vpdpbusds256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>, _Vector<8, int>)">;
1076+
def vpdpbusds256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<32, unsigned char>, _Vector<32, char>)">;
10771077
}
10781078

10791079
let Features = "avx512vnni", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
1080-
def vpdpbusds512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<16, int>, _Vector<16, int>)">;
1080+
def vpdpbusds512 : X86Builtin<"_Vector<16, int>(_Vector<16, int>, _Vector<64, unsigned char>, _Vector<64, char>)">;
10811081
}
10821082

10831083
let Features = "avx512vl,avx512vnni|avxvnni", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {

clang/include/clang/CIR/Dialect/IR/CIROps.td

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3827,6 +3827,16 @@ def CIR_ACosOp : CIR_UnaryFPToFPBuiltinOp<"acos", "ACosOp"> {
38273827
}];
38283828
}
38293829

3830+
def CIR_ASinOp : CIR_UnaryFPToFPBuiltinOp<"asin", "ASinOp"> {
3831+
let summary = "Computes the arcus sine of the specified value";
3832+
let description = [{
3833+
`cir.asin`computes the arcus sine of a given value and
3834+
returns a result of the same type.
3835+
3836+
Floating-point exceptions are ignored, and it does not set `errno`.
3837+
}];
3838+
}
3839+
38303840
def CIR_FAbsOp : CIR_UnaryFPToFPBuiltinOp<"fabs", "FAbsOp"> {
38313841
let summary = "Computes the floating-point absolute value";
38323842
let description = [{

clang/lib/AST/ASTContext.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14195,7 +14195,11 @@ static QualType getCommonNonSugarTypeNode(const ASTContext &Ctx, const Type *X,
1419514195
FunctionProtoType::ExtProtoInfo EPIX = FX->getExtProtoInfo(),
1419614196
EPIY = FY->getExtProtoInfo();
1419714197
assert(EPIX.ExtInfo == EPIY.ExtInfo);
14198-
assert(EPIX.ExtParameterInfos == EPIY.ExtParameterInfos);
14198+
assert(!EPIX.ExtParameterInfos == !EPIY.ExtParameterInfos);
14199+
assert(!EPIX.ExtParameterInfos ||
14200+
llvm::equal(
14201+
llvm::ArrayRef(EPIX.ExtParameterInfos, FX->getNumParams()),
14202+
llvm::ArrayRef(EPIY.ExtParameterInfos, FY->getNumParams())));
1419914203
assert(EPIX.RefQualifier == EPIY.RefQualifier);
1420014204
assert(EPIX.TypeQuals == EPIY.TypeQuals);
1420114205
assert(EPIX.Variadic == EPIY.Variadic);

clang/lib/CIR/CodeGen/CIRGenBuiltin.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,8 @@ RValue CIRGenFunction::emitBuiltinExpr(const GlobalDecl &gd, unsigned builtinID,
411411

412412
case Builtin::BI__builtin_elementwise_acos:
413413
return emitUnaryFPBuiltin<cir::ACosOp>(*this, *e);
414+
case Builtin::BI__builtin_elementwise_asin:
415+
return emitUnaryFPBuiltin<cir::ASinOp>(*this, *e);
414416
}
415417

416418
// If this is an alias for a lib function (e.g. __builtin_sin), emit

0 commit comments

Comments
 (0)