[libc++] Remove _LIBCPP_HIDE_FROM_ABI from <__utility/pair.h> (#196508)
This is a follow-up to #193045. This only drops `_LIBCPP_HIDE_FROM_ABI`
in a small part of the code base to make sure everything works as
expected. Once this has been in trunk for a while and there aren't any
problems, there will be larger follow-up patches to remove
`_LIBCPP_HIDE_FROM_ABI` throughout the code base.
[clang][deps] Use `ModuleDepCollector` for Make output (#182063)
The dependency scanner works significantly differently depending on what
kind of output it's asked to produce. The Make output format has been
using the regular Clang dependency collection mechanism since it was
first implemented. This means the implementation works very differently
to the rest of the scanner and isn't able to turn implicit module
command lines into Makefiles using explicit modules.
This PR unifies the two implementations, using `ModuleDepCollector` even
for Make output. Emitting explicit module builds into Makefiles will
come in a later PR.
[AMDGPU] Validate forced lit() immediate
Right now it takes validation path of an inline constant if fits
even though it is forced to literal encoding.
[VPlan] Unify inner and outer loop paths (NFCI). (#192868)
Move combine the logic of tryToBuildVPlanWithVPRecipes and
tryToBuildVPlan, as well as planInVPlanNativePath and plan.
This unifies the code paths to construct plans for both inner and outer
loop vectorization, and removes some duplication. It also ensures we run
almost the same VPlan-transformations in both modes. Currently a few
code paths need to be guarded with a check if we are dealing with an
inner and outer loop.
PR: https://github.com/llvm/llvm-project/pull/192868
[lldb] Remove `__iter/len__` from `SBTypeEnumMember` (#196610)
`SBTypeEnumMember` doesn't have a `GetSize` and
`GetTypeEnumMemberAtIndex`, so having `__iter__` and `__len__` doesn't
make sense. These are on `SBTypeEnumMemberList`. From the docstrings, it
looks like the extensions were copied from said type.
[DWARFLinker] Emit .debug_names entries for DW_TAG_template_alias (#196440)
The tag was missing from the accelerator-records saver's switch, so
template alias DIEs were skipped and --verify-dwarf=output rejected the
result.
[compiler-rt][profile][NFC] Introduce INSTR_PROF_INSTRUMENT_GPU_FUNC macro (#196538)
Add a macro INSTR_PROF_INSTRUMENT_GPU_FUNC for the name of the GPU
profiling function __llvm_profile_instrument_gpu (added in #187136),
following the same pattern as INSTR_PROF_VALUE_PROF_MEMOP_FUNC. Use the
macro in both the declaration in InstrProfiling.h and the definition in
InstrProfilingPlatformGPU.c.
This prepares the upcoming HIP/AMDGPU offload PGO patch (#177665) to use
the same macro when calling this function.
[flang][OpenMP] Fix component-level initializer in declare reduction (#195751)
When a declare reduction initializer uses a component assignment such as
`initializer(omp_priv%member = 0)`, the lowering would store the scalar
RHS value (i32) directly to the whole derived-type reference, causing a
FIR verification error: `'fir.store' op store value type must match memory reference type`.
The root cause is that `MakeEvaluateExpr` extracts only the RHS
expression
from the `AssignmentStmt`, discarding the LHS component information. The
lowering callback then returns this scalar value which gets stored to
the
wrong type.
Fix this by mirroring the approach already used for combiner
expressions:
pass the parser-level `OmpStylizedInstance` to `processInitializer` so
the
callback can access the typed assignment and lower the full assignment
[8 lines not shown]
[Clang] Track temporary cleanups in rebuilt default member initializers
Fixes https://github.com/llvm/llvm-project/issues/196469
When Clang rebuilds a default member initializer for CWG1815 lifetime extension, TreeTransform's initializer path can drop CXXBindTemporaryExpr cleanup information. That loses destructor cleanup for ordinary temporaries inside the initializer; for a DMI-local lambda with an init-capture, the closure temporary is not destroyed at the end of the full-expression.
Handle CXXBindTemporaryExpr explicitly while rebuilding these initializers, rebind transformed subexpressions with MaybeBindToTemporary, and remember whether the rebuilt initializer still needs non-lifetime-extended cleanups. After discarding the cleanups collected for lifetime extension, restore the ExprWithCleanups marker only when such a rebuilt temporary remains.
When MaybeBindToTemporary references an implicit destructor and Sema has synthesized its body, pass that declaration to the AST consumer because there may be no later top-level definition point for DMI-local closure types. Add a CodeGenCXX regression test for a lambda init-capture in a default member initializer.
Assisted By: OpenAI Codex
[flang][OpenACC] support collapse on unstructured acc.loop (#196174)
PR #164992 added unstructured-loop support to OpenACC lowering (no
bounds on acc.loop, IVs privatized, body emitted as explicit cf), but it
didn't covered the `collapse(N)` case. Compiling
```
!$acc parallel loop collapse(2)
do j = 1, n
do i = 1, n
if (i == jdiag) then
a(i,j) = 0.0d0
cycle
end if
a(i,j) = real(i + j, 8)
end do
end do
```
asserted in MLIR's runRegionDCE: "Assertion `mightHaveTerminator()'
failed".
[14 lines not shown]
clang: Consolidate -aux-triple handling (#196551)
All of the offload languages were essentially doing the
same thing, with overcomplicated conditions conditional on
the language.