Commit Graph

487637 Commits

Author SHA1 Message Date
Jinyang He
60a8ec3a35 [lld][ELF] Support relax R_LARCH_ALIGN (#78692)
Refer to commit 6611d58f5b ("Relax R_RISCV_ALIGN"), we can relax
R_LARCH_ALIGN by same way. Reuse `SymbolAnchor`, `RISCVRelaxAux` and
`initSymbolAnchors` to simplify codes. As `riscvFinalizeRelax` is an
arch-specific function, put it override on `TargetInfo::finalizeRelax`,
so that LoongArch can override it, too.

The flow of relax R_LARCH_ALIGN is almost consistent with RISCV. The
difference is that LoongArch only has 4-bytes NOP and all executable
insn is 4-bytes aligned. So LoongArch not need rewrite NOP sequence.
Alignment maxBytesEmit parameter is supported in psABI v2.30.

(cherry picked from commit 06a728f3feab876f9195738b5774e82dadc0f3a7)
2024-02-16 05:39:14 -08:00
Zixu Wang
ddc2a5ff4e
[18.x][Docs] Add release note about Clang-defined target OS macros (#80044)
The change is included in the 18.x release. Move the release note to the
release branch and reformat.

(cherry picked from commit b40d5b1b08564d23d5e0769892ebbc32447b2987)
2024-02-16 05:36:18 -08:00
Ulrich Weigand
0a44c3792a [lld] Add target support for SystemZ (s390x) (#75643)
This patch adds full support for linking SystemZ (ELF s390x) object
files. Support should be generally complete:
- All relocation types are supported.
- Full shared library support (DYNAMIC, GOT, PLT, ifunc).
- Relaxation of TLS and GOT relocations where appropriate.
- Platform-specific test cases.

In addition to new platform code and the obvious changes, there were a
few additional changes to common code:

- Add three new RelExpr members (R_GOTPLT_OFF, R_GOTPLT_PC, and
R_PLT_GOTREL) needed to support certain s390x relocations. I chose not
to use a platform-specific name since nothing in the definition of these
relocs is actually platform-specific; it is well possible that other
platforms will need the same.

- A couple of tweaks to TLS relocation handling, as the particular
semantics of the s390x versions differ slightly. See comments in the
code.

This was tested by building and testing >1500 Fedora packages, with only
a handful of failures; as these also have issues when building with LLD
on other architectures, they seem unrelated.

Co-authored-by: Tulio Magno Quites Machado Filho <tuliom@redhat.com>
(cherry picked from commit fe3406e349884e4ef61480dd0607f1e237102c74)
2024-02-16 05:17:32 -08:00
Xing Xue
34fdf52cce [OpenMP][AIX]Define struct kmp_base_tas_lock with the order of two members swapped for big-endian (#79188)
The direct lock data structure has bit `0` (the least significant bit)
of the first 32-bit word set to `1` to indicate it is a direct lock. On
the other hand, the first word (in 32-bit mode) or first two words (in
64-bit mode) of an indirect lock are the address of the entry allocated
from the indirect lock table. The runtime checks bit `0` of the first
32-bit word to tell if this is a direct or an indirect lock. This works
fine for 32-bit and 64-bit little-endian because its memory layout of a
64-bit address is (`low word`, `high word`). However, this causes
problems for big-endian where the memory layout of a 64-bit address is
(`high word`, `low word`). If an address of the indirect lock table
entry is something like `0x110035300`, i.e., (`0x1`, `0x10035300`), it
is treated as a direct lock. This patch defines `struct
kmp_base_tas_lock` with the ordering of the two 32-bit members flipped
for big-endian PPC64 so that when checking/setting tags in member
`poll`, the second word (the low word) is used. This patch also changes
places where `poll` is not already explicitly specified for
checking/setting tags.

(cherry picked from commit ac97562c99c3ae97f063048ccaf08ebdae60ac30)
2024-02-16 05:15:11 -08:00
Xing Xue
cf130269fa [OpenMP][test]Flip bit-fields in 'struct flags' for big-endian in test cases (#79895)
This patch flips bit-fields in `struct flags` for big-endian in test
cases to be consistent with the definition of the structure in libomp
`kmp.h`.

(cherry picked from commit 7a9b0e4acb3b5ee15f8eb138aad937cfa4763fb8)
2024-02-16 05:15:11 -08:00
Martin Storsjö
28be6f670f [LLD] [MinGW] Implement the --lto-emit-asm and -plugin-opt=emit-llvm options (#81475)
These were implemented in the COFF linker in
3923e61b96 and
d12b99a431.

This matches the corresponding options in the ELF linker.

(cherry picked from commit d033366bd2189e33343ca93d276b40341dc39770)
2024-02-16 05:07:05 -08:00
yozhu
5750be5fc5
[CFI][annotation] Leave alone function pointers in function annotations (#81673)
Function annotation, as part of llvm.metadata, is for the function
itself and doesn't apply to its corresponding jump table entry, so with
CFI we shouldn't replace function pointer in function annotation with
pointer to its corresponding jump table entry.

(cherry picked from commit c7a0db1e20251f436e3d500eac03bd9be1d88b45)
2024-02-16 04:53:41 -08:00
Nikita Popov
e098f6c4aa [AArch64] Only apply bool vector bitcast opt if result is scalar (#81256)
This optimization tries to optimize bitcasts from `<N x i1>` to iN, but
currently also triggers for `<N x i1>` to `<M x iK>` bitcasts, if custom
lowering has been requested for these for an unrelated reason. Fix this
by explicitly checking that the result type is scalar.

Fixes https://github.com/llvm/llvm-project/issues/81216.

(cherry picked from commit 92d79922051f732560acf3791b543df1e6580689)
2024-02-16 04:50:47 -08:00
Martin Storsjö
d7c6794aff [OpenMP] [cmake] Don't use -fno-semantic-interposition on Windows (#81113)
This was added in 4b7beab418. When the
flag was added implicitly elsewhere, it was added via
llvm/cmake/modules/HandleLLVMOptions.cmake, where it wasn't added on
Windows/Cygwin targets.

This avoids one warning per object file in OpenMP.

(cherry picked from commit 72f04fa0734f8559ad515f507a4a3ce3f461f196)
2024-02-16 04:40:41 -08:00
Craig Topper
38c5b352c6 [RISCV] Make sure ADDI replacement in optimizeCondBranch has a virtual reg destination. (#81938)
If it isn't virtual, we may extend the live range of the physical
register past were it is valid. For example, across a call.

Found while trying to enable -riscv-enable-sink-fold which enables some
copy propagation in machine sink that led to ADDIs with physical
register destinations.

(cherry picked from commit feee627974df81e4cbf15537e4c4688aed66b12f)
2024-02-16 04:38:41 -08:00
Craig Topper
023925bcdf [RISCV] Use APInt in useInversedSetcc to prevent crashes when mask is larger than UINT64_MAX. (#81888)
There are no checks that the type is legal so we need to handle any
type.

(cherry picked from commit b57ba8ec514190b38eced26d541e8e25af66c485)
2024-02-16 04:37:03 -08:00
Balazs Benics
c90f200b1e
[analyzer][docs] Admit that the cleanup attribute is not supported (#81834)
In fact, the cleanup attribute is only added to the CFG, but still
unhandled by CSA.
I propose dropping this false "support" statement from the docs.
2024-02-15 22:16:19 -08:00
YunQiang Su
9cf0c2962f MipsAsmParser/O32: Don't add redundant $ to $-prefixed symbol in the la macro (#80644)
When parsing the `la` macro, we add a duplicate `$` prefix in
`getOrCreateSymbol`,
leading to `error: Undefined temporary symbol $$yy` for code like:

```
xx:
	la	$2,$yy
$yy:
	nop
```

Remove the duplicate prefix.

In addition, recognize `.L`-prefixed symbols as local for O32.

See: #65020.

---------

Co-authored-by: Fangrui Song <i@maskray.me>
(cherry picked from commit c007fbb19879f9b597b47ae772c53e53cdc65f29)
2024-02-15 22:13:32 -08:00
Maryam Moghadas
e3c6d5abb1
[PowerPC] Update V18.1.0 release notes (#81631)
Adding PowerPC updates for clang and llvm into the V18.1.0 release
notes.

---------

Co-authored-by: Maryam Moghadas <maryammo@ca.ibm.com>
2024-02-15 22:01:26 -08:00
Matthew Devereau
8b7b3fbe29 [AArch64][SME] Implement inline-asm clobbers for za/zt0 (#79276)
This enables specifing "za" or "zt0" to the clobber list for inline asm.
This complies with the acle SME addition to the asm extension here:
https://github.com/ARM-software/acle/pull/276

(cherry picked from commit d9c20e437fe110fb79b5ca73a52762e5b930b361)
2024-02-15 21:58:29 -08:00
Philip Reames
325d4a1985
Revert "[RISCV] Recurse on first operand of two operand shuffles (#79180)" (#80238)
This reverts commit bdc41106ee on the
release/18.x branch.  This change was the first in a mini-series
and while I'm not aware of any particular problem from having it on
it's own in the branch, it seems safer to ship with the previous
known good state.
2024-02-15 21:56:56 -08:00
Owen Pan
ab57f6ced6 [clang-format] Don't remove parentheses in macro definitions (#81444)
Closes #81399.

(cherry picked from commit 4af24d4ab76539706bfbceec4b3923426fb1b9e7)
2024-02-15 21:54:37 -08:00
Mark de Wever
872fe20ddd [libc++][print] Moves is_terminal to the dylib. (#80464)
Having the test in the header requires including unistd.h on POSIX
platforms. This header has other declarations which may conflict with
code that uses named declarations provided by this header. For example
code using "int pipe;" would conflict with the function pipe in this
header.

Moving the code to the dylib means std::print would not be available on
Apple backdeployment targets. On POSIX platforms there is no transcoding
required so a not Standard conforming implementation is still a useful
and the observable differences are minimal. This behaviour has been done
for print before https://github.com/llvm/llvm-project/pull/76293.

Note questions have been raised in LWG4044 "Confusing requirements for
std::print on POSIX platforms", whether or not the isatty check on POSIX
platforms is required. When this LWG issue is resolved the
backdeployment targets could become Standard compliant.

This patch is intended to be backported to the LLVM-18 branch.

Fixes: https://github.com/llvm/llvm-project/issues/79782
(cherry picked from commit 4fb7b3301bfbd439eb3d30d6a36c7cdb26941a0d)
2024-02-15 21:35:51 -08:00
Martin Storsjö
8391421532
[LLD] [docs] Add a release note for the SOURCE_DATE_EPOCH support (#81388) 2024-02-15 21:35:12 -08:00
Nikita Popov
831b9a5db2 [AArch64][GISel] Don't pointlessly lower G_TRUNC (#81479)
If we have something like G_TRUNC from v2s32 to v2s16, then lowering
this to a concat of two G_TRUNC s32 to s16 followed by G_TRUNC from
v2s16 to v2s8 does not bring us any closer to legality. In fact, the
first part of that is a G_BUILD_VECTOR whose legalization will produce a
new G_TRUNC from v2s32 to v2s16, and both G_TRUNCs will then get
combined to the original, causing a legalization cycle.

Make the lowering condition more precise, by requiring that the original
vector is >128 bits, which is I believe the only case where this
specific splitting approach is useful.

Note that this doesn't actually produce a legal result (the alwaysLegal
is a lie, as before), but it will cause a proper globalisel abort
instead of an infinite legalization loop.

Fixes https://github.com/llvm/llvm-project/issues/81244.

(cherry picked from commit 070848c17c2944afa494d42d3ad42929f3379842)
2024-02-13 11:51:23 -08:00
Martin Storsjö
58b2a6d3bc [LLD] [test] Avoid printing timestamps past INT32_MAX with llvm-readobj (#81463)
If llvm-readobj is built with a 32 bit time_t, it can't print such
timestamps correctly.

(cherry picked from commit 0bf4ff29816c0eead99ba576a2df2e3c4d214b1f)
2024-02-13 11:44:00 -08:00
Koakuma
50f8284cea [SPARC] Support reserving arbitrary general purpose registers (#74927)
This adds support for marking arbitrary general purpose registers -
except for those with special purpose (G0, I6-I7, O6-O7) - as reserved,
as needed by some software like the Linux kernel.

(cherry picked from commit c2f9885a8aa3a820eefdacccf3fcc6b9d87e3284)
2024-02-13 11:42:37 -08:00
Kai Sasaki
076953d250 [mlir] Skip invalid test on big endian platform (s390x) (#80246)
The buildbot test running on s390x platform keeps failing since [this
time](https://lab.llvm.org/buildbot/#/builders/199/builds/31136). This
is because of the dependency on the endianness of the platform. It
expects the format invalid in the big endian platform (s390x). We can
simply skip it.

See: https://discourse.llvm.org/t/mlir-s390x-linux-failure/76695
(cherry picked from commit 65ac8c16e028b23b49fd6b03817faa1ab6c0229d)
2024-02-13 11:39:15 -08:00
Martin Storsjö
0d656f0f12 [LLD] [COFF] Pick timestamps from the SOURCE_DATE_EPOCH variable (#81326)
The SOURCE_DATE_EPOCH environment variable can be set in order to get
reproducible build.

When linking PE/COFF modules with LLD, the timestamp field is set to the
current time, unless either the /timestamp: or /Brepro option is set. If
neither of them is set, check the SOURCE_DATE_EPOCH variable, before
resorting to using the actual current date and time.

See https://reproducible-builds.org/docs/source-date-epoch/ for reference
on the use of this variable.

(cherry picked from commit 0df8aed6c30f08ded526038a6bbb4daf113a31c1)
2024-02-10 17:48:47 -08:00
Po-yao Chang
91cb452c3c [libc++][modules] Fix disabling Unicode (#81294)
-DLIBCXX_ENABLE_UNICODE=OFF or -D_LIBCPP_HAS_NO_UNICODE doesn't build
without this change.

(cherry picked from commit 30cd1838dc334775f7a29f57b581f2bdda3f0ea1)
2024-02-10 15:55:03 +00:00
Quentin Dian
391d948748 [RegisterCoalescer] Clear instructions not recorded in ErasedInstrs but erased (#79820)
Fixes #79718. Fixes #71178.

The same instructions may exist in an iteration. We cannot immediately
delete instructions in `ErasedInstrs`.

(cherry picked from commit 95b14da678f4670283240ef4cf60f3a39bed97b4)
2024-02-09 13:29:49 -08:00
Arthur Eubanks
d079fec440 [X86] Fix lowering TLS under darwin large code model (#80907)
OpFlag and WrapperKind should be chosen consistently with each other in
regards to PIC, otherwise we hit asserts later on.

Broken by c04a05d8.

Fixes #80831.

(cherry picked from commit 5a83bccb35d6b0e6914b52af6db067aa01dd3efb)
2024-02-09 13:28:23 -08:00
Owen Pan
8b2cb5f716 Revert "[clang] Mark clang-format-ignore.cpp as unsupported on Windows"
This reverts commit dc61ebb44c.

See https://github.com/llvm/llvm-project/pull/76733#issuecomment-1890311152.

(cherry picked from commit a628f68a9c4ce6f3dcd0c8bb3650db45671ed15a)
2024-02-09 13:26:28 -08:00
Owen Pan
0135e048a1 [clang-format] Fix a regression in dumping the config (#80628)
Commit d813af73f7 addressed a regression introduced by commit
3791b3fca6
but caused `clang-format -dump-config` to "hang".

This patch reverts changes to ClangFormat.cpp by both commits and
reworks the cleanup.

Fixes #80621.

(cherry picked from commit 8f6e13e6da84510c8321717860fd506e12118514)
2024-02-09 13:24:35 -08:00
YunQiang Su
2b033a32ea MIPS/libunwind: Use -mfp64 if compiler is FPXX (#68521)
Libunwind supports FP64 and FP32 modes, but not FPXX. The reason is
that, FP64 and FP32 have different way to save/restore FPRs. If
libunwind is built as FPXX, we have no idea which one should we use.

It's not due to the code bug, but rather the nature of FPXX.
FPXX is an ABI which uses only a common subset of FR=1(FP64) and FR=0
(FP32).
So that FPXX binaries can link with both FP64 and FP32 ones, aka.
    FPXX + FP32 -> FP32
    FPXX + FP64 -> FP64

While for libunwind, we should save/restore all of FPRs. If we use FPXX,
we can only save/restore a common subset of FPRs, instead of superset.

If libunwind is built as FP64, it will interoperatable with FPXX/FP64
APPs, and if it is built as FP32, it will interoperatable with
FP32/FPXX. Currently most of O32 APPs are FPXX or FP64, while few are
FP32.

So if the compiler is FPXX, which is the default value of most
toolchain, let's switch it to FP64.

Co-authored-by: YunQiang Su <yunqiang.su@cipunited.com>
(cherry picked from commit 4520b478d2512b0f39764e0464dcb4cb961845b5)
2024-02-09 13:22:24 -08:00
Mariya Podchishchaeva
a8158d8836 [clang] Fix unexpected -Wconstant-logical-operand in C23 (#80724)
C23 has `bool`, but logical operators still return int. Check that
we're not in C to avoid false-positive -Wconstant-logical-operand.

Fixes https://github.com/llvm/llvm-project/issues/64356

(cherry picked from commit a18e92d020b895b712175a3b13a3d021608115a7)
2024-02-09 13:20:35 -08:00
Fangrui Song
e6fa3ff6cc [dfsan] Wrap glibc 2.38 __isoc23_* functions (#79958)
Fix #79283: `test/dfsan/custom.cpp` has undefined symbol linker errors
on glibc 2.38 due to lack of wrappers for `__isoc23_strtol` and
`__isoc23_scanf` family functions.

Implement these wrappers as aliases to existing wrappers, similar to
https://reviews.llvm.org/D158943 for other sanitizers.

`strtol` in a user program, whether or not `_ISOC2X_SOURCE` is defined,
uses the C23 semantics (`strtol("0b1", 0, 0)` => 1), when
`libclang_rt.dfsan.a` is built on glibc 2.38+.

(cherry picked from commit 648560062af8deb4e6478130deb1dd8fa62929a8)
2024-02-09 13:18:45 -08:00
Sander de Smalen
1e5b4db429 [Clang][AArch64] Fix some target guards and remove +sve from tests. (#80681)
The TargetGuard fields for 'svldr[_vnum]_za' and 'svstr[_vnum]_za' were
incorrectly set to `+sve` instead of `+sme`. This means that compiling
code that uses these intrinsics requires compiling for both `+sve` as
well as `+sme`.

This PR also fixes the target guards for the `svadd` and `svsub`
builtins that are enabled under `+sme2,+sme-i16i64` and
`+sme2,+sme-f64f64`, as it initially did the following:
```
  let TargetGuard = "+sme2" in {
    let TargetGuard = "+sme-i16i64" in {
      // Builtins defined here will be predicated only by
      // '+sme-i16i64', and not '+sme2,+sme-i16i64'.
    }
  }
```
This PR also removes `-target-feature +sve` from all the SME tests, to
ensure that the SME features are sufficient to build the tests.

(cherry picked from commit 3d186a77cf1aa979014a6443cb423a633c167d9f)
2024-02-09 13:13:46 -08:00
Shanzhi
b12a742c20 [Clang][AST] Fix a crash on attaching doc comments (#78716)
This crash is basically caused by calling
`ASTContext::getRawCommentForDeclNoCacheImp` with its input arguments
`RepresentativeLocForDecl` and `CommentsInTheFile` refering to different
files. A reduced reproducer is provided in this patch.

After the source locations for instantiations of funtion template are
corrected in the commit 256a0b298c, the
variable `CommitsInThisFile` in the function
`ASTContext::attachCommentsToJustParsedDecls` would refer to the source
file rather than the header file for implicit function template
instantiation. Therefore, in the first loop in
`ASTContext::attachCommentsToJustParsedDecls`, `D` should also be
adjusted for relevant scenarios like the second loop.

Fixes #67979
Fixes #68524
Fixes #70550

(cherry picked from commit 5f4ee5a2dfa97fe32ee62d1d67aa1413d5a059e6)
2024-02-08 15:59:07 -08:00
Tom Stellard
a88b998f8e [workflows] Fix libclc CI tests (#80942)
This was broken by 1a6426067fb33a8a789978f6e229108787a041be.

(cherry picked from commit ab92f6274b7c3a4b4445d47017bc481aa919545f)
2024-02-08 15:40:09 -08:00
Tom Stellard
9e2e194330 [workflows] Use /mnt as the build directory on Linux (#80583)
There is more space available on /mnt (~56G) than on / (~30G), and we
are starting to see some of the CI jobs run out of disk space on Linux.

(cherry picked from commit 1a6426067fb33a8a789978f6e229108787a041be)
2024-02-08 15:40:08 -08:00
Tom Stellard
88d4f1a2dc [workflows] Fix lldb-tests and libclc-tests (#80751)
This was broken by d25022bb689b9bf48a24c0ae6c29c1d3c2f32823, which
caused the workflow to pass an empty string to ninja as the target. The
'all' target is probably not the right target for these tests, but this
is what the behavior was before
d25022bb689b9bf48a24c0ae6c29c1d3c2f32823.

(cherry picked from commit 792d928e15aa30c8b686eff465598ceea0b03891)
2024-02-08 15:40:08 -08:00
Tom Stellard
c681187f7d [workflows] Stop using the build-test-llvm-project action (#80580)
This action is really just a wrapper around cmake and ninja. It doesn't
add any value to the builds, and I don't think we need it now that there
are reusable workflows.

(cherry picked from commit d25022bb689b9bf48a24c0ae6c29c1d3c2f32823)
2024-02-08 15:40:08 -08:00
David CARLIER
9fc4cf7223 [compiler-rt] remove hexdump interception. (#79378)
a freebsd dev member reported a symbol conflict and intercepting this
had little value anyway.

(cherry picked from commit 16a1ef86cbc5e6c829919ec6c73325413b0cd21b)
2024-02-08 15:36:07 -08:00
Chuanqi Xu
c6c86965d9 [C++20] [Modules] Introduce -fskip-odr-check-in-gmf (#79959)
Close https://github.com/llvm/llvm-project/issues/79240

Cite the comment from @mizvekov in
//github.com/llvm/llvm-project/issues/79240:

> There are two kinds of bugs / issues relevant here:
>
> Clang bugs that this change hides
> Here we can add a Frontend flag that disables the GMF ODR check, just
> so
> we can keep tracking, testing and fixing these issues.
> The Driver would just always pass that flag.
> We could add that flag in this current issue.
> Bugs in user code:
> I don't think it's worth adding a corresponding Driver flag for
> controlling the above Frontend flag, since we intend it's behavior to
> become default as we fix the problems, and users interested in testing
> the more strict behavior can just use the Frontend flag directly.

This patch follows the suggestion:
- Introduce the CC1 flag `-fskip-odr-check-in-gmf` which is by default
off, so that the every existing test will still be tested with checking
ODR violations.
- Passing `-fskip-odr-check-in-gmf` in the driver to keep the behavior
we intended.
- Edit the document to tell the users who are still interested in more
strict checks can use `-Xclang -fno-skip-odr-check-in-gmf` to get the
existing behavior.
2024-02-06 21:30:14 -08:00
Chuanqi Xu
70195e0d67 [C++20] [Modules] Remove previous workaround for odr hashing enums
Previosly we land
085eae6b86
to workaround the false positive ODR violations in
https://github.com/llvm/llvm-project/issues/76638.

However, we decided to not perform ODR checks for decls from GMF in
https://github.com/llvm/llvm-project/issues/79240 and we land the
corresponding change. So we should be able to remove the workaround now.

The original tests get remained.
2024-02-06 21:30:14 -08:00
Chuanqi Xu
a0e1cc0aef [C++20] [Modules] Don't perform ODR checks in GMF
Close https://github.com/llvm/llvm-project/issues/79240.

See the linked issue for details. Given the frequency of issue reporting
about false positive ODR checks (I received private issue reports too),
I'd like to backport this to 18.x too.
2024-02-06 21:30:14 -08:00
Momchil Velikov
a9a790e0e2
[AArch64] Add some release notes items (#79983) 2024-02-06 21:29:25 -08:00
Owen Pan
d5e2f0e648 [clang-format] Fix a bug in AnnotatingParser::rParenEndsCast() (#79549)
Fixes #78965.

(cherry picked from commit f826f55b2ab68c2515fae751dc2d6ef77f37b172)
2024-02-06 21:26:58 -08:00
Alexandros Lamprineas
9eda0ecd55
[Release Notes][FMV] Document support for rcpc3 and mops features. (#80152)
Documents support for Load-Acquire RCpc instructions v3 (rcpc3) as well
as Memory Copy and Memory Set Acceleration instructions (mops) when
targeting AArch64.
2024-02-06 17:11:39 -08:00
Shafik Yaghmour
2427c85a1a [Clang][Sema] Fix regression due to missing ambiguity check before attempting access check. (#80730)
Previously when fixing ambiguous lookup diagnostics in
cc1b6668c5 The change refactored
`LookupResult` to split out diagnosing access and ambiguous lookups. The
call to `getSema().CheckLookupAccess(...)` should have guarded by a
check for isAmbiguous(). This change adds that guard.

Fixes: https://github.com/llvm/llvm-project/issues/80435
(cherry picked from commit a7bc9cb6ffa91ff0ebabc45c0c7263c7c2c3a4de)
2024-02-06 17:04:46 -08:00
alexfh
73cd40db8e
Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects of the same type) (#77768)" in release/18.x (#79400)
- Revert "[SemaCXX] Implement CWG2137 (list-initialization from objects
of the same type) (#77768)", see
https://github.com/llvm/llvm-project/pull/77768#issuecomment-1908946696
2024-02-06 17:02:12 -08:00
Eric
5de1bcb70d
[🍒] Unconditionally lower std::string's alignment requirement from 16 to 8 (#68925) (#79480)
This change saves memory by providing the allocator more freedom to
allocate the most
efficient size class by dropping the alignment requirements for
std::string's
pointer from 16 to 8. This changes the output of std::string::max_size,
which makes it ABI breaking.

That said, the discussion concluded that we don't care about this ABI
break. and would like this change enabled universally.

The ABI break isn't one of layout or "class size", but rather the value
of "max_size()" changes, which in turn changes whether `std::bad_alloc`
or `std::length_error` is thrown for large allocations.

This change is the child of PR #68807, which enabled the change behind
an ABI flag.
2024-02-06 17:01:38 -08:00
Oskar Wirga
7fb11860b0
Refactor recomputeLiveIns to operate on whole CFG (#79498) (#79641)
Currently, the way that recomputeLiveIns works is that it will recompute
the livein registers for that MachineBasicBlock but it matters what
order you call recomputeLiveIn which can result in incorrect register
allocations down the line.

Now we do not recompute the entire CFG but we do ensure that the newly
added MBB do reach convergence. This fixes a register allocation bug
introduced in AArch64 stack probing.

(cherry picked from commit ff4636a4ab00b633c15eb3942c26126ceb2662e6)
2024-02-06 17:01:01 -08:00
Shengchen Kan
0328b878e8 [X86][tablgen] Fix the broadcast tables (#79675)
(cherry picked from commit 7c3ee7cbe6419ea5e37ce2723cc1a1688380581f)
2024-02-06 16:57:46 -08:00