[lldb] Step through inlined code when stepping out of inline frame N > 0 (#226910)
To step out of an inline frame N > 0, ThreadPlanStepOut first steps out
to frame N, then queues a plan that steps through the inlined block. Due
to a bug, ShouldStop marks the plan complete right after it queues that
plan, so the thread stops as soon as it reaches frame N, with no stop
reason.
In fact, the comment next to that code describes the intended behavior
while implementing something different: only call the StepOut plan done
if the "step out from line" plan cannot be queued.
For example, consider this backtrace:
```
frame #0: 0x00000001000003c0 deep`sink(x=81) at deep.c:4:6 [opt]
frame #1: 0x0000000100000418 deep`level3(a=48) at deep.c:11:3 [opt] [inlined]
frame #2: 0x0000000100000404 deep`level2(b=37) at deep.c:20:3 [opt] [inlined]
frame #3: 0x00000001000003f0 deep`level1(c=42) at deep.c:28:3 [opt] [inlined]
frame #4: 0x00000001000003dc deep`main at deep.c:33:3 [opt]
[8 lines not shown]
[RISCV] Eliminate redundant materializations after register comparison (#227673)
`RISCVRedundantCopyElimination` can eliminate redundant immediate
materializations when a branch establishes a known immediate value, but
does not handle register-register `BEQ`/`BNE` when one operand is a
non-zero immediate materialized in a register.
Extend the pass to recognize `ADDI` from `X0` and `QC_LI`
materializations before the branch. On the equality edge, reuse that
known immediate so an identical materialization in the successor can be
removed. `X0` is excluded as a target register because writes to it are
discarded.
Tests cover `BEQ`/`BNE`, both operand orders, clobbers, `X0`, RV32/RV64,
and the relevant Xqci and XAndes variants.
AI tool usage: OpenAI Codex assisted with this contribution. I reviewed
and take responsibility for the final changes.
Assisted-by: OpenAI Codex
PR misc/60836 - Be more careful with /etc/ifconfig.* cloner configs
Only config cloner interfaces when an /etc/ifconfig.${cloner}N file
exists, if N is completely numeric.
[clang-repl] Evaluate a void expression that has no trailing semicolon (#228334)
An expression statement without a semicolon at the end of an input is
replaced by a call to `__clang_Interpreter_SetValueNoAlloc` that
captures its value. For an expression of type `void`, the expression was
not an argument of that call and was dropped, so `f()` did not call `f`.
Build `(E, __clang_Interpreter_SetValueNoAlloc(...))` instead.
Fixes #219800.
Assisted-by: Claude Opus 5.5
[orc-rt] Use the Error matchers in SimpleNativeMemoryMapTest (#228335)
Use the Error matchers introduced in 4c8a437d0487 to clean up error
checks in SimpleNativeMemoryMapTest.
Revert "[ORC] Use __unw_add_dynamic_eh_frame_section/__unw_remove_dyn… (#227894)
…amic_eh_ frame_section in RegisterEHFrames.cpp (#212260)"
Revert commit d49626c811c304c047e028a80cedc0d377f49dfb due to link
failures on some platforms (see discussion in PR).
[AMDGPU] Add getCmpSelInstrCost override to re-enable SimplifyCFG speculation for vector types (#208043)
Commit ["[CostModel] Handle all cost kinds in
getCmpSelInstrCost"](https://github.com/llvm/llvm-project/commit/0967957d7a94e1b5c749c6e963bdca25f3c6d749)
changed the base cost model to consider the type in the costs for
non-throughput cost kinds. This caused SimplifyCFG to stop folding
branches to selects on AMDGPU, since
vector selects now report higher costs that exceed the folding
threshold.
Add an getCmpSelInstrCost override for AMDGPU to partially restore the
old behavior by returning a constant unit cost for cost kind
`TCK_SizeAndLatency`. This affects speculative execution in SimplifyCFG
and SpeculativeExecution.
[orc-rt] Add VettedPeer, require it for the socket transport (#228336)
The controller at the other end of a channel can make the executor run
arbitrary code, so attaching to it is a trust decision.
VettedPeer<ChannelT> makes that decision explicit: it can only be made
through one of three named factories -- inherited, checked or unchecked
-- each naming the reason the peer is trusted.
createSimpleRemoteCAOverSocket now takes a VettedPeer<SocketHandle>
rather than a bare SocketHandle.
VettedPeer neither verifies nor records the reason. The factories exist
so that the decision can't be skipped by omission, and so that every
choice is visible in the source.
The socket:adopt connector trusts its socket as inherited, and documents
the resulting precondition on its callers.
Assisted-by: Claude
[Fuchsia] Escape ';' in STAGE2_ CMake variables (#228272)
When forwarding STAGE2_* variables to EXTRA_ARGS in Fuchsia.cmake and
Fuchsia-stage2-instrumented.cmake, semicolons in list values must be
replaced with '|' to match the LIST_SEPARATOR of ExternalProject_Add.
In 70cf616b331c, 'list(APPEND EXTRA_ARGS "-D${variableName}=...")' was
added using the raw '${${variableName}}' before replacing ';' with '|',
and Fuchsia-stage2-instrumented.cmake similarly omitted the ';' to '|'
replacement.
When a list variable like STAGE2_CROSS_TOOLCHAIN_FLAGS_NATIVE contains
semicolon-separated '-D...' flags (such as CMAKE_EXE_LINKER_FLAGS),
appending it without escaping splits it into separate top-level CMake
arguments for stage2. Because STAGE2_CROSS_TOOLCHAIN_FLAGS_NATIVE sorts
alphabetically after STAGE2_CMAKE_*_LINKER_FLAGS, its split flags
overwrite the stage2 linker flags with the stage0 toolchain's libc++.a,
causing stage2 link failures on macOS.
devel/cbang: databases/postgresql-plv8js: Chase v8 upgrade
V8 15.4 headers refuse to compile ("Non-CppGC MicrotaskQueue definition
is not supported") unless the embedder defines V8_CPPGC_MICROTASK_QUEUE,
matching how lang/v8 itself is built.
databases/postgresql-plv8js: pass the define in CXXFLAGS.
devel/cbang: define it in the v8 scons config before the v8.h header
check, which otherwise fails and silently disables V8 support, breaking
packaging. Also record it in cbang/config.h for consumers.
lang/v8: update to 15.4.80.20 (Chrome 154 stable)
- Update to 15.4.80.20 (Chrome 154.0.8037.97 stable pin)
- Update sub-dependency revisions from DEPS
- Add patch-.gn: use python3 from PATH instead of the hermetic
CPython CIPD package, which is not fetched; this also avoids a
host_cpu reference unsupported by devel/gn in the dotfile
- Add USES=llvm:min=20,build for proper LLVM toolchain selection
- Add 3 new sub-dependencies: cpu_features (chromium wrapper),
disarm, fadec
- Add ObtainCurrentThreadStackReservedLimit() for FreeBSD
- Remove upstreamed wasm-shuffle-reducer.cc patch
- Remove libcppgc.so and libthird_party_protobuf_protobuf_lite.so
(merged/removed upstream)
- Remove stale v8_use_libm_trig_functions GN arg (removed upstream)
- Specify explicit ALL_TARGET to avoid building test targets
- Regenerate all patches for new version
- Use USES=elfctl to mark d8, v8_shell, mksnapshot and mkgrokdump
as wxneeded: V8's JIT maps its code range read+write+execute and
[8 lines not shown]
[llvm-profdata] Propagate Error in loadInput and mergeWriterContexts (#228158)
[llvm-profdata] Propagate Error in loadInput and mergeWriterContexts
Propagate Error from loadInput and mergeWriterContexts in
mergeInstrProfile,
supplementInstrProfile, and overlapInstrProfile. In mergeInstrProfile's
ThreadPool, catch errors from worker threads, stop scheduling new jobs,
and return the first encountered fatal error.
Ensure ~WriterContext() consumes any pending unhandled errors in
WriterContext::Errors upon destruction.
Not NFC as destructors are run on the stack and ThreadPool workers exit
earlier on error.
With all subcommands propagating llvm::Error to main, exitWithError,
exitWithErrorCode, and the LSan leak suppression workaround are no
longer needed.
Assisted-by: Gemini
[SandboxVec][LoadStoreVec] Support constant vectors of mixed types
createConstantVector() previously packed the constant store operands
as-is, which only worked when every store had the same element type.
Take the lane type from VecUtils::getCombinedVectorTypeFor() instead and
reinterpret each constant's bits as that type, going through an integer
of matching width via ptrtoint/inttoptr/bitcast. Constants wider than a
lane (e.g. an i64 in an <N x i32>) are split across several lanes in
memory order. Bail out when a constant cannot be reinterpreted, such as
a non-integral pointer or a relocatable address that needs splitting.
Also flatten vector-typed ConstantPointerNull into per-lane nulls, and
bail out on the remaining vector constants such as poison rather than
packing them into the result.
Co-authored-by: Cursor <cursoragent at cursor.com>
[MC] Declare command line options in TableGen (#228321)
Move the cl::opts into MCCLOptions.td, except the -dx-* options, which
the DirectX backend reads and writes. The name avoids MCOptions, a
common variable name for MCTargetOptions.
New OptionsStruct member kinds replace cl:: features the port needs:
* OptionalBoolField, a std::optional<bool>, replaces cl::boolOrDefault
(-use-leb128-directives)
* EnumField replaces cl::values, showing its values as the -help-hidden
metavar
* DefaultOnOffField, an EnumField of std::optional<bool>, replaces the
file-local Default/Enable/Disable enum (-dwarf-extended-loc), which
DwarfDebug.cpp also defines for four options
Aided by Opus 5.5
www/remark42: stop baking REMARK_URL at build time
Since 1.17.0 the server fills the {% REMARK_URL %} placeholder into
the embedded frontend at serve time, using the REMARK_URL it was
started with. The port was still substituting the placeholder with
http://127.0.0.1:8080 before embedding, which left nothing for the
server to fill in, so the widget pointed at an unreachable host
whenever a page omitted remark_config.host.
- Drop the build-time substitution and the REMARK_URL make variable;
remark_url in rc.conf now reaches the frontend as well.
- Document remark_remark_web_root in the rc script.
www/remark42: stop baking REMARK_URL at build time
Since 1.17.0 the server fills the {% REMARK_URL %} placeholder into
the embedded frontend at serve time, using the REMARK_URL it was
started with. The port was still substituting the placeholder with
http://127.0.0.1:8080 before embedding, which left nothing for the
server to fill in, so the widget pointed at an unreachable host
whenever a page omitted remark_config.host.
- Drop the build-time substitution and the REMARK_URL make variable;
remark_url in rc.conf now reaches the frontend as well.
- Document remark_remark_web_root in the rc script.