CodeGen: Pass instruction to LiveRangeEdit::useIsKill
The helper only used the operand to recover its parent instruction. Pass the
containing instruction directly so it no longer depends on the
MachineOperand parent.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
AMDGPU: Avoid querying operand parent in isLegalRegOperand
This is accessible through MachineRegisterInfo and doesn't need to
look at the operand parent chain.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
net/netpeek: Update 0.3.2 => 0.3.3
While here, update features list in pkg-descr and
remove unnecessary args from USES=python.
Changelog:
https://github.com/zingytomato/netpeek/releases/tag/v0.3.3
Reported by: portscout!
Approved by: osa, vvd (Mentors, implicit)
[flang] Allow C style comments in continuation lines (#214336)
With this change, C-style comments in continuation lines are accepted
and treated as space.
This causes some previously-accepted code to be rejected now, such as
`/* c */ &`, which is now equivalent to ` &`, already invalid before.
Known limitation / follow-up: comment-only continuation lines (e.g.
`i&`, `/* c */`, `= 5`) are now accepted with no `-pedantic` warning,
whereas comments with code on the same line still warn. This is
consistent with the long-standing behavior for standalone comment
lines, which have never warned either. A uniform fix in the
comment-line classification path would be good follow-up material,
but is out of scope for this PR.
Fixes #129455
[AMDGPU] getMaxLocalMemSizeWithWaveCount: Align to LDS granularity (#219172)
The AMDGPUSutarget class was recently extended by a
LDSAllocationGranularity field in PR #205637. This was added
to make the occupancy calculation in getOccupancyWithWorkgroupSize
more precise by rounding the LDS allocation size to the allocation
granularity. The getMaxLocalMemSizeWithWaveCount function does
an "inverse" computation, computing available LDS from occupancy.
This should also round to a multiple of the LDS allocation granularity
since otherwise the available LDS may be overestimated. This leads
to incorrect alloca promotions in the AMDGPUPromoteAlloca pass.
Add rounding to getMaxLocalMemSizeWithWaveCount and add a test
demonstrating the impact on AMDGPUPromoteAlloca.
WebAssembly: Take GlobalValue and DebugLoc in GetGlobalAddressSymbol
GetGlobalAddressSymbol only needed the IR GlobalValue from the operand
and the instruction's DebugLoc for a diagnostic. Directly pass these instead
of depending on looking at the MachineOperand's parent to find the instruction
and function.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
PowerPC: Use use_instructions in TLSDynamicCall user collection (#219409)
The loop only collects the using instructions, so iterate
use_instructions() instead of the operands to get their parents.
Co-authored-by: Claude (Claude-Opus-4.8) <noreply at anthropic.com>
[SimplifyCFG] Remove conservative fcmp guard from speculativelyExecuteBB (#211611)
Previously it rejected to perform if conversion when the condition was
an FCmpInst. That guard predated the current cost model which now takes
into consideration target-dependent knobs such as getCmpSelInstrCost()
via validateAndCostRequiredSelects.
Also propagate fast-math flags from the phi to the replacement select
using CreateSelectFMF instead of CreateSelect (which technically works
but I am not sure whether it's intended to be used for both types of
selects).
[SLP]Fix erasing external-use replacements of narrowed reduction leaves
A narrowed reduction leaf that stays a leftover reduction value but is
vectorized as part of the tree has no reduction op user, so its
external-use replacement is swept as a dead operand together with the
tree scalars, and the reduction epilogue reuses the dead value. Keep
the replacements of reduced values without reduction op users.
Fixes https://github.com/llvm/llvm-project/pull/216062#issuecomment-5451142901
Reviewers:
Pull Request: https://github.com/llvm/llvm-project/pull/219460
[Flang] Handle self-referencing KIND selectors (#216668)
EarlyDummyTypeDeclaration may implicitly type a name referenced by a
KIND selector when that name is also declared by the same type
declaration statement. This can lead to an inconsistent semantic state
and a compiler crash.
Return early when the KIND selector refers to an entity being declared
by the same statement.
Add a regression test for this case.
Fixes https://github.com/llvm/llvm-project/issues/209505
Co-authored-by: yixiao <yixiao at hygon.cn>
[Clang] Fix getReturnTypeSourceRange() for trailing return types (#219101)
I'm not quite sure what that 'self-referential' meant and that logic
doesn't seem to make much sense and it doesn't work for trailing return
types.
Fixes #162649
[Flang] Fix IsProcedure() for procedure-valued function references (#216322)
IsProcedure() does not recognize function references whose results are
procedures. This can cause an assertion failure in intrinsic argument
checking when such an expression is passed as an actual argument.
Update IsProcedure() to inspect the result symbol of a ProcedureRef and
determine whether the function result is a procedure.
Add a regression test for procedure-valued function references.
Fixes #209978
Co-authored-by: yixiao <yixiao at hygon.cn>
[clang][OpenMP] Fix thread count upper bound for target directives (#218018)
Fix the UpperBound-computing ternary, which was inverted: std::min is
only reachable when UpperBound is 0, where it is a no-op, so any clause
with a bound to combine simply overwrites it.
Two consequences:
- A clause can raise the bound above a smaller one. 'target teams
distribute parallel for thread_limit(8) num_threads(64)' gets a bound of
64.
- A non-constant clause pins the bound at 0 and discards every constant
clause after it, losing the bound entirely.
Additionally, let a construct split over separate 'target', 'teams' and
worksharing directives find its num_threads clause, so it agrees with
the combined spelling.
Note that the codegen changes in
`clang/test/OpenMP/distribute_parallel_for_num_threads_codegen.cpp` and
[5 lines not shown]
biology/py-pydeseq2: Update to 0.5.4
Drop support for python 3.10
Modernize build system
A few fixes and enhancements
Changes: https://github.com/scverse/PyDESeq2/releases
Reported by: portscout
[Clang] Fix "Unions cannot be dynamic classes" assertion (#217942)
Fixes #213854
An ill-formed qualified member definition like `void B::foo() {}` inside
a union gets diagnosed, but recovery keeps the declaration around: it
belongs to `B` semantically while sitting lexically inside the union.
Since `B::foo` overrides a virtual function, it counted as a virtual
member of the union when it was added to it, so the union was marked
polymorphic and record layout later asserted with `"Unions cannot be
dynamic classes."`. A non-union enclosing class hits the same bug
silently and just gets a bogus vtable pointer.
The fix is in `HandleDeclarator`: once the qualifier is diagnosed as
naming a different class, the declaration is marked invalid, the same
way we already handle `virtual` in a union. Invalid declarations don't
contribute to the properties of the class they're added to, so the class
can't become polymorphic, while the body is still parsed and the node
stays in the AST. As a side effect, the qualified specializations in
[6 lines not shown]
fork(2), vfork(2): Copy the parent's stack base pointer to the child.
Don't just leak whatever random stack pointer some recycled struct
proc had!
TBD: Move p_stackbase in struct proc so this is covered by the memcpy
above, in a separate commit so we can pull this one up without any
change to the layout of struct proc.
PR kern/60653: posix_spawn(3) causes incorrect stack base information