Revert "[OpenMP] Use ext linkage for kernels handles and globals handles keep…" (#201698)
Reverts llvm/llvm-project#200964
This patch breaks flang declare target on a common block
[MLIR][XeGPU] Promote memref.alloca to SLM in convert-vector-to-xegpu (#197978)
Run a small pre-pass at the start of convert-vector-to-xegpu that
rewrites every memref.alloca to address space 3, so allocations coming
out of bufferization carry the SLM attribute by the time the conversion
patterns run.
[VPlan] Intersect IR flags across interleave members when narrowing. (#201682)
Update narrowInterleaveGroupOp to properly intersect flags for all wide
members, to make sure we only use the flags common across all combined
members.
[MemProf] Fix incorrect VP metadata update during ICP promotion (#201658)
Track unpromoted candidates explicitly when performing ICP during
MemProf
context disambiguation. Previously, the code assumed that the first N
candidates were always the ones promoted, which led to incorrect
metadata
on the fallback indirect call if a candidate was skipped (e.g. due to
missing definition or being illegal to promote).
[lldb][docs] Convert top-level RST docs to Markdown (NFC) (#201674)
Convert the two remaining top-level RST docs, index and
python_api_enums, to MyST Markdown. This is the final batch of an
incremental RST -> Markdown migration.
After this change, the only RST sources left under lldb/docs/ are
man/lldb.rst and man/lldb-server.rst, which conf.py intentionally keeps
as RST so the man-page builder can run without myst_parser installed
(this reduces dependencies for some llvm distributions).
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. index.html is byte-identical; python_api_enums.html
differs in a single line where CommonMark collapses two spaces after a
period to one.
The diff also surfaced two semantic regressions in the conversion, fixed
[10 lines not shown]
[libc++] Suppress deprecation warning around wstring_convert::to_bytes (#201633)
The deprecation warning for wstring_convert::to_bytes fires from inside
the libc++ header, so users can't suppress it with their own diagnostic
pragmas around the call site. Wrap the definition with
_LIBCPP_SUPPRESS_DEPRECATED_PUSH/POP, mirroring what's already done for
the destructor and from_bytes just above.
Add a regression test under test/libcxx.
rdar://173319468
Assisted-by: Claude
[libc++] Fix constraint recursion in std::expected's operator== (#201455)
The C++26 constraint added to operator==(const expected& x, const T2& v)
by P3379R0 evaluates *x == v as part of constraint satisfaction. When
ADL on a comparison reaches this hidden friend through a type whose
associated namespaces include std::expected -- for example std::pair<T,
std::expected<U, V>> -- the constraint check ends up considering the
same overload again with the original type as T2, producing a
"satisfaction of constraint depends on itself" error.
Parameterize the expected operand with an extra template parameter
constrained to be the same type as the enclosing expected's value type.
This is observationally equivalent but makes template argument deduction
fail for non-expected operands before the constraint is evaluated, so
the recursion never starts.
Fixes #160431
rdar://178226313
Assisted-by: Claude
[SCEV] Batch common-factor folding in getAddExpr (#184258)
The existing pairwise common-factor fold in getAddExpr handles two
patterns:
`W + X + (X * Y * Z) --> W + (X * ((Y*Z)+1))`
`X + (A*B*C) + (A*D*E) --> X + (A*(B*C+D*E))`
Both fold exactly two terms sharing a common factor, then re-enter
getAddExpr() with the partially-simplified Ops. When n terms share a
common factor X, this requires n-1 re-entries through the full
getAddExpr normalization pipeline.
Replace this with a single-pass scan that collects all terms sharing the
common factor and folds them in one shot:
`A1*X + A2*X + ... + An*X --> X * (A1 + A2 + ... + An)`
This reduces the number of top-level re-entries into getAddExpr() for
this fold from n-1 to 1, improving compile time for expressions with
many terms sharing a common factor.
[2 lines not shown]
[MLIR][LLVMIR] Add support for intrinsics with metadata arguments (#200308)
This updates the LLVM dialect to properly handle intrinsics with
metadata arguments.
The primary goal of this change is to support the constrained FP
intrinsics, but support for other intrinsics with metadata arguments
came along with the change.
I have not yet added the RoundingModeOpInterface and
FPExceptionBehaviorOpInterface to CallIntrinsicOp. I intend to do that
as a follow up change if this direction is accepted. I have also not yet
removed existing specialized operations that explicitly handle a subset
of the constrained intrinsics.
Assisted-by: Cursor / claude-opus-4.7
[LV] Add test showing incorrect flag merging in narrowIG (NFC). (#201673)
Add test showing narrowInterleaveGroups incorrectly using the flags from
the first member, even if other members do not have the same flags.
[clang][doc][SYCL] Expand SYCL driver release notes (#200449)
## Summary
The SYCL Support section in the release notes previously had a single
entry for the default SPIR-V target change. This PR adds driver-level
entries covering all notable SYCL changes landed upstream:
- `-fsycl`, `-fsycl-device-only`, `-fsycl-host-only` flag introduction
(#GH117268)
- C++17 default enforcement and sub-C++17 rejection (#GH194014)
- Runtime library rename from `libsycl.so` to `libLLVMSYCL.so` and
automatic runtime path / header include injection (#GH188770, #GH174877)
- Windows SYCL runtime library linking support with CRT management
(#GH194744)
- Fix for `-nolibsycl` being silently ignored and spurious spirv-link
flags forwarded to `clang-sycl-linker` (#GH200252)
Addresses the review comment on #200200 requesting that notable SYCL
[5 lines not shown]
CI: move libclang python byindings tests to main CI
This removes the separate python bindings CI, which run on the GitHub free
runners and take more than one hour to build libclang.
The tests are executed instead in the monolithic pipelines,
whenever clang would be tested.
This is fine in terms of resources because all the dependencies are
built anyway, and the tests themselves take less than one second to
run on the free runners.
[clang] implement CWG2064: ignore value dependence for decltype
The 'decltype' for a value-dependent (but non-type-dependent) should be known,
so this patch makes them non-opaque instead.
This patch also implements what's neceessary to allow overloading
on pure differences in instantiation dependence, making `std::void_t`
usable for SFINAE purposes.
This also readds a few test cases from da98651, which was a previous attempt
at resolving CWG2064.
Fixes #8740
Fixes #61818
Fixes #190388
[clang] fix assertion for DeducedAsPack DeducedTemplateSpecializationType (#201664)
This fixes a regression introduced in #186727, which was never released,
so there are no release notes.
Fixes #200418
[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] 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 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>