[llvm-readobj, ELF] Support reading binary with more than PN_XNUM segments.
FreeBSD coredump uses program headers to store mmap information. It is possible
for program to use more than PN_XNUM mmaps. Therefore, we implement the support
of PN_XNUM in readelf.
[AArch64] Fold MIN/MAX(Vec[0], Vec[1]) to VECREDUCE_MIN/MAX(Vec) (#181162)
If we have a lowering for `VECREDUCE_MIN/MAX` this is generally more
efficient than the scalar expansion.
[Index] Reflect in SymbolSubKind whether a typedef points to a struct or a class (#181967)
Typedefs don't have their own symbol kind in the Language Server
Protocol, the choices are Struct or Class. For clangd to be able to
represent typedefs accurately in response to requests such as
`workspace/symbol`, it needs this information surfaced in
index::SymbolInfo.
Fixes https://github.com/clangd/clangd/issues/2253
[libc++][NFC] Use std::has_single_bit instead of std::popcount(v) == 1 (#181787)
We have a function that specifically checks if a single bit is set. Use
that instad of a `popcount`.
MIPS: readsWritesFloatRegister, inc Idx for continue (#179932)
Otherwise, the input register will also be treat as write.
(cherry picked from commit c7e3bddbfd3451cf5138ec94e00eae45ab9c4b7a)
[OpenMP][MLIR] Modify lowering OpenMP Dialect lowering to support attach mapping
This PR adjusts the LLVM-IR lowering to support the new attach map type that the runtime
uses to link data and pointer together, this swaps the mapping from the older
OMP_MAP_PTR_AND_OBJ map type in most cases and allows slightly more complicated ref_ptr/ptee
and attach semantics.
[Flang][OpenMP][Offload] Modify MapInfoFinalization to handle attach mapping and 6.1's ref_* and attach map keywords
This PR is one of four required to implement the attach mapping semantics in Flang, alongside the
ref_ptr/ref_ptee/ref_ptr_ptee map modifiers and the attach(always/never/auto) modifiers.
This PR is the MapInfoFinalization changes required to support these features, it mainly deals with
applying the correct attach map type and manipulating the descriptor types maps for base address
and descriptor so that when we specify ref_ptr/ref_ptee we emit one of the two maps and when we
emit ref_ptr_ptee we emit our usual default maps. In all cases we add the "glue" of an new
attach map except in cases where a user has provided attach never. In cases where we are
provided an always, we apply the always map type to our attach maps.
It's important to note the runtime has a toggle for the auto map behaviour, which will flip the
attach behaviour to the newer semantics or the older semantics for backwards compatability (outside
the purview of this PR but good to mention).
[AMDGPU][GlobalISel][NFC] Filter getCandidatesForLowering to only process G_PHI (#181814)
The divergence-lowering pass runs in three stages:
1. lowerTemporalDivergence()
2. lowerTemporalDivergenceI1() — creates PHI instructions via SSAUpdater
3. lowerPhis() — lowers divergent i1 G_PHIs into lane mask PHIs
getCandidatesForLowering() in stage 3 iterates over all PHIs via
MBB.phis() and checks isDivergent() on their destination registers. This
includes PHI instructions already created by stage 2, whose registers
were never part of the original uniformity analysis.
Today, this works by accident — isDivergent() returns false for unknown
registers, so these PHIs are skipped. But this relies on isDivergent()
behavior for unanalyzed registers, which is not guaranteed. If
isDivergent() were to return true for unknown registers (e.g., as a
conservative default), lowerPhis() would re-process already-lowered
PHIs, adding redundant COPY instructions(EX:
https://github.com/llvm/llvm-project/pull/180509). This would not be a
[2 lines not shown]
[GlobalIsel] Use aext in ctlz_zero_undef widenScalar expansion (#181506)
Use `G_ANYEXT` instead of `G_ZEXT` when widening the source of
`G_CTLZ_ZERO_UNDEF`. The extended upper bits are immediately shifted out
by the subsequent left-shift, so zero-extending is unnecessarily
constraining.
Before:
```
%wide = G_ZEXT %src
%shifted = G_SHL %wide, sizeDiff
%result = G_CTLZ_ZERO_UNDEF %shifted
```
After:
```
%wide = G_ANYEXT %src
%shifted = G_SHL %wide, sizeDiff
%result = G_CTLZ_ZERO_UNDEF %shifted
```
[mlir][llvmir][OpenMP] Translate affinity clause in task construct to llvmir
Translate affinity entries to LLVMIR by passing affinity information to
createTask (__kmpc_omp_reg_task_with_affinity is created inside PostOutlineCB).
[Flang][mlir][OpenMP] Support affinity clause codegen in Flang
This patch translate flang ast to OpenMP dialect for affinity clause
including the iterator modifier.
[mlir][OpenMP] Introduce 'omp.iterators' for OpenMP iterator modifiers
`omp.iterators` provides information of induction variables and iterator
range in OpenMP iterator modifier.
Example:
```
%it = omp.iterators(%i0: index, %i1: index) =
(%lb0 to %ub0 step %st0,
%lb1 to %ub1 step %st1) {
omp.yield(%i0, %i1 : index, index)
} -> !omp.iterated<!llvm.struct<(!llvm.ptr, i64)>>
```
Here's how we can use the omp.iteraters to generate multi-dimensional
loop in llvm ir:
```
// Induction variables can be translated from the block arguments
// in omp.iterators.
[8 lines not shown]
[NFC][Clang] Apply Rule of Three to classes in ASTUnit.h (#182198)
Static analysis flagged that some classes in ASTUnit.h defined a
destructor but did not also define a copy constructor or copy
assignment. This is a bug and I am defining them as deleted to prevent
accidently copy or assigns.
[flang] Add Flang Call Notes documents (#180287)
This PR is the result of discussion in
https://discourse.llvm.org/t/rfc-what-to-do-regarding-the-flang-call-notes-document/89450.
The intent with this PR is to move away from the former Google Doc in
favor of keeping the call notes in the primary repository. This PR has
the boilerplate and the notes from the last few meetings. In future,
notes from previous calls could be added in as well, once recovered from
the corrupted document.
The intended flow going forward would be for the call organizer to draft
the meeting's agenda in the working Google Doc referenced in
MeetingNotes/README.md, post it on Slack the day before the meeting,
take notes in the document during the call, then translate those notes
into a new notes document in the correct folder after the call is
completed and create a PR.