Skip to content

Commit 874ebf3

Browse files
authored
Merge branch 'main' into sourcemgr-vfs
2 parents a41a3d2 + 8d66114 commit 874ebf3

File tree

268 files changed

+8890
-5499
lines changed

Some content is hidden

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

268 files changed

+8890
-5499
lines changed

bolt/include/bolt/Passes/PLTCall.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ class PLTCall : public BinaryFunctionPass {
2626
explicit PLTCall(const cl::opt<bool> &PrintPass)
2727
: BinaryFunctionPass(PrintPass) {}
2828

29-
const char *getName() const override { return "PLT call optimization"; }
29+
const char *getName() const override { return "plt-call-optimization"; }
3030
bool shouldPrint(const BinaryFunction &BF) const override {
3131
return BinaryFunctionPass::shouldPrint(BF);
3232
}

bolt/include/bolt/Passes/TailDuplication.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ class TailDuplication : public BinaryFunctionPass {
143143

144144
explicit TailDuplication() : BinaryFunctionPass(false) {}
145145

146-
const char *getName() const override { return "tail duplication"; }
146+
const char *getName() const override { return "tail-duplication"; }
147147

148148
Error runOnFunctions(BinaryContext &BC) override;
149149
};

clang/docs/PointerAuthentication.rst

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -592,6 +592,36 @@ The result value is never zero and always within range for both the
592592

593593
This can be used in constant expressions.
594594

595+
``ptrauth_type_discriminator``
596+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
597+
598+
.. code-block:: c
599+
600+
ptrauth_type_discriminator(type)
601+
602+
Compute the constant discriminator derived from the given type, as is computed
603+
for automatically type diversified schemas.
604+
605+
``type`` must be a type. The result has the type ``ptrauth_extra_data_t``.
606+
607+
This can be used in constant expressions.
608+
609+
``ptrauth_function_pointer_type_discriminator``
610+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
611+
612+
.. code-block:: c
613+
614+
ptrauth_function_pointer_type_discriminator(function_type)
615+
616+
Compute the constant discriminator derived from the provided function type, for
617+
use in contexts where the default function authentication schema. If function
618+
pointer type diversity is enabled, this is equivalent to
619+
`ptrauth_type_discriminator(function_type)`, if it is not enabled this is `0`.
620+
621+
``function_type`` must be a function type. The result has the type ``ptrauth_extra_data_t``.
622+
623+
This can be used in constant expressions.
624+
595625
``ptrauth_strip``
596626
^^^^^^^^^^^^^^^^^
597627

clang/docs/ReleaseNotes.rst

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,8 @@ C23 Feature Support
191191
- Added ``FLT_SNAN``, ``DBL_SNAN``, and ``LDBL_SNAN`` to Clang's ``<float.h>``
192192
header in C23 and later modes. This implements
193193
`WG14 N2710 <https://www.open-std.org/jtc1/sc22/wg14/www/docs/n2710.htm>`_.
194+
- Fixed accepting as compatible unnamed tag types with the same fields within
195+
the same translation unit but from different types.
194196

195197
Non-comprehensive list of changes in this release
196198
-------------------------------------------------
@@ -274,7 +276,7 @@ New Compiler Flags
274276
- New option ``-fno-sanitize-debug-trap-reasons`` added to disable emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
275277
- New option ``-fsanitize-debug-trap-reasons=`` added to control emitting trap reasons into the debug info when compiling with trapping UBSan (e.g. ``-fsanitize-trap=undefined``).
276278
- New options for enabling allocation token instrumentation: ``-fsanitize=alloc-token``, ``-falloc-token-max=``, ``-fsanitize-alloc-token-fast-abi``, ``-fsanitize-alloc-token-extended``.
277-
279+
- The ``-resource-dir`` option is now displayed in the list of options shown by ``--help``.
278280

279281
Lanai Support
280282
^^^^^^^^^^^^^^
@@ -424,7 +426,8 @@ Bug Fixes to Attribute Support
424426
(#GH141504) and on types returned from indirect calls (#GH142453).
425427
- Fixes some late parsed attributes, when applied to function definitions, not being parsed
426428
in function try blocks, and some situations where parsing of the function body
427-
is skipped, such as error recovery and code completion. (#GH153551)
429+
is skipped, such as error recovery, code completion, and msvc-compatible delayed
430+
template parsing. (#GH153551)
428431
- Using ``[[gnu::cleanup(some_func)]]`` where some_func is annotated with
429432
``[[gnu::error("some error")]]`` now correctly triggers an error. (#GH146520)
430433
- Fix a crash when the function name is empty in the `swift_name` attribute. (#GH157075)
@@ -513,6 +516,7 @@ X86 Support
513516
driver.
514517
- Remove `[no-]evex512` feature request from intrinsics and builtins.
515518
- Change features `avx10.x-[256,512]` to `avx10.x`.
519+
- `-march=wildcatlake` is now supported.
516520

517521
Arm and AArch64 Support
518522
^^^^^^^^^^^^^^^^^^^^^^^

clang/docs/UsersManual.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2325,7 +2325,7 @@ are listed below.
23252325
devirtualization and virtual constant propagation, for classes with
23262326
:doc:`hidden LTO visibility <LTOVisibility>`. Requires ``-flto``.
23272327

2328-
.. option:: -f[no]split-lto-unit
2328+
.. option:: -f[no-]split-lto-unit
23292329

23302330
Controls splitting the :doc:`LTO unit <LTOVisibility>` into regular LTO and
23312331
:doc:`ThinLTO` portions, when compiling with -flto=thin. Defaults to false
@@ -2518,7 +2518,7 @@ are listed below.
25182518

25192519
.. _funique_internal_linkage_names:
25202520

2521-
.. option:: -f[no]-unique-internal-linkage-names
2521+
.. option:: -f[no-]unique-internal-linkage-names
25222522

25232523
Controls whether Clang emits a unique (best-effort) symbol name for internal
25242524
linkage symbols. When this option is set, compiler hashes the main source
@@ -2539,7 +2539,7 @@ are listed below.
25392539
$ cd $P/bar && clang -c -funique-internal-linkage-names name_conflict.c
25402540
$ cd $P && clang foo/name_conflict.o && bar/name_conflict.o
25412541
2542-
.. option:: -f[no]-basic-block-address-map:
2542+
.. option:: -f[no-]basic-block-address-map:
25432543
Emits a ``SHT_LLVM_BB_ADDR_MAP`` section which includes address offsets for each
25442544
basic block in the program, relative to the parent function address.
25452545

clang/include/clang/Basic/BuiltinsX86.td

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ let Attributes = [Const, NoThrow, RequiredVectorWidth<128>] in {
125125

126126
let Features = "ssse3" in {
127127
def pmulhrsw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>)">;
128-
def pshufb128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>)">;
129128
def psignb128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>)">;
130129
def psignw128 : X86Builtin<"_Vector<8, short>(_Vector<8, short>, _Vector<8, short>)">;
131130
def psignd128 : X86Builtin<"_Vector<4, int>(_Vector<4, int>, _Vector<4, int>)">;
132131
}
133132

134133
let Features = "ssse3", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<128>] in {
135134
def pmaddubsw128 : X86Builtin<"_Vector<8, short>(_Vector<16, char>, _Vector<16, char>)">;
135+
def pshufb128 : X86Builtin<"_Vector<16, char>(_Vector<16, char>, _Vector<16, char>)">;
136136
}
137137
}
138138

@@ -610,7 +610,6 @@ let Features = "avx2", Attributes = [NoThrow, Const, RequiredVectorWidth<256>] i
610610
def pmovmskb256 : X86Builtin<"int(_Vector<32, char>)">;
611611
def pmulhrsw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
612612
def psadbw256 : X86Builtin<"_Vector<4, long long int>(_Vector<32, char>, _Vector<32, char>)">;
613-
def pshufb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
614613
def psignb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
615614
def psignw256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, _Vector<16, short>)">;
616615
def psignd256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, _Vector<8, int>)">;
@@ -649,6 +648,8 @@ let Features = "avx2", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWi
649648
def pmuldq256 : X86Builtin<"_Vector<4, long long int>(_Vector<8, int>, _Vector<8, int>)">;
650649
def pmuludq256 : X86Builtin<"_Vector<4, long long int>(_Vector<8, int>, _Vector<8, int>)">;
651650

651+
def pshufb256 : X86Builtin<"_Vector<32, char>(_Vector<32, char>, _Vector<32, char>)">;
652+
652653
def psllwi256 : X86Builtin<"_Vector<16, short>(_Vector<16, short>, int)">;
653654
def pslldi256 : X86Builtin<"_Vector<8, int>(_Vector<8, int>, int)">;
654655
def psllqi256 : X86Builtin<"_Vector<4, long long int>(_Vector<4, long long int>, int)">;
@@ -1347,14 +1348,15 @@ let Features = "avx512f", Attributes = [NoThrow, Const, RequiredVectorWidth<512>
13471348

13481349
let Features = "avx512bw", Attributes = [NoThrow, Const, RequiredVectorWidth<512>] in {
13491350
def ucmpw512_mask : X86Builtin<"unsigned int(_Vector<32, short>, _Vector<32, short>, _Constant int, unsigned int)">;
1350-
def pshufb512 : X86Builtin<"_Vector<64, char>(_Vector<64, char>, _Vector<64, char>)">;
13511351
}
13521352

13531353
let Features = "avx512bw", Attributes = [NoThrow, Const, Constexpr, RequiredVectorWidth<512>] in {
13541354
def packsswb512 : X86Builtin<"_Vector<64, char>(_Vector<32, short>, _Vector<32, short>)">;
13551355
def packssdw512 : X86Builtin<"_Vector<32, short>(_Vector<16, int>, _Vector<16, int>)">;
13561356
def packuswb512 : X86Builtin<"_Vector<64, char>(_Vector<32, short>, _Vector<32, short>)">;
13571357
def packusdw512 : X86Builtin<"_Vector<32, short>(_Vector<16, int>, _Vector<16, int>)">;
1358+
1359+
def pshufb512 : X86Builtin<"_Vector<64, char>(_Vector<64, char>, _Vector<64, char>)">;
13581360
}
13591361

13601362
let Features = "avx512cd,avx512vl", Attributes = [NoThrow, Const, RequiredVectorWidth<128>] in {

clang/include/clang/Basic/LangOptions.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -756,6 +756,15 @@ class LangOptions : public LangOptionsBase {
756756
bool isTargetDevice() const {
757757
return OpenMPIsTargetDevice || CUDAIsDevice || SYCLIsDevice;
758758
}
759+
760+
/// Returns the most applicable C standard-compliant language version code.
761+
/// If none could be determined, returns \ref std::nullopt.
762+
std::optional<uint32_t> getCLangStd() const;
763+
764+
/// Returns the most applicable C++ standard-compliant language
765+
/// version code.
766+
/// If none could be determined, returns \ref std::nullopt.
767+
std::optional<uint32_t> getCPlusPlusLangStd() const;
759768
};
760769

761770
/// Floating point control options

clang/include/clang/Basic/LangStandard.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,7 @@ enum LangFeatures {
7070
/// standard.
7171
struct LangStandard {
7272
enum Kind {
73-
#define LANGSTANDARD(id, name, lang, desc, features) \
74-
lang_##id,
73+
#define LANGSTANDARD(id, name, lang, desc, features, version) lang_##id,
7574
#include "clang/Basic/LangStandards.def"
7675
lang_unspecified
7776
};
@@ -80,6 +79,7 @@ struct LangStandard {
8079
const char *Description;
8180
unsigned Flags;
8281
clang::Language Language;
82+
std::optional<uint32_t> Version;
8383

8484
public:
8585
/// getName - Get the name of this standard.
@@ -91,6 +91,9 @@ struct LangStandard {
9191
/// Get the language that this standard describes.
9292
clang::Language getLanguage() const { return Language; }
9393

94+
/// Get the version code for this language standard.
95+
std::optional<uint32_t> getVersion() const { return Version; }
96+
9497
/// Language supports '//' comments.
9598
bool hasLineComments() const { return Flags & LineComment; }
9699

0 commit comments

Comments
 (0)