[ORC] Fix examples after 6dbf9d1ac5e (forward declaration of MemoryAc… (#191834)
…cess).
6dbf9d1ac5e forward declared the MemoryAccess class in
ExecutorProcessControl.h, breaking some examples that were depending on
the transitive include. (See e.g.
https://lab.llvm.org/buildbot/#/builders/80/builds/21875).
This commit adds the missing #includes to the broken examples.
[LifetimeSafety] Suggest/infer annotation in constructors (#191699)
This change improves the lifetime safety checker to detect when
constructor parameters escape to class fields and suggest appropriate
`[[clang::lifetimebound]]` annotations.
```cpp
struct A {
View v;
A(const MyObj& obj) : v(obj) {} // Now suggests [[clang::lifetimebound]]
};
```
[flang][OpenMP] Implement GetGeneratedNestDepthWithReason (#191718)
For a loop-nest-generating construct this function returns the number of
loops in the generated loop nest.
A loop-nest-transformation construct can be thought of as replacing N
nested loops with K nested loops, where
N = GetAffectedNestDepthWithReason
K = GetGeneratedNestDepthWithReason
[ORC] Add MachOPlatform::HeaderOptions customization callback. (#191819)
This change aims to make it easier for MachOPlatform clients to
customize JITDylib MachO headers.
At MachOPlatform construction time clients can now supply a
MachOPlatform::HeaderOptionsBuilder. The supplied callback will be
called by setupJITDylib to create the HeaderOptions for the JITDylib
being set up.
No testcase: Constructing a MachOPlatform instance requires the ORC
runtime, which we can't require for LLVM unit or regression suite tests.
We should look at testing this functionality in the new ORC runtime once
it's ready.
[libc] add posix_mutex_trylock support (#191531)
Expose existing trylock internal operation to posix interface.
POSIX.1-2024 only specifies the `EBUSY` error case.
Assisted-by: Codex with gpt-5.4 default fast
[NFC] Replace `expectedToStdOptional` with `expectedToOptional` (#191359)
Both implementations are currently equivalent. This is likely a leftover
from the past, when `llvm::Optional` existed.
[lldb] Fix lldb-server host and port address parsing (#191414)
This patch fixes 2 problems in lldb-server argument parser:
1. Let's try to start lldb-server with incorrect arguments
```
./lldb-server platform --listen *:1111--server
```
Current behavior
* lldb-server run in gdbserver mode with port 1111
Expected behavior
* fail, as `1111–server` is not a number
2. And try to start lldb-server with host:port specification without
colon
```
./lldb-server gdbserver 1111 ./test
[29 lines not shown]
[RISCV] Expand vp.fma, fp.fmuladd, vp.fneg, vp.fpext (#190589)
Part of the work to remove trivial VP intrinsics from the RISC-V
backend, see
https://discourse.llvm.org/t/rfc-remove-codegen-support-for-trivial-vp-intrinsics-in-the-risc-v-backend/87999
This PR expands four intrinsics before codegen, but doesn't remove the
codegen handling yet as both DAGCombiner and type legalization can
create these nodes.
vp.fneg and vp.fpext are expanded in lockstep with the fma/fmuladd
intrinsics since some test cases for vfmacc etc. also use these
intrinsics, and mixing dynamic and constant vls causes some of the more
complex patterns to be missed.
The fixed-length VP vfmacc, vfmsac, vfnmacc and vfnmsac tests also need
to replace the EVL of the vp.merge/vp.select with an immediate otherwise
the resulting vmerge.vvm can't be folded into them. This only happens
for fixed vector intrinsics with no passthru, since we end up with a
[5 lines not shown]
[GVN] use `AssertingVH` for leaders to improve compilation time (#175870)
Replace the manual check in `verifyRemoved()` with `AssertingVH`
instrumentation. For cases where the leader table becomes very large,
this is a cheaper way to verify we don't have dangling entries in the
leader table.
For this change, we must implement a move constructor for `AssertingVH`
so that we can keep the first entry as an inline-allocated node that
will be handled correctly as the table grows.