[clang][docs] Redirect folks from CSA sections for usual Clang crashes (#175935)
Almost in every release there are contributors adding non-CSA entries to
the CSA release docs sections due to confusion.
To reduce the temptation in the future, let's add a reminder.
Note that it's not the end of the world if entries are put in the wrong
section, because I always moved them in the past. It would be simply
more convenient to avoid this.
[BOLT][BTI] Patch LLD-generated PLTs to contain BTI landing pad (#173245)
This patch adds the patchPLTEntryForBTI to enable patching PLT entries
generated by LLD.
## Context:
To keep BTI consistent, targets of stubs inserted in LongJmp need to be
patched. As PLTs are not optimized and emitted by BOLT, this patch adds
a helper for patching them in the original .plt section.
For PLTs generated by LLD, this is safe as LLD inserts extra nops to
PLTs which don't already contain a BTI.
PLT entry before patching:
```
adrp x16, Page(&(.got.plt[n]))
ldr x17, [x16, Offset(&(.got.plt[n]))]
add x16, x16, Offset(&(.got.plt[n]))
[26 lines not shown]
[X86] SimplifyDemandedVectorEltsForTargetNode - add basic X86ISD::PCLMULQDQ handling (#176142)
Now that we're creating X86ISD::PCLMULQDQ nodes in DAG, we need to
handle basic vector simplification - a minor first step towards adding
ISD::CLMUL vector handling
X86ISD::PCLMULQDQ uses the lower/upper i64 element from each 128-bit
lane depending on whether bit0/bit4 are set (for lhs/rhs operands)
These tests were copied from InstCombine which already did something
similar for the pclmulqdq intrinsics
[InstSimplify] Avoid poison value for ctz/abs in simplifyWithOpsReplaced() (#176168)
If we drop flags, we'll set the zero_is_poison/int_min_is_poison flag to
false as part of the transform. However, the constant folding was still
performed with the value true, which made constant folding return
poison. This resulted in the pattern failing to match, as the poison
value is not equal to the other select arm.
To avoid this, add some special handling to set the argument to false
during constant folding as well.
Fixes https://github.com/llvm/llvm-project/issues/175282.
[cmake] Restore exception flags in llvm-config --cxxflags (#176195)
https://github.com/llvm/llvm-project/pull/173869 accidentally dropped
rtti and eh flags from `llvm-config --cxxflags`. Then
https://github.com/llvm/llvm-project/pull/174084 restored the rtti
flags. The eh flags were not included with the rationale that they are
not ABI relevant.
This PR restores the eh flags as well. While they are not strictly
necessary, I believe that code that directly interfaces with LLVM almost
certainly does not want to build with exceptions if LLVM is not built
with exceptions. Building in the peculiar `-fexceptions -fno-rtti`
configuration is rarely useful and likely not intended.
On MacOS, this is also relevant because it's not possible to use C++17
headers without `-fno-exceptions` when using older deployment targets.
In that configuration, `-fno-exceptions` is required to interact with
LLVM.
[AMDGPU] Rematerialize VGPR candidates when SGPR spills results in VGPR Excess (#168079)
Before, when selecting candidates to rematerialize, we would only
consider SGPR candidates when there was an excess of SGPR registers.
Failing to eliminate the excess would result in spills to VGPRs.
This is normally not an issue, unless spilling to VGPRs results in
excess VGPRs.
This patch does 2 things:
* It relaxes the GCNRPTarget success criteria: now we accept regions
where we spill SGPRs to VGPRs, as long as this does not end up in
excess VGPRs.
* It changes isSaveBeneficial to consider the excess VGPRs (which
includes the SGPRs that would be spilled to VGPR).
With these changes, the compiler rematerializes VGPRs when the excess
SGPRs would result in VGPR excess.
[4 lines not shown]
Revert "[llvm-readobj] Dump callgraph section info for ELF" (#176221)
Reverts llvm/llvm-project#157499
Following up on discourse post. Reverting this patch and will attempt a
reland addressing post merge comments.
(cherry picked from commit 97576a86eb25696a2b57cd42370991b172c08405)
[flang] Fix crash with coarray teams #171048 (#172259)
This PR updates the `CHANGE TEAM` construct to fix the bug mentioned in
the issue #171048.
When a construct such as `IfConstruct` was present in the `CHANGE TEAM`
region, several BB were created but outside the region.
(cherry picked from commit 1d4f9ac37c043198d823e85e3cd777dc970d8b75)
[lldb-dap] Move targetId and debuggerId into a session property (#175930)
This makes it clear the fields required for attaching to an existing
debug session.
It also makes it easier to check mutually exclusive fields required to
attach.
(cherry picked from commit 6977e6812c3e2027f0f427506ee151011f1e55bb)
[JITLink][CompactUnwind] Explicitly enumerate mergeable encodings. NFCI. (#176317)
Updates CompactUnwindTraits_MachO_arm64 and
CompactUnwindTraits_MachO_x86_64 encodingCanBeMerged methods to use
switch statements that clearly list mergeable encodings, and have a
default "false" case.
Since the new scheme explicitly covers DWARF modes (always
non-mergeable), this patch removes the separate DWARF mode check from
mergeRecords in CompactUnwindSupport.h.