Skip to content

Commit a7fb8a6

Browse files
committed
Merge remote-tracking branch 'origin/main' into laa-deref-assumption
2 parents a3a6878 + 103461f commit a7fb8a6

File tree

372 files changed

+10529
-5778
lines changed

Some content is hidden

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

372 files changed

+10529
-5778
lines changed

clang/docs/InternalsManual.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ wording a diagnostic.
139139
you mean %1?``.
140140

141141
* Appropriately capitalize proper nouns like ``Clang``, ``OpenCL``, ``GCC``,
142-
``Objective-C``, etc and language standard versions like ``C11`` or ``C++11``.
142+
``Objective-C``, etc. and language standard versions like ``C11`` or ``C++11``.
143143
* The wording should be succinct. If necessary, use a semicolon to combine
144144
sentence fragments instead of using complete sentences. e.g., prefer wording
145145
like ``'%0' is deprecated; it will be removed in a future release of Clang``
@@ -886,7 +886,7 @@ a string that the tablegen backend uses as a prefix to the
886886
LANG_OPTION_WITH_MARSHALLING([...], LangOpts->IgnoreExceptions, [...])
887887
#endif // LANG_OPTION_WITH_MARSHALLING
888888

889-
Such definition can be used used in the function for parsing and generating
889+
Such definition can be used in the function for parsing and generating
890890
command line:
891891

892892
.. code-block:: c++
@@ -1745,7 +1745,7 @@ will be found by the lookup, since it effectively replaces the first
17451745
declaration of "``f``".
17461746

17471747
(Note that because ``f`` can be redeclared at block scope, or in a friend
1748-
declaration, etc. it is possible that the declaration of ``f`` found by name
1748+
declaration, etc., it is possible that the declaration of ``f`` found by name
17491749
lookup will not be the most recent one.)
17501750

17511751
In the semantics-centric view, overloading of functions is represented
@@ -1945,7 +1945,7 @@ range of iterators over declarations of "``f``".
19451945
function ``DeclContext::getPrimaryContext`` retrieves the "primary" context for
19461946
a given ``DeclContext`` instance, which is the ``DeclContext`` responsible for
19471947
maintaining the lookup table used for the semantics-centric view. Given a
1948-
DeclContext, one can obtain the set of declaration contexts that are
1948+
``DeclContext``, one can obtain the set of declaration contexts that are
19491949
semantically connected to this declaration context, in source order, including
19501950
this context (which will be the only result, for non-namespace contexts) via
19511951
``DeclContext::collectAllContexts``. Note that these functions are used
@@ -1985,7 +1985,7 @@ broken code in the AST:
19851985
errors, the Decl node is marked as invalid.
19861986
- dropping invalid node: this often happens for errors that we don’t have
19871987
graceful recovery. Prior to Recovery AST, a mismatched-argument function call
1988-
expression was dropped though a CallExpr was created for semantic analysis.
1988+
expression was dropped though a ``CallExpr`` was created for semantic analysis.
19891989

19901990
With these strategies, clang surfaces better diagnostics, and provides AST
19911991
consumers a rich AST reflecting the written source code as much as possible even

clang/docs/ThinLTO.rst

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -249,6 +249,9 @@ during the traditional link step.
249249

250250
The implementation is documented here: https://llvm.org/docs/DTLTO.html.
251251

252+
Command-Line Options
253+
^^^^^^^^^^^^^^^^^^^^
254+
252255
DTLTO requires the LLD linker (``-fuse-ld=lld``).
253256

254257
``-fthinlto-distributor=<path>``
@@ -260,17 +263,29 @@ DTLTO requires the LLD linker (``-fuse-ld=lld``).
260263
- Can be specified multiple times to pass multiple options.
261264
- Multiple options can also be specified by separating them with commas.
262265

263-
Examples:
264-
- ``clang -flto=thin -fthinlto-distributor=incredibuild.exe -Xthinlto-distributor=--verbose,--j10 -fuse-ld=lld``
265-
- ``clang -flto=thin -fthinlto-distributor=$(which python) -Xthinlto-distributor=incredibuild.py -fuse-ld=lld``
266-
267266
If ``-fthinlto-distributor=`` is specified, Clang supplies the path to a
268267
compiler to be executed remotely to perform the ThinLTO backend
269268
compilations. Currently, this is Clang itself.
270269

270+
Usage
271+
^^^^^
272+
273+
Compilation is unchanged from ThinLTO. DTLTO options need to supplied for the link step:
274+
275+
.. code-block:: console
276+
277+
% clang -flto=thin -fthinlto-distributor=distribute.sh -Xthinlto-distributor=--verbose,--j10 -fuse-ld=lld file1.o file2.o
278+
% clang -flto=thin -fthinlto-distributor=$(which python) -Xthinlto-distributor=distribute.py -fuse-ld=lld file1.o file2.o
279+
280+
When using lld-link:
281+
282+
.. code-block:: console
283+
284+
% lld-link /out:a.exe file1.obj file2.obj /thinlto-distributor:distribute.exe /thinlto-remote-compiler:${LLVM}\bin\clang.exe /thinlto-distributor-arg:--verbose
285+
271286
Note that currently, DTLTO is only supported in some LLD flavors. Support can
272287
be added to other LLD flavours in the future.
273-
See `DTLTO <https://lld.llvm.org/dtlto.html>`_ for more information.
288+
See `DTLTO <https://lld.llvm.org/DTLTO.html>`_ for more information.
274289

275290
More Information
276291
================

clang/include/clang/Basic/Attr.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1642,7 +1642,7 @@ def DeviceKernel : DeclOrTypeAttr {
16421642
}
16431643

16441644
def SYCLKernelEntryPoint : InheritableAttr {
1645-
let Spellings = [Clang<"sycl_kernel_entry_point">];
1645+
let Spellings = [CXX11<"clang", "sycl_kernel_entry_point">];
16461646
let Args = [
16471647
// KernelName is required and specifies the kernel name type.
16481648
TypeArgument<"KernelName">,

clang/include/clang/Basic/BuiltinsAMDGPU.def

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -707,6 +707,17 @@ TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_fp8_f16, "sV2h", "nc", "gfx1250-insts")
707707
TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_bf8_f16, "sV2h", "nc", "gfx1250-insts")
708708
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f16, "ihiUiIi", "nc", "gfx1250-insts")
709709
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_bf8_f16, "ihiUiIi", "nc", "gfx1250-insts")
710+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_f16_fp8, "V8hV2UiUiIUi", "nc", "gfx1250-insts")
711+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_bf16_fp8, "V8yV2UiUiIUi", "nc", "gfx1250-insts")
712+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_f16_bf8, "V8hV2UiUiIUi", "nc", "gfx1250-insts")
713+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_bf16_bf8, "V8yV2UiUiIUi", "nc", "gfx1250-insts")
714+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_f16_fp4, "V8hUiUiIUi", "nc", "gfx1250-insts")
715+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_bf16_fp4, "V8yUiUiIUi", "nc", "gfx1250-insts")
716+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_f32_fp8, "V8fV2UiUiIUi", "nc", "gfx1250-insts")
717+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_f32_bf8, "V8fV2UiUiIUi", "nc", "gfx1250-insts")
718+
TARGET_BUILTIN(__builtin_amdgcn_cvt_scale_pk8_f32_fp4, "V8fUiUiIUi", "nc", "gfx1250-insts")
719+
TARGET_BUILTIN(__builtin_amdgcn_cvt_pk_fp8_f32_e5m3, "iffiIb", "nc", "fp8e5m3-insts")
720+
TARGET_BUILTIN(__builtin_amdgcn_cvt_sr_fp8_f32_e5m3, "ifiiIi", "nc", "fp8e5m3-insts")
710721
TARGET_BUILTIN(__builtin_amdgcn_sat_pk4_i4_i8, "UsUi", "nc", "gfx1250-insts")
711722
TARGET_BUILTIN(__builtin_amdgcn_sat_pk4_u4_u8, "UsUi", "nc", "gfx1250-insts")
712723

clang/include/clang/Basic/BuiltinsNVPTX.td

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,17 @@ class SM<string version, list<SMFeatures> newer_list> : SMFeatures {
2121
!strconcat(f, "|", newer.Features));
2222
}
2323

24+
let Features = "sm_121a" in def SM_121a : SMFeatures;
2425
let Features = "sm_120a" in def SM_120a : SMFeatures;
26+
let Features = "sm_103a" in def SM_103a : SMFeatures;
2527
let Features = "sm_101a" in def SM_101a : SMFeatures;
2628
let Features = "sm_100a" in def SM_100a : SMFeatures;
2729
let Features = "sm_90a" in def SM_90a : SMFeatures;
2830

29-
def SM_120 : SM<"120", [SM_120a]>;
30-
def SM_101 : SM<"101", [SM_101a, SM_120]>;
31+
def SM_121 : SM<"121", [SM_121a]>;
32+
def SM_120 : SM<"120", [SM_120a, SM_121]>;
33+
def SM_103 : SM<"103", [SM_103a, SM_120]>;
34+
def SM_101 : SM<"101", [SM_101a, SM_103]>;
3135
def SM_100 : SM<"100", [SM_100a, SM_101]>;
3236
def SM_90 : SM<"90", [SM_90a, SM_100]>;
3337
def SM_89 : SM<"89", [SM_90]>;
@@ -50,8 +54,9 @@ class PTX<string version, PTXFeatures newer> : PTXFeatures {
5054
let Features = !strconcat("ptx", version, "|", newer.Features);
5155
}
5256

53-
let Features = "ptx87" in def PTX87 : PTXFeatures;
57+
let Features = "ptx88" in def PTX88 : PTXFeatures;
5458

59+
def PTX87 : PTX<"87", PTX88>;
5560
def PTX86 : PTX<"86", PTX87>;
5661
def PTX85 : PTX<"85", PTX86>;
5762
def PTX84 : PTX<"84", PTX85>;

clang/include/clang/Basic/Cuda.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,9 +47,10 @@ enum class CudaVersion {
4747
CUDA_125,
4848
CUDA_126,
4949
CUDA_128,
50-
FULLY_SUPPORTED = CUDA_123,
50+
CUDA_129,
51+
FULLY_SUPPORTED = CUDA_128,
5152
PARTIALLY_SUPPORTED =
52-
CUDA_128, // Partially supported. Proceed with a warning.
53+
CUDA_129, // Partially supported. Proceed with a warning.
5354
NEW = 10000, // Too new. Issue a warning, but allow using it.
5455
};
5556
const char *CudaVersionToString(CudaVersion V);

clang/include/clang/Basic/DiagnosticSemaKinds.td

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12936,31 +12936,29 @@ def err_sycl_special_type_num_init_method : Error<
1293612936

1293712937
// SYCL kernel entry point diagnostics
1293812938
def err_sycl_entry_point_invalid : Error<
12939-
"'sycl_kernel_entry_point' attribute cannot be applied to a"
12939+
"the %0 attribute cannot be applied to a"
1294012940
" %select{non-static member function|variadic function|deleted function|"
1294112941
"defaulted function|constexpr function|consteval function|"
1294212942
"function declared with the 'noreturn' attribute|coroutine|"
12943-
"function defined with a function try block}0">;
12943+
"function defined with a function try block}1">;
1294412944
def err_sycl_entry_point_invalid_redeclaration : Error<
12945-
"'sycl_kernel_entry_point' kernel name argument does not match prior"
12946-
" declaration%diff{: $ vs $|}0,1">;
12945+
"the %0 kernel name argument does not match prior"
12946+
" declaration%diff{: $ vs $|}1,2">;
1294712947
def err_sycl_kernel_name_conflict : Error<
12948-
"'sycl_kernel_entry_point' kernel name argument conflicts with a previous"
12949-
" declaration">;
12948+
"the %0 kernel name argument conflicts with a previous declaration">;
1295012949
def warn_sycl_kernel_name_not_a_class_type : Warning<
1295112950
"%0 is not a valid SYCL kernel name type; a non-union class type is required">,
1295212951
InGroup<DiagGroup<"nonportable-sycl">>, DefaultError;
1295312952
def warn_sycl_entry_point_redundant_declaration : Warning<
12954-
"redundant 'sycl_kernel_entry_point' attribute">, InGroup<RedundantAttribute>;
12953+
"redundant %0 attribute">, InGroup<RedundantAttribute>;
1295512954
def err_sycl_entry_point_after_definition : Error<
12956-
"'sycl_kernel_entry_point' attribute cannot be added to a function after the"
12957-
" function is defined">;
12955+
"the %0 attribute cannot be added to a function after the function is"
12956+
" defined">;
1295812957
def err_sycl_entry_point_return_type : Error<
12959-
"'sycl_kernel_entry_point' attribute only applies to functions with a"
12960-
" 'void' return type">;
12958+
"the %0 attribute only applies to functions with a 'void' return type">;
1296112959
def err_sycl_entry_point_deduced_return_type : Error<
12962-
"'sycl_kernel_entry_point' attribute only applies to functions with a"
12963-
" non-deduced 'void' return type">;
12960+
"the %0 attribute only applies to functions with a non-deduced 'void' return"
12961+
" type">;
1296412962

1296512963
def warn_cuda_maxclusterrank_sm_90 : Warning<
1296612964
"maxclusterrank requires sm_90 or higher, CUDA arch provided: %0, ignoring "

clang/include/clang/Basic/OffloadArch.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,12 @@ enum class OffloadArch {
4545
SM_100a,
4646
SM_101,
4747
SM_101a,
48+
SM_103,
49+
SM_103a,
4850
SM_120,
4951
SM_120a,
52+
SM_121,
53+
SM_121a,
5054
GFX600,
5155
GFX601,
5256
GFX602,

clang/lib/Analysis/RetainSummaryManager.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -147,8 +147,7 @@ static bool isSubclass(const Decl *D,
147147

148148
static bool isExactClass(const Decl *D, StringRef ClassName) {
149149
using namespace ast_matchers;
150-
DeclarationMatcher sameClassM =
151-
cxxRecordDecl(hasName(std::string(ClassName)));
150+
DeclarationMatcher sameClassM = cxxRecordDecl(hasName(ClassName));
152151
return !(match(sameClassM, *D, D->getASTContext()).empty());
153152
}
154153

clang/lib/Basic/Cuda.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ static const CudaVersionMapEntry CudaNameVersionMap[] = {
4444
CUDA_ENTRY(12, 5),
4545
CUDA_ENTRY(12, 6),
4646
CUDA_ENTRY(12, 8),
47+
CUDA_ENTRY(12, 9),
4748
{"", CudaVersion::NEW, llvm::VersionTuple(std::numeric_limits<int>::max())},
4849
{"unknown", CudaVersion::UNKNOWN, {}} // End of list tombstone.
4950
};
@@ -119,6 +120,11 @@ CudaVersion MinVersionForOffloadArch(OffloadArch A) {
119120
case OffloadArch::SM_120:
120121
case OffloadArch::SM_120a:
121122
return CudaVersion::CUDA_128;
123+
case OffloadArch::SM_103:
124+
case OffloadArch::SM_103a:
125+
case OffloadArch::SM_121:
126+
case OffloadArch::SM_121a:
127+
return CudaVersion::CUDA_129;
122128
default:
123129
llvm_unreachable("invalid enum");
124130
}

0 commit comments

Comments
 (0)