[Modules] Don't merge attributes for namespace redeclarations. (#214361)
Follow-up to #208348 which aimed to handle decl attributes on
deserialization the same way as during parsing. Turned out during
parsing we don't merge attributes for namespace redeclarations.
[DWARF] Update comment for useSplitDwarf (#214241)
The comment was introduced originally in
55c51815250a25b78ed8ac3dee0a0a843ac636ed. Since that time, split DWARF
is no longer a proposal and is officially a part of the standard, so
update the comment.
[Transforms] Delete loop-extract pass
This was only used by bugpoint as far as I can tell, which was deleted
in 9d5574dda60151dcd1eb6f315c20e4d9120596f9. Given it is not used
anywhere, remove it.
I'm also not sure it's super useful for downstreams. When we were doing
a research project during my undergrad that needed loop extraction, we
ended up writing our own utilities to do this for reasons that I cannot
remember exactly.
Reviewers: artagnon, nikic
Pull Request: https://github.com/llvm/llvm-project/pull/214252
[flang] - Call _FortranAAssignSimple instead of _FortranAAssign for intrinsic-type array assignments.
This patch adds support for calling _FortranAAssignSimple, a faster-path for array assignments.
`_FortranAAssignSimple` is called when ALL the following conditions are true:
1. Intrinsic element type (not derived type)
2. Matching ranks (no scalar-to-array broadcasting)
3. Non-volatile
4. Not polymorphic
5. Not explicit-length character
6. Not temporary LHS
Otherwise, uses `_FortranAAssign` (or specialized variants like `_FortranAAssignPolymorphic`, `_FortranAAssignExplicitLengthCharacter`).
This is a (perhaps final) part of the fix for https://github.com/llvm/llvm-project/issues/203915
[libc++][test] Fix construction and comparison for testing allocators (#212702)
Previously, there were several issues in the allocators provided by
`min_allocator.h` and `test_allocator.h`.
1. Some allocators did not support heterogenous rebinding construction,
and thus failed to meet the Cpp17Allocator named requirements.
2. Some allocators only had `operator==`. This was fine since C++20 but
not in C++17 where there were no rewritten candidates of `!=`.
3. Many equality operators were non-template and homogeneous. This
caused ambiguity since C++20 due to rewritten candidates.
This patch fixes these issues by
- adding missing constructors,
- adding missing `operator!=` (in pre-C++20 modes), and
- making `operator==` and some `operator!=` templates.
Note that it is intended that `operator==`'s for `test_allocator`
perform seemingly redundant constructions (via `static_cast<const
[3 lines not shown]
[libc++] Move lerp to its own header instead of <cmath> (#213111)
This moves <cmath> towards an umbrella header.
Co-authored-by: A. Jiang <de34 at live.cn>
[libc++] Refactor the conditions for enabling assertion tests (#213294)
Every hardening assertion test used to repeat a hand-rolled set of Lit
conditions like `has-unix-headers` and a bunch of others. Instead,
define a single Lit feature to handle all of them.
Assisted by Claude
Fixes #213148
[libc++] Add missing return 0 to main functions in tests (#214190)
The libc++ test suite requires main() to explicitly return a value,
since freestanding support requires it.
[AsmPrinter] Emit STT_OBJECT type and size for jump tables (#214170)
Before this change, jump tables placed in a separate section were
emitted with no symbol type, leaving them STT_NOTYPE, and with no size
in their ELF file.
This change annotates the jump tables with object type and a size when
the target supports type/size directives. Jump tables inlined into the
function's own section are already covered by that function's symbol, so
they are left as-is.
This helps when disassembling a file, to understand that the jump table
is a single complete object, rather than the symbol being purely a
location. I think this reflects the ELF semantics better.
[AMDGPU][GlobalISel] Pre-commit tests for readanylane merge regbank combine (NFC)
Add regbank-combiner tests covering a copy to vgpr whose source is a
merge or build_vector of G_AMDGPU_READANYLANE results and uniform
values. These currently keep the round trip through sgprs, and also
cover the cases where the merge has another user and where all merge
sources are uniform.
Co-authored-by: Cursor <cursoragent at cursor.com>
[ORC] Make ExecutionSession non-copyable / non-moveable. (#214231)
Many ORC classes capture references to the ExecutionSession -- it is not
intended to be moved or copied.
[flang][cuda] Delay box cuf.alloc past host association captures (#214347)
CUFAllocDelay treated the store of a descriptor into a host association
tuple as a use, so a device allocatable captured by an internal
procedure kept its descriptor allocation in the prologue. That allocates
managed memory before the program can call cudaSetDevice, binding a CUDA
context to the wrong device.
The store now sinks together with the allocation, constrained by the
tuple's readers, and the group is placed at the nearest common dominator
of all uses so it can sink into a later block.
[CIR][SYCL] Support SYCL kernel call statement in host codegen (#213728)
Add CIRGen support for lowering SYCLKernelCallStmt during host
compilation, emitting the kernel launch statement in place of the
`sycl_kernel_entry_point` function body (mirroring classic CodeGen).
Device compilation, were the offload kernel caller entry point
is emitted instead, is future work and thus marked as NIY.
[NPM] Make few more passes required - 2 (#213608)
as discussed in https://github.com/llvm/llvm-project/pull/203511, few of
these should not really be required (such as sink) with O0/opt-none, yet
we require this for consistency between legacy and NPM. We need to look
at the passes separately and selectively make strictly optimizing passes
optional.