RuntimeLibcalls: Add signatures for the divrem libcalls
Add struct types to the signature table so libcalls returning multiple
values can be described in TableGen. Use them for the ARM, Windows and
AVR divmod functions, which return the quotient and remainder in
registers, instead of building their types in C++.
The other divrem libcalls use the compiler-rt prototype, which stores
the remainder through a pointer. AVR gets its own __divmodsi4 and
__udivmodsi4, since ARM Darwin uses the compiler-rt functions with
those names.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[CIR] Add dead_on_return for destructors (#235125)
This change adds the dead_on_return attribute for the `this` argument to
destructors unless `-fno-lifetime-dse` was used.
Assisted-by: Cursor / claude-opus-5.5
[LLVM][docs] Rewrite llvm rst docs to md [2/2] (#234567)
Tracking issue:
[#201242](https://github.com/llvm/llvm-project/issues/201242)
See the [migration
guide](https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines)
for more information.
this is the second part of migrating the remaining llvm rst docs to md.
the content conversion is provided by this pr, following the rename in
the previous pr.
this was prepared with rnk's fork of rst2myst and LLM-assisted cleanup.
i manually verified that the documentation renders as expected.
Depends on #234561
the first commit is from the base pr (rename), the second commit
[4 lines not shown]
[new-prs-labeler] Add labels for LV, LAA, SCEV (#228086)
Rename vectorizers to llvm:vectorizer, and create a llvm:loopvectorize
as a refinement. Also add llvm:{loopaccessanalysis,scalarevolution}.
Fixes #228041.
Fixes #228064.
The infra area team created / renamed the teams.
[CIR] Implement 'asm label' lowering. (#238509)
This ends up being a horrifically trivial implementation: it just
changes the name of the static local to use the 'mangled name' (which
pays attention to the attribute) rather than just the static decl
name. This patch implements that and adds some trivial tests to show the
behavior.
Attributor: Invalidate analyses when attributor-light only changes attributes (#231397)
attributor-light only invalidated analyses for functions whose IR it
rewrote, but declared all function analyses preserved. Attribute changes
were not tracked, so e.g. a caller's MemorySSA could go stale after the
callee became readnone. Also invalidate functions whose attributes or
call site attributes changed, and their callers, like FunctionAttrs.
Keep the marker which stops the function simplification pipeline from
running again on CGSCC revisits, since attribute changes alone do not
need re-simplification. Without this, already simplified functions were
simplified again, making attributor-light much more expensive.
No compile time or output change on CTMark.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Handle int and long size more similarly (#238181)
Previously we eagerly computed the int size and passed it through all
the various functions to get the type signature. The long cases were
evaluated in the context that need a long. Treat these the same way
which reduces the number of arguments passed around.
[TableGen] Support emitting preprocessed output (#120113)
Implement `llvm-tblgen -E` to preprocess the input files, generating a
single output file which can be fed back into TableGen.
[SPIRV] Forward-reference debug scopes with a reserved result id. (#229490)
This PR brings support for cycles when processing DIScope(s). This is
done using `SPV_KHR_relaxed_extended_instruction` for
`OpExtInstWithForwardRefsKHR`, which permits forward references (a use
prior to its definition).
The new emission algorithm works in the following way. DIScopes are
recursively processed as it was implemented at the start of these
stacked PRs. `getOrCreateDebugScope` reserves an id for the current
scope, and recurses to first emit its dependencies. If in the recursion
we hit a back edge (cycle), the scope even though not emitted yet will
have a reserved id. That undefined but reserved id is then used as an
operand alongside `OpExtInstWithForwardRefsKHR`.
When an instruction defining a DIScope is going to be emitted,
`getOrCreateDebugScope` makes sure that the scope's instruction uses its
reserved id. If the current scope is not supported by the backend, it
might be the case that the scope was still used as a forward reference.
[23 lines not shown]
Attributor: Only reanalyze functions that may gain call graph references
Reanalyzing the function of every replaced use could remove a call graph
edge before another function added the same reference, failing the trivial
edge assertion with EXPENSIVE_CHECKS in cgscc-new-ref-edge.ll. Only
reanalyze the user's function if the new value may reference a function.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
[Flang][OpenMP][NFC] Remove some no longer used functions (#238036)
Forgot to remove these in prior pass that removed the user, now they
have no uses so no longer required.
[AMDGPU][NFC] Clean up pre-gfx125x test RUN lines (#238107)
Drop flags that match defaults: `-verify-machineinstrs` in `.ll` tests,
`-global-isel=0` in tests without a GlobalISel run, and redundant
`-global-isel-abort`.
Use subarch triples instead of amdgcn plus `-mcpu`.
Error-only MC runs use `-filetype=null`.
SystemZ: Lower sub-word atomicrmw during type legalization
Produce the ATOMIC_LOADW_* nodes when replacing the illegal i8/i16
results, instead of custom lowering the promoted node later. This
removes the no-op custom type legalization case.
Constants are now any-extended, so one test materializes an immediate
with llill instead of lhi.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>
RuntimeLibcalls: Add signatures for floating point comparison libcalls
The three-way and unordered comparisons return libgcc_cmp_return. This
is the word size with a few exceptions.
Co-authored-by: Claude Opus 5.5 <noreply at anthropic.com>