[Clang] Fix a crash when checking the constraints of a self-referential concept (#208465)
Mark self-referencial concepts as invalid to prevent them from being
evaluated (which would crash).
Fixes #206336
[flang][openacc] make openacc-use-reduction-combine cl switch default (#208473)
Turn the switch on now that is has been tested.
Will remove the switch in a later patch.
Revert "Reapply "runtimes: Pass CMAKE_SYSTEM_NAME based on target triple" (#205133) (#205522)" (#208644)
The change broke the runtimes build for Android; see discussion on the
PR. There are fixes in progress, but let's revert to unbreak the tree
until all those are ready to land.
This reverts commit 00b2f81418233397e601afaeea6d62c47a6c368a and the
follow-up commit 1008b485e4807476c831910cf404a0315f06c788.
[lldb-dap] Log the adapter's stdio during cleanup (#208432)
The adapter may crash for any reason especially if it is built with
sanitizers. Log the adapter's stdout and stderr.
[libc] Assorted improvements to [gs]etitimer (#206974)
This started out as a patch adding a syscall wrapper for the two
functions. It still does that, but along the way I (or rather AI)
discovered an edge case in the truncation of microsecond values, where
we could turn bogus values into seemingly valid ones by throwing away
the high-order bits.
Additionally, when writing a test case, I noticed that the (64-bit)
kernel returns EINVAL for these out-or-range values. Our check returns
EOVERFLOW in this case, so I also change our error code in order to
provide an uniform behavior for the test case.
Neither of these (the check and the EINVAL error code) are present in
glibc (which lets truncated usec values through and returns EOVERFLOW on
second truncation), but I think it's better to be consistent with the
64-bit behavior. The EOVERFLOW error also has no foundation in POSIX
whereas EINVAL is mentioned as an error for invalid microseconds.
[4 lines not shown]
[Clang][OpenMP] Fix `if` clause not affecting `teams` construct on host (#207444)
In #205345, it was discovered that the `if` clause for the `teams`
construct
does not actually create a serial league when the code is built with
Clang.
Looking at the emitted IR, no call to `__kmpc_push_num_teams` was added
for an `if` clause. Hence, `__kmpc_fork_teams` always created the number
of
teams specified via the `num_teams` clause, or the _nteams-var_ ICV.
During `emitCommonOMPTeamsDirective`, only the `num_teams` and
`thread_limit`
clauses were checked, whereas the `if` clause was missing.
To fix the missing code, check for an `if` clause mapped to `teams` or
`unknown`. If the clause is present, and false, emit
`__kmpc_push_num_teams`
with the number of teams set to 1. The `thread_limit` clause is
unaffected.
[21 lines not shown]
[libc++] Rename the macro for the LLVM 18 ABI tag used in ranges (#208464)
We typically use macros like _LIBCPP_ABI_XYZ for ABI settings that can
be configured by the user. Since _LIBCPP_ABI_LLVM18_NO_UNIQUE_ADDRESS is
not one of those, rename it to make it clearer it's an ABI tag
attribute.
As a drive-by remove the definition in the frozen C++03 config header
since it should never be needed (Ranges are not provided in C++03).
[lldb][test] Add a new test for integer types (#208441)
This is a new modern test for integer types that replaces the test logic
from `API/types` test that is about to be deleted.
See also #208402
assisted-by: claude
[VPlan] Remove FoldTail argument for createConsecutiveVecPtr (NFC). (#208550)
The argument is no longer needed now that we can look up the information
directly from VPlan.
[HLSL] Implement RWTexture2D (#208267)
Add HLSL front-end support for RWTexture2D and related test cases.
Where appropriate test cases have been parameterized across the
Texture2D types (and redundant Texture2DArray tests removed).
Assisted by Cursor
Fixes: #194742
---------
Co-authored-by: Tim Corringham <tcorring at amd.com>
[Clang] Switch to Default PIE on FreeBSD
We have started to compile the binary in our base as PIE by defualt. It
makes sense to compile the binary to PIE by default in toolchain as
Linux now. Also, extended testcases to support default PIE and no-pie
parameter in freebsd-pie.c, freebsd-mips-as-pie.c and hip-fpie-option-freebsd.hip.
[AMDGPU] Employ MemorySSA when rewriting out arguments (NFCI) (#207922)
While transitioning away from MemoryDependenceAnalysis, replace MDA
`getPointerDependencyFrom` query with a reverse traversal of the memory
accesses of the return basic block (MemoryDefs and MemoryUses), looking
for the must-aliasing store to the out argument. The existing behaviour
is meant to be preserved.
[lldb] Fix DW_OP_convert type handling (#208435)
This PR fixes #208197
A nonzero DW_OP_convert operand must reference a DW_TAG_base_type DIE.
LLDB previously accepted any DIE that happened to carry base-type-like
size and encoding attributes. This patch rejects non-base-type DIEs
before using them as DW_OP_convert target types.
## Tests
Extended DWARFExpression.DW_OP_convert coverage to verify:
- non-DW_TAG_base_type DIEs are rejected as DW_OP_convert target types;
AMDGPU: Manually convert some tests to use subarches
Manually adjust some edge case tests that require content
changes or splitting to cleanly test different subarches.
This separates out the difficult cases before script driven
bulk migrations.
AMDGPU: Migrate unittests to subarch triples (#206486)
Replace specifying a processor name with the triple
subarch.
The register-limit helpers in AMDGPUUnitTests.cpp that enumerate every
valid CPU via fillValidArchListAMDGCN still pass the CPU explicitly, as
does the MC Disassembler smoke test (its C disassembler API derives the
subtarget from the CPU, not the triple subarch).
Co-authored-by: Claude (Opus 4.8) <noreply at anthropic.com>
[flang][PFT-to-MLIR] Wrap unstructured Fortran constructs in scf.execute_region
Extend the PFT-to-MLIR (HLFIR/FIR) lowering so unstructured DO and IF
constructs are emitted inside scf.execute_region, hiding their multi-block
CFG behind a single op. OpenACC and OpenMP lowerings that reject
multi-block content (e.g. the "unstructured do loop in combined acc
construct" TODO in OpenACC.cpp) now see a structured op instead.
Flag: -mmlir --wrap-unstructured-constructs-in-execute-region (default on).
An evaluation is wrappable iff all of the following hold:
* wrap flag on
* eval is parser::DoConstruct or parser::IfConstruct
* eval.isUnstructured
* branchesAreInternal(eval) -- every controlSuccessor in the subtree
targets a nested eval or the constructExit
* !hasIncomingBranch(eval) -- no outside eval branches into the body
(PFT's synthetic IfConstruct around `if(c) goto X` absorbs label
[29 lines not shown]