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`.