[LoopFusion] Reject loops containing atomic accesses (#201525)
The fusion legality check relies on DependenceInfo, which models memory
dependences purely by address and does not capture the ordering or
synchronization (synchronizes-with / fence) semantics of atomic
operations. Fusing two loops interleaves their bodies, which can reorder
atomics in ways that violate the memory model even when they touch
different locations.
Mirror the existing volatile handling and invalidate any fusion
candidate whose body contains an atomic access, adding a
ContainsAtomicAccess statistic.
This is conservative: Instruction::isAtomic() is true for unordered and
higher, so even unordered atomics (which carry no cross-thread ordering)
are rejected. This matches the all-or-nothing volatile precedent and
keeps the check simple; it can be narrowed to allow unordered later if
needed.
Fixes #193770.
[GlobalISel] Move G_MEMCPY_INLINE into lowerMemCpyFamily (NFC) (#201570)
Makes refactoring this code so it can be moved into TableGen simpler.
Assisted-by: codex
[CodeGen][MIR] Delete llvm/test/CodeGen/MIR/Generic/scalable-vector-type-err3.mir (NFC) (#201340)
It's bit-identical to
llvm/test/CodeGen/MIR/Generic/scalable-vector-type-err2.mir. Not sure
what the original intention was.
[libc] (Begin to) implement ptrace for linux (#201601)
This function is more complicated than your average syscall wrapper,
which is why this PR is mainly about setting up the infrastructure. I've
made this an experimental entry point, as the only request it handles is
PTRACE_TRACEME.
I also added a test to verify the PTRACE_TRACEME behavior. It's an
integration test as anything ptrace-y requires two processes.
Assisted by Gemini.
[LoopInterchange] Do not interchange guarded imperfect loop nests (#201504)
When the outer-loop header conditionally branches to the outer latch,
that branch guards the inner loop, so the inner loop runs only on a
subset of the outer iterations. Interchanging such a nest moves the
inner loop outside the guard and runs it on every outer iteration,
including the guarded-off ones. That is incorrect when the inner loop
relies on the guard to terminate (e.g. an eq/ne exit whose trip count is
degenerate once the guard is false): the extra runs do not terminate, so
the program hangs at run time. Reject these guarded, imperfect nests in
tightlyNested().
This patch takes conservative approach to fix the crash and keep
upstream sane. In the long term, we need to see permissible cases under
which we can still interchange. I believe this is first good step.
Most importantly, three existing tests
(`currentLimitation.ll`, `loop-interchange-optimization-remarks.ll`,
`lcssa-preheader.ll`) were going through this unsafe transform; **these
[9 lines not shown]
pw: fix const qualification in unquote()
The unquote() function took a const char * parameter but modified the
string in-place (removing quote characters). Change the parameter to
char * and update callers that passed const char * to cast explicitly.
pw: fix uninitialized name pointer in pw_group_del
The 'name' variable could be left uninitialized if neither the
positional argument nor -n is supplied, leading to undefined
behavior when passed to getgroup().
[ORC] Enable EPCGenericDylibManager to use orc_rt::NativeDylibManager. (#201744)
Adds two EPCGenericDylibManager::Create overloads (taking JITDylib& or
ExecutionSession&) that look up implementation addresses by name,
defaulting to orc_rt::NativeDylibManager's SPS controller interface (CI)
symbols. SimpleExecutorDylibManager::addBootstrapSymbols now also vends
its instance, open, and resolve symbols under those names, so the new
Create overloads work against either backend.
Interfaces: Assignments - refactor to MVC for https://github.com/opnsense/core/issues/9945
In order to migrate the interface assignments, we need to think of a way to use the differently named xml nodes for interfaces (wan, lan, ..) into something that closely resembles a standard model implementation.
Since we can't match these nodes in our statically defined model xmls, the main idea is to flush all via an in-memory model with a separate load [construct] and save hook [serializeToConfig].
The next challenge is to "stash" updates and wait for "apply" in certain cases, for this we add a temporary database holding the changes which are synced after the actual system change has happend (pending_action, pending_if). When succesfully applied, the apply function cleans up the final stage of the configuration to make everything consistent again.
This database is a simple single json encoded file named /tmp/.interfaces.todo
Interfaces: Assignments - refactor to MVC for https://github.com/opnsense/core/issues/9945
In order to migrate the interface assignments, we need to think of a way to use the differently named xml nodes for interfaces (wan, lan, ..) into something that closely resembles a standard model implementation.
Since we can't match these nodes in our statically defined model xmls, the main idea is to flush all via an in-memory model with a separate load [construct] and save hook [serializeToConfig].
The next challenge is to "stash" updates and wait for "apply" in certain cases, for this we add a temporary database holding the changes which are synced after the actual system change has happend (pending_action, pending_if). When succesfully applied, the apply function cleans up the final stage of the configuration to make everything consistent again.
This database is a simple single json encoded file named /tmp/.interfaces.todo
Properly set up interrupts in multivec mode if we have multiple msix
vectors but only one queue, making the driver work in uniprocessor
kernels, including RAMDISK.
problem reported by Lexi Winter
ok dlg@
file: normalize .result files to ensure trailing newline on install
Some upstream result files introduced in file 5.47 (e.g., bgcode.result)
lack a trailing newline, causing the contrib_file_tests ATF test to
fail with "cmp: EOF on bgcode.result". Generate normalized copies
of the expected results and install those instead.
MFC after: 3 days
Fixes: e949ce9dc0e6fff26e83904f1008b76d36ba0a37
[DenseMap] Fix ubsan error after #201281 (#201742)
```
/home/b/sanitizer-aarch64-linux-bootstrap-ubsan/build/llvm-project/llvm/include/llvm/ADT/DenseMap.h:492:17: runtime error: null pointer passed as argument 1, which is declared to never be null
```