[CIR] Compare access ranges of pointers into the same object (#225166)
Two pointers at different offsets into the same object were previously
reported as MayAlias, because whether they overlap depends on how many
bytes each access touches. This change extends the analysis to use the
access size from the pointee type and compare the byte ranges the two
accesses cover. Disjoint ranges don't alias, overlapping ranges
partially alias. Access to different members of a record are now
reported as NoAlias, while a member compared against the record it
belongs to is reported as PartialAlias.
Accesses whose extent isn't statically known, such as those through a
pointer to void, keep the conservative answer.
Assisted-by: Cursor / various models
[CI] Ignore ';' comments in .ll files in undef deprecator (#225509)
Without this patch, UndefGetFormatHelper matches across ';' comment
markers on added lines in .ll files, flagging false positives whenever
the word 'undef' appears in a test comment.
This patch stops matching at ';' on added lines in .ll files so comments
are ignored while uses of undef in IR instructions are still caught.
Assisted-by: Antigravity
[AMDGPU] Avoid repeated parsing in generic classification test
Parse AMDGPU.td once and assert real feature classifications directly. Keep validation of real generic targets and use AMDGPUTargetDefGenericFeatures.td for validation diagnostics.
Addresses the timeout reported on #223179. Local test time drops from 79.59s to 11.28s; both classification and generic feature validation tests pass.
Change-Id: Ic93ed7843d48230cf61c196502b51d7900dc3329
[lldb] Add error logging to DIL (#224763)
This patch also adds a new `EvaluateTree` interface for the Interpreter,
since putting the logging into the existing `Evaluate` would output the
message every time it's called internally.
[BOLT] Don't report an ignored build-id mismatch as an error (#225219)
With `-ignore-build-id`, a build-id mismatch still printed
PERF2BOLT-ERROR: failed to match build-id from perf output. ...
Use -ignore-build-id option to override.
and then carried on normally. Fix the messaging to reduce noise in logs.
[mlir-c] Assert diagnostic severity in CAPI test
Print the diagnostic severity in the test handler and add CHECK lines
asserting Error/Warning/Remark, so the warning/remark tests no longer
pass vacuously. Also add the missing end-of-diagnostic CHECKs.
[AArch64][GISel][FastISel] Fix Windows "sret inreg". (#225190)
5dc8aeb26d2896c65cbea0d3b87f090241444bb6 added a special case to
SelectionDAG ISel for "sret inreg" parameters: they are copied to x0 on
return. There was a review comment suggesting that GISel and FastISel
also needed fixes, but through some mixup the followup never happened.
Fixes #225060
minimize_crash.test sometimes one-shots the minimization (fix flaky test)
After 223470 it is now possible for minimize_crash to one-shot the minimization
by applying the EraseBytes mutation 3 times (to go from size 8=>4=>2=>1).
```
| 35: SUMMARY: libFuzzer: deadly signal
| 36: MS: 3 EraseBytes-EraseBytes-EraseBytes-; base unit: 0000000000000000000000000000000000000000
| 37: 0x2a,
| 38: *
```
rdar://188078094
[libcxx] Enable threads on LLVM-libc (#224436)
Now that LLVM-libc's use of atomics has been fixed in #224162, #224160,
and #224164 this PR removes the carveout for threads in libc++ when
building on LLVM-libc.
Assisted-by: Automated tooling, human reviewed
[lldb] Fix heap-use-after-free in scripted process memory reads (#225472)
The ASan bots hit a use-after-free unwinding the scripted process in
TestScriptedProcess:
```
READ of size 512
#1 DataExtractor::CopyByteOrderedData() DataExtractor.cpp:660
#2 ScriptedProcess::DoReadMemory() ScriptedProcess.cpp:282
#3 Process::ReadMemoryFromInferior() Process.cpp:2453
#4 MemoryCache::Read() Memory.cpp:323
```
AddressableBitsScriptedProcess.read_memory_at_address(), added in 851eb5a97ba6, filled its SBData with SetData(). That overload is non-owning: it builds a DataExtractor that aliases the caller's buffer. The buffer it was handed is a `bytes(size)` temporary, which Python frees as soon as the call returns, so DoReadMemory copies out of a dead allocation. The 512 is the default
target.memory-cache-line-size, not the register width the unwinder asked for.
Use SetDataWithOwnership() instead, as every other scripted process script already does.
Signed-off-by: Med Ismail Bennani <ismail at bennani.ma>
[flang][OpenMP] Add -fopenmp-version flag to several tests (#224934)
The default OpenMP version in flang is 3.1. A number of tests use
features added in later versions. They currently pass because the
version validity is not enforced in many cases. Set the OpenMP version
explicitly to avoid failures when the checks become more strict.
[flang][OpenMP] Annotate some directive and clause names (#225210)
There are some directives that share the same spelling, but have
different functionality. The same is true for clauses. When getting the
upper-case name of such a directive or a clause, optionally (and by
default) add an annotation about the kind of the directive or clause.
For example, a standalone ORDERED directive will be displayed as
"ORDERED (standalone)". This was already done, for this directive, but
not in all cases.
[flang][cuda] Preserve allocator index when splitting host-accessible realloc assigns (#225537)
After #224195, shape-changing assignment to a pinned/managed/unified
allocatable inlined cuf.alloc/cuf.free but rebuilt the descriptor
without
allocator_idx. Implicit DEALLOCATE then used the default allocator and
called libc free() on CUDA storage.
Pass the CUDA allocator index through MutablePropertyWriter so fir.embox
keeps pinned=1, managed=3, and unified=4.