[lldb] Thread DWARFExpression::Evaluate state through an EvalContext (NFCI) (#195220)
Collect the inputs, derived pointers, and mutable evaluation state of
DWARFExpression::Evaluate into a file-local EvalContext struct passed by
reference to the static helpers.
Two incidental fixes making this not-quite NFC:
1. Evaluate_DW_OP_deref_size renamed to Evaluate_DW_OP_deref and takes
the LocationAtom, so error messages name the actual opcode.
2. ResolveLoadAddress no longer crashes on null exe_ctx (uses
eval_ctx.target, which is null-safe).
I initially prototyped a visitor-like design, centered around a
DWARFEvaluator class with one method per opcode and shared state as
members. I discarded it because moving the simple operations out of the
switch hurt readability and increased mental overhead. Its only real
benefit were the cleaner signatures, which this patch achives by using
the new EvalContext.
workflows/release-tasks: Use app generated token for creating the release (#195219)
We are trying to move a way from using secrets associated with the
llvmbot account, so this drops another one of its users.
[lldb][debugserver] Don't duplicate loaded binaries in jStopInfo (#195343)
RNBRemote::GetJSONThreadsInfo() has a bool mode switch: Only
exception-related information information about threads which had an
exception, or full information about all threads. The exception-related
information is what ends up in the `jstopinfo` key in the stop packet,
asciihex encoded. The full information is what is sent for the
`jThreadsInfo` packet, with full information for all threads at a public
stop.
When I added the `added-binaries` and `detailed-binaries-info` keys to
the thread description, I incorrectly put this in the exception related
block of this method. Move that in to the "full information" section of
the method, so we don't duplicate the information that is included in
the stop packet, asciihex encoded at that.
rdar://176001611
[NFC][HLSL] Remove dead branch for const return by value (#194983)
Remove unreachable addConst() on the by-value return path of
addHandleAccessFunction.
No caller passes IsConstReturn=true with IsRef=false. The existing AST
tests ( StructuredBuffers-AST.hlsl, ByteAddressBuffers-AST.hlsl,
TypedBuffers-AST.hlsl) already assert the by-value Load return type is
non-const, so behavior is verified unchanged.
Assisted by: Github Copilot
Fixes https://github.com/llvm/llvm-project/issues/194982
Fix test's FileCheck match to allow a column number in message. (#195356)
In some cases, the cfi diagnostic is emitted with a column
number. Allow that in the test.
[dsymutil] Make --linker explicit in every test (#195293)
Pass `--linker classic` or `--linker parallel` on every `dsymutil`
invocation instead of relying on the implicit default. This preserves
the existing coverage in preparation for toggling the default in the
future.
Tests previously exercising only one linker now mirror the RUN block for
the other, sharing FileCheck prefixes. Not all tests are compatible, and
I've added a FIXME to make them easy to spot.
clang: Stop using replace_extension when there's no extension (#195335)
The offload case is building a fresh filepath and there's no file
extension to replace. Just directly append the file extension to avoid
clobbering part of the path name if the triple contains a period.
Avoids confusing test updates in future triple patch.
[flang][OpenMP] Support loop-associated metadirective variants (part 3)
Enable metadirective lowering for loop-associated variants such as
`do`, `simd`, `parallel do`, and `do simd`.
When a metadirective resolves to a loop-associated directive, the
sibling DO evaluation is spliced into the metadirective's evaluation
list so existing loop lowering finds it. Loop IV data-sharing
attributes are marked at lowering time since semantic analysis cannot
know which variant will be selected. The DataSharingProcessor is also
extended to handle spliced evaluations.
This patch is part of the feature work for #188820 and stacked on top
of #194424.
Assisted with copilot and GPT-5.4
[llubi][NFC] Fix build with old GCC (#195327)
Using old GCC (7.5 in this case), we get a compile error about not being
able to deduce the template paramerter:
```
/llvm/llvm/tools/llubi/lib/Interpreter.cpp:770:14: error: no viable constructor or deduction guide for deduction of template arguments of 'std::vector'
770 | return std::vector(Vec.begin() + Offset, Vec.begin() + Offset + DstSize);
```
The error was introduced in
https://github.com/llvm/llvm-project/pull/194345.
Just specify the element type.
---------
Signed-off-by: Nick Sarnie <nick.sarnie at intel.com>
[flang][OpenMP] Support loop-associated metadirective variants
Enable metadirective lowering for loop-associated variants such as
`do`, `simd`, `parallel do`, and `do simd`.
When a metadirective resolves to a loop-associated directive, the
sibling DO evaluation is spliced into the metadirective's evaluation
list so existing loop lowering finds it. Loop IV data-sharing
attributes are marked at lowering time since semantic analysis cannot
know which variant will be selected.
The DataSharingProcessor is extended to handle spliced evaluations:
the symbol visitor walks nested parse trees, symbol collection
includes nested evaluations, scope resolution walks ancestor scopes,
and lastprivate copy-back handles symbols without HostAssocDetails.
Not yet supported:
- Target constructs selected by metadirective (requires host-eval)
[libc] Implement sys/personality.h (#195065)
Added the personality() syscall wrapper, which sets or queries the
process execution domain. The function signature follows the Linux man
page: int personality(unsigned long persona).
New files:
* libc/include/sys/personality.{yaml,h.def}
* libc/src/sys/personality/ (implementation + linux/ syscall)
* libc/test/src/sys/personality/ (unit tests)
Registered the entrypoint and header for x86_64, aarch64, riscv, and
arm. The implementation includes <linux/personality.h> for the
kernel-defined constants (PER_LINUX, ADDR_NO_RANDOMIZE, etc.) following
the same pattern as sys/prctl.h.
[AMDGPU] Optimize DPP for fmin/fmax functions (#195282)
Summary:
These functions currently don't simplify in the optimistic (no-NaN) case
as their identity is not recognized by the optimizer. This PR simply
adds the -inf,+inf checks so these combine without the intermediate
moves.
Fix dynamic metadirective candidate selection
- Use one scored candidate path for static and dynamic metadirective variants.
- Dynamic user conditions are statically filtered and scored using their
non-user traits, then guarded at runtime with fir.if.
- Keeps construct/device/implementation traits enforced for dynamic
candidates and lets higher-scored static candidates beat lower-scored dynamic
candidates.
- Add regressions for construct mismatch, score ordering, and
implicit-nothing tie-breaking.
[clang-format] Fix nested parsing of AlignAfterOpenBracket (#192283)
When parsing AlignAfterOpenBracket a default backward compatibility
option is always used even if an inherited style option was set. Avoid
using the default setting unless one of the backward compatible enum
type options is found.
Fixes #183845
Fixes #190758
[flang][OpenMP] Support lowering of metadirective (part 2)
Lower non-constant user={condition(expr)} selectors in metadirectives
to a fir.if/else chain.
Only statically applicable when-clauses participate in dynamic
selection. Dynamic conditions are evaluated at runtime in declaration
order, with the best static match, an explicit otherwise/default
clause, or implicit nothing as the final fallback.
This patch is part of the feature work for #188820.
Assisted with copilot and GPT-5.4
[scudo] Add append overloads for integers and bool
This patch adds overloads for append to support directly appending s32,
s64, u32, u64, and bool values without requiring format strings. This
simplifies usage and avoids the overhead of parsing format strings for
simple type appends.
[flang][OpenMP] Change NONTEMPORAL clause to contain OmpObjectList
NONTEMPORAL in source code takes a variable list, which is represented
in the AST as OmpObjectList.
clang: Stop using replace_extension when there's no extension
The offload case is building a fresh filepath and there's no file
extension to replace. Just directly append the file extension to avoid
clobbering part of the path name if the triple contains a period.
Avoids confusing test updates in future triple patch.
Revert "[Clang] Emit LLVM flatten attribute instead of per-callsite alwaysinline (#188615)" (#195314)
Reverts #188615 due to #195236 — Linux kernel build with LTO hangs.
[AMDGPU][NFC] Update join/signal ordering in named barrier tests (#195316)
The ISA requires that you join a barrier before signaling it if you're
planning to wait on that barrier. Some IR-level tests have the join and
signal in the wrong order, confusing people.
This PR reorders join and signal.var in order to make correct usage more
obvious going forward.
AI: none
[AMDGPU][SIInsertWaitcnts] Fix iota_range assertion when OtherMarks is empty in mergeAsyncMarks() (#193499)
WaitcntBrackets::mergeAsyncMarks() asserts when merging async wait-count
state at a CFG join point where one predecessor has pending async memory
operations and the other does not.
Problem:
- The existing early-exit only handles the both-empty case
- When OtherMarks is empty but AsyncMarks is not, MergeCount = min(0, N)
= 0
- seq_inclusive<unsigned>(1, 0) fires: "Assertion Begin <= End failed"
Changes:
- Add early return when MergeCount == 0 (OtherMarks is empty)
- When the other predecessor contributed no async marks, our marks are
unchanged and no stricter waits are needed
- Add regression lit test: asyncmark-merge-empty-other.mir