[flang][debug] Place prologue_end on the first executable statement (#232025)
Consider this program:
subroutine sub(a, n)
integer :: n
integer :: a(n)
a(1) = 1
end subroutine
program main
integer :: a(5)
a = 7
call sub(a, 5)
end program
A breakpoint on 'sub' stops on the declaration of 'a', before the code
that computes its bounds has run. The variable is not merely described
with the wrong extent there, it cannot be read at all:
[49 lines not shown]
[mlir][arith] Fix integer-to-float comparison canonicalization
Reject conversions that can produce NaN or saturate, and formats
that cannot represent zero or signed inputs. Preserve safe rewrites
when the integer range fits the floating-point exponent range.
Handle unconditional cmpf predicates without reaching an unreachable
case. Add regression coverage for exotic formats and rounding limits.
Validation used existing binaries; no rebuild was performed.
[lldb][test] Don't invoke attach in TestCommandScriptAlias.py (#232709)
The TestCommandScriptAlias.py calls `attach noprocessexistswiththisname`
which will time out when running the test suite against a remote device.
This patch rewrites the test so call `bt` instead and cleans up some of
the related code.
[lldb][test] Don't invoke attach in TestProgressReporting.py (#232722)
Trying to attach to a process that doesn't exist hangs in a remote test
setup. This patch changes so we just call `Attach` with an invalid
`SBAttachInfo` which triggers the same event and should immediately
return.
[Clang][NFC] Re-enable alias-template lambda constraint test (#233203)
The T16 example in
`clang/test/SemaTemplate/alias-template-with-lambdas.cpp` was left under
`#if 0` in b412ec5d3924. That example no longer crashes, and the
static_assert passes without extra diagnostics.
Remove the FIXME and compile the example.
No compiler behavior changes.
Verified with an assertions `clang -cc1 -std=c++2c -fsyntax-only
-verify` on the patched file. The same example also passes on an
assertions build of 34ba34d7f9bd, which does not include the local
branch commits.
Assisted by Codex
[SimpleLoopUnswitch] Form dedicated exits for after trivial unswitch. (#233310)
When unswitching a trivial branch whose exit block has other
predecessors,
the exit block is split and the new edge from the old preheader goes to
the
split-off block, which is also reached from the original exit block.
This can leave loop exit blocks with predecessors outside the loop,
breaking loop-simplify form, which in turns prevents outer loop
optimizations in the loop, e.g. missed extra unswitching.
Enables additional unswitching in a few more cases:
https://github.com/dtcxzyw/llvm-opt-benchmark-nightly/pull/1747
PR: https://github.com/llvm/llvm-project/pull/233310
lang/swift6: add powerpc64le support
Two bootstrap tarballs are needed because the long double ABI changed in
16.0: freebsd14 works on 14.x and on 15.x with misc/compat14x, freebsd16 is
for 16.0 and newer. Both were built with the port's own BOOTSTRAP_MODE.
PR: 299357
Approved by: tagattie (maintainer)
Mk/Uses/fpc.mk: use powerpc64 as FPC_ARCH on powerpc64le
fpc doesn't have a separate powerpc64le CPU, it's powerpc64 for both
endians. lang/fpc-devel already handles it, but ports using USES=fpc got
rtl/freebsd/powerpc64le and failed to patch.
www/py-bokeh: Update 2.4.3 => 3.10.1
bokeh 2.4.3 uses np.bool8, which numpy 2 removed, so
"import bokeh.plotting" fails with the numpy 2.4 in the tree. It is
also too old for its consumers: dask[diagnostics] and the distributed
dashboard need bokeh>=3.1, arviz-plots needs bokeh>=3.4 and hits needs
bokeh>=3.2.
- Switch to PEP 517; the sdist ships the prebuilt BokehJS, so no node
is needed
- Add RUN_DEPENDS on narwhals and xyzservices; drop python-dateutil,
six and typing-extensions; tornado>=6.2
- Patch pyproject.toml for setuptools 63 (requires, PEP 639 license)
and do not install the stray top-level "typings" stub package
- Guard the setuptools>=64-only editable_wheel import in setup.py
- Requires Python 3.12+
Changelog: https://docs.bokeh.org/en/latest/docs/releases.html
lang/nim: fix on powerpc64
countProcessors() reads the 4-byte hw.ncpu into an 8-byte int, which puts
it in the high word on big-endian, so any nim c without --parallelBuild
tried to size its build state for 2^38 CPUs and got OOM-killed. That is
also why DOCS was turned off on powerpc64 in 2020, so enable it again.
Also take the upstream fix for the shr constant folding on big-endian and
apply it to the pre-generated bootstrap compiler too.
[mlir][spirv] Fix control of nested sibling constructs in the deserializer (#225920)
When the deserializer structurizes an outer loop or selection,
updateMergeInfo re-keys the blockMergeInfo entries of the nested
constructs from the old blocks to the cloned ones. It erases the old
entry first and then reads it->second.control through the erased
iterator. blockMergeInfo is a MapVector, so the erase shifts the next
entry into that slot and the nested construct is re-created with its
sibling's control.
With two sibling loops inside an outer loop, the first one marked
DontUnroll and the second Unroll, the round trip comes back with both
marked Unroll. Same thing for two sibling selections with Flatten and
DontFlatten. If the erased entry was the last one the read is past the
end of the vector.
Copy the control value out of the entry before erasing it, like loc
already is. Adds round-trip tests with two sibling loops and two sibling
selections.
Fixes #218853
nodejs: updated to 26.12.0
26.12.0 (Current)
Notable Changes
- (SEMVER-MINOR) doc,lib,src: throw on missing WebAssembly or RX support (Paolo Insogna)
- (SEMVER-MINOR) http: add websocketMask() and websocketUnmask() (James M Snell)
textproc/redisearch2: fix build on powerpc64*
VectorSimilarity falls back to the x86 cpu_features types on anything that
isn't aarch64. Add a generic fallback for everything else.
multimedia/vvenc: fix build on powerpc64
clang 19 crashes on v4f32 froundeven in the SIMDe x86 emulation
(llvm/llvm-project#121390), so turn the x86 SIMD code off here too.
net/dot1ag-utils: fix build on powerpc64
IS_TAGGED() compared one byte of the frame with htons(0x8100), which only
works on little-endian by accident and makes clang's -Werror unhappy on
big-endian. Read the TPID through struct cfmencap instead.
[DWARFVerifier] Report subprogram DIEs that can't be identified (#231249)
DWARF doesn't require any attribute on DW_TAG_subprogram, but a consumer
can only use a subprogram DIE through its name, a reference to another
entry (DW_AT_abstract_origin or DW_AT_specification), or the code it
describes. A subprogram DIE with none of these can't be looked up by
name or mapped to an address, and neither can the entities it contains
(e.g. gdb skips bare DW_TAG_subprograms, including all thier children).
LLVM used to emit such DIEs as a side effect of misplacing
function-local entities (types, static variables, imported entities)
of subprograms that have an abstract instance. The entities ended up
in an attribute-less DW_TAG_subprogram created just to hold them.
This patch adds two checks to `llvm-dwarfdump --verify`:
* An error if a subprogram has no attributes at all (DW_AT_sibling is
not counted).
* A warning if it has no name (DW_AT_name or a linkage name), no
DW_AT_abstract_origin or DW_AT_specification, and no address
(DW_AT_low_pc, DW_AT_ranges or DW_AT_entry_pc). This is only a
warning, as such a DIE is still valid DWARF.
[sancov][NFC] Reuse one symbolizer when reporting coverage (#232695)
This PR solves some memory issues I encountered while using `sancov
-symbolize`.
`sancov -symbolize` built two `LLVMSymbolizer`s, one for the covered
addresses and another for every instrumentation point. Both kept the
parsed debug info, so the two copies were live at the same time.
`getCoveragePoints()` now takes the symbolizer that `symbolize()`
already created. The file mapping used to hash the binary is released
before symbolizing. The `.symcov` report is unchanged.
These are the improvements measured on an instrumented `llc` with
SanitizerCoverage (743 MiB, 1.5M instrumentation points), three runs
each.
| | Peak RSS | Time |
|---|---|---|
| Before | 11.73 GiB | 33.0–33.2 s |
| After | 6.42–6.43 GiB | 27.9–28.2 s |
[InstCombine] Canonicalize atomicrmw sub of a constant to add
Rewrite `atomicrmw sub ptr, C` as `atomicrmw add ptr, -C`. This
matches the canonical form InstCombine already uses for plain `sub`.
In wrapping arithmetic $old - C = old + (-C)$, so both the stored
value and the returned old value stay the same, including when C is
`INT_MIN`. Ordering, syncscope and metadata are kept.
```llvm
; before
%old = atomicrmw sub ptr %p, i32 1 syncscope("agent") monotonic
; after
%old = atomicrmw add ptr %p, i32 -1 syncscope("agent") monotonic
```
This benefits AMDGPU, for example: https://godbolt.org/z/39xsYro3o