[libclang] Add clang_ModuleCache_pruneWithCallback (#199789)
clang_ModuleCache_pruneWithCallback takes a callback that is invoked for
each PCM that gets pruned. This is to support build systems that would
like to clean up additional data when PCMs are removed from disk.
[docs] Rename 20 key LLVM docs to Markdown
This may break the docs build temporarily, but there will be a follow-up
PR that fixes it immediately after. The rename is being committed first
to aid review and source code archaelogy.
Tracking issue: #201242
[Hexagon] Add optimization remarks to Hexagon IR and MIR passes (#189176)
Add OptimizationRemark/OptimizationRemarkMissed emissions to four
Hexagon-specific passes, making them observable via the standard
-Rpass/-Rpass-missed flags:
- HexagonLoopIdiomRecognition (hexagon-lir): remarks for loop-to-memcpy/
memmove conversions and polynomial multiply recognition, with missed
remarks for non-countable loops, aliasing, non-affine pointers, etc.
- HexagonVectorLoopCarriedReuse (hexagon-vlcr): remarks for reused
loop-carried vector values, with missed remarks for multi-block loops,
non-innermost loops, and missing candidates.
- HexagonVectorCombine (hexagon-vc): remarks for aligned vector memory
operations, with missed remarks for group size limits, unsafe
relocations, and insufficient HVX version.
- HexagonHardwareLoops (hwloops): remarks for hardware loop conversion,
with missed remarks for invalid instructions (calls), multiple exits,
induction variable issues, and non-computable trip counts.
[alpha.webkit.NoDeleteChecker] Treat a r-value smart pointer return value as no-delete. (#200912)
Skip the checkin g of the destructor of T in ExprWithCleanups /
CXXBindTemporaryExpr when returning a value using r-value reference
since such a construct never invokes delete.
---------
Co-authored-by: Balazs Benics <benicsbalazs at gmail.com>
[docs] Rename 20 key LLVM docs to Markdown
This may break the docs build temporarily, but there will be a follow-up
PR that fixes it immediately after. The rename is being committed first
to aid review and source code archaelogy.
Tracking issue: #201242
[flang][cuda] Handle Constant and Shared attributes in CUDA generic matching distance (#201451)
The CUDA generic resolution matching distance function did not handle
actual arguments with the `Constant` or `Shared` data attribute. These
attributes represent device memory but were unhandled, causing the
distance to fall through to infinity. Under `-gpu=mem:unified`, this led
to spurious ambiguity errors when multiple specifics (e.g.
host-to-device and device-to-device overloads) both became candidates
with tied infinite distances.
Treat Constant and Shared actuals the same as Device in the matching
distance table, since all three reside in device memory.
[SelectionDAG] Fold extracts of subvector inserts
Fold extract_subvector(insert_subvector(...)) when the extraction is
outside the inserted subvector or the inserted subvector only amends
the extracted
In particular,
1. vA extract_subvector (vB insert_subvector(vB X, vC Y, C1), C2) =>
vA extract_subvector(X, C2) when [C2, C2 + A) intersect [C1, C1 + C)
is the empty set
2. ... => extract_subvector(Y, C2 - C1) if [C2, C2 + Y) is a subset of
[C1, C1 + C) - an existing simplification
3. ... => vA insert_subvector(vA extract_subvector(vB X, C2), vC Y, C1 - C2)
if [C1, C1 + C) is a subset of [C2, C2 + A) - that is, if you're only
updating the extracted sub-part.
Adds a regresssion tests for an infinite SelectionDAG cycle that is
fixed by a stack of commits that ends with this one.
[3 lines not shown]
[SelectionDAG] Fold subvector inserts into concat operands
Push insert_subvector into the containing CONCAT_VECTORS operand when the insertion is wholly contained there.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Track demanded select elements in noundef checks
Propagate demanded elements through to the two arms of a select, and
check the condition with or without demanded elements depending on if
it's a vector or not.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Fold extracts spanning concat operands
Factor the extract_subvector-of-CONCAT_VECTORS logic and handle
extracts that cover multiple whole concat operands by rebuilding a
smaller concat directly.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Fold nonzero extract-of-extract indices
Generalize the extract_subvector-of-extract_subvector fold to compose
nonzero indices instead of only handling an outer index of zero.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Track demanded concat elements in noundef checks
Teach isGuaranteedNotToBeUndefOrPoison to distribute fixed-length
demanded element masks across CONCAT_VECTORS operands. This is part of
the series of fixes needed to resolve a SelectionDAG hang by making it
possible to prove certain values don't need to be frozen.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Track bitcast demanded elements in noundef tests
Bitcasts preserve undef/poison status, but vector bitcasts can change
which source lanes cover a demanded result lane. Map the demanded
element mask through fixed-length vector bitcasts before checking the
source where possible.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
[SelectionDAG] Look through freeze in undef demanded checks
There were cycles where the freeze combiner and thet
demanded-elements simplification code would get into fights about
whethere the operands to a shuffle or a concat should be
`freeze undef` or `undef` once the simplifier had concluded zero
elements were demanded from some operation. This PR prevents such
cases.
AI note: an LLM generated the code and the test, I've read them
Co-Authored-By: OpenAI Codex <codex at openai.com>
tests: Avoid sleep when causing a write error
Cause a write error using a fifo and wait, rather than needing a sleep
to wait for something to terminate. This is faster and avoids a
potential test failure on a heavily loaded system.
Using /dev/full would be simpler, but it is not portable enough (it
tends not to be available in jails, even). Starting programs with stdout
not open or only open for read/execute/search may have unexpected side
effects.
Reviewed by: ngie, des
Differential Revision: https://reviews.freebsd.org/D57213
[lldb][docs] Convert resources/ RST docs to Markdown (NFC) (#201442)
Convert the ten contributor-facing RST docs under lldb/docs/resources/
to MyST Markdown. This is the second batch of an incremental RST ->
Markdown migration. The previous PR (#201256) covered nine small leaf
pages.
Files: build, dataformatters, debugging, extensions, formatterbytecode,
overview, projects, qemu-testing, sbapi, test.
Verified by building the docs on origin/main and on this branch with
identical sphinx flags and diffing both the warnings and the rendered
HTML. After file extension and line numbers are normalized, the warning
sets match exactly. Six of the ten pages are byte-identical. The four
that differ (dataformatters, projects, sbapi, test) differ only in:
- CommonMark collapsing two-spaces-after-period to one.
- MyST adding a `myst` CSS class to `<dl>` elements and an `<hr>`
separator before footnote sections.
[18 lines not shown]