workflows/release-binaries: Install LLDB test deps (#199900)
lldb-api tests are hitting:
"/home/runner/work/llvm-project/llvm-project/lldb/packages/Python/lldbsuite/test/lldbplatformutil.py",
line 12, in <module>
from packaging import version
ModuleNotFoundError: No module named 'packaging'
when building release binaries on Arm64/x86 Linux. Install deps before
running tests.
Fixes #176422.
[Clang] Profile the NNS of UnresolvedUsingType and CXXThisType correctly in concept hashing (#199617)
They were sometimes incorrect because the written type doesn't contain
an NNS which contains template parameters we're interested in.
No release note because the bug broke MS STL and I want to backport it
to the last 22.x release
Fixes https://github.com/llvm/llvm-project/issues/198663
[DA] Fix overflow in the Exact test (#200781)
In exactTestImpl, some computations using APInt could overflow, which
might lead to incorrect results.
This patch addresses the issue by replacing APInt with
OverflowSafeSignedAPInt, a class that is sensitive to overflow and
allows us to detect it properly.
Fixes #200766.
[GlobalISel] Do not depend on the RuleMatcher at MatchTable emission
Some PredicateMatchers/MatchAction/OperandRenderers relied on accessing
RuleMatcher at emission as a crutch.
Instead, make these classes collect all necessary information in the
constructor so the `emit` methods don't depend on RuleMatcher anymore.
The primary motivation for this is that I've been looking at ways to optimize the MatchTable better,
and the fact that Predicates/Actions/Renderers are not "pure" objects, in the sense that they keep
accessing a bunch of data all over the place even as late as emission, was a consistent pain.
This is NFCI. There are no changes to any of the match table for AMDGPU/AArch64 in this patch.
This patch has a bunch of noise due to function signature changes so I'll highlight the following interesting changes:
- `SameOperandMatcher` needed a bit of an update in its `canHoistOutsideOf` function. I had to rewrite it
but I think the end result is the same.
- `EraseInstAction` has been updated as well, and its users in both Combiner/ISel backends have been updated to.
Instead of ignoring this action if the Inst was already erased, it's now the responsibility of the
builder to never insert it in the first place. `BuildMIAction` had a small update because of that too.
[4 lines not shown]
[InstCombine][VectorCombine] Move bitcast vp.load fold into VectorCombine (#200321)
Fixes https://github.com/llvm/llvm-project/issues/199896
In #192173 we started folding bitcasts of vp.loads with an all ones mask
into a vp.load with the casted type. However on RISC-V a vp.load of an
i1 vector is illegal (since there's no masked variant of `vlm.v`), and
we have no way of checking this in InstCombine.
This moves the fold into VectorCombine so we can query TTI if the cost
is legal (and profitable)
As a side note, it may be possible to lower a vp.load of an i1 vector on
RISC-V to `vlm.v` **only** if the mask is all ones. But this means the
lowering would only be valid for certain values, which is difficult to
cost. And I'm not sure if it would be profitable anyway.
[flang][mlir] Add flang to mlir lowering for dyn_groupprivate (#180938)
This PR implements the Flang frontend lowering for the
`dyn_groupprivate` clause
Changes:
- Add ClauseProcessor handling for DynGroupprivate clause
- Generate appropriate MLIR representation for dyn_groupprivate
- Add/update test cases for dyn_groupprivate lowering
- Remove TODO marker for dyn_groupprivate clause
[AsmParser] Apply deferred debug locations before intrinsic upgrade. (#200779)
Intrinsic upgrades may delete instructions, leaving dangling pointers
that may be accessed when applying deferred debug locations after
91b77dc (#200649).
Fix by applying deferred debug locations before intrinsic upgrade.
PR: https://github.com/llvm/llvm-project/pull/200779
[mlir][bufferization] Implement e2e IR transformation for static memory planner
This adds the complete transformation pass that converts multiple
memref.alloc/dealloc pairs into a single arena with subviews.
The offset assignment is intentionally simple (just sequential) - this
establishes the e2e pipeline so we can add smarter bin-packing later.
Tests verify arena sizing, sequential offsets, and that dynamic shapes
or missing deallocations are correctly skipped.
[DA] Add test for the Exact test misses dependency due to overflow (NFC) (#200780)
This patch adds a test case that demonstrates that the Exact test misses
the dependency due to mishandling of overflow. The test case is taken
from #200766.
[AArch64] Lower scalable i64 CLMUL with SVE2/SME (#198999)
When AES or SSVE-AES are not available, but SVE2 or SME are,
clmul.nxv2i64 can benefit from a cross-byte CLMUL of .S precision. This
re-uses the functionality added for nxv8i16.
[Support] Take ArrayRef in convertWideToUTF8 (#200687)
`convertWideToUTF8` took a `std::wstring`, but it never modified its
data. An `ArrayRef` or `std::wstring_view` are sufficient here. I chose
`ArrayRef<wchar_t>` over `std::wstring_view`, because it can be
implicitly constructed from any range that provides `data()` and
`size()`. A second overload taking a `const wchar_t *` is provided to
convert null terminated wide C-strings.
[Liveness][analyzer] Fix handling of [[assume]] attributes (#198618)
Before this commit, if the analyzer encountered code like
```
int f(int a, int b) {
[[assume(a == 2), assume(b == 3)]];
return a + b;
}
```
it performed the following steps:
1. It visited the expression `a == 2` with `ExprEngine::Visit` (after
visiting its sub-expressions, within the regular visitation that visits
each statement of the `CFGBlock`). This triggered the `EagerlyAssume`
logic and separated two execution paths.
2. It discarded the result bound to `a == 2` from the `Environment`
because `a == 2` is not a direct child of the `AttributedStmt`.
3. Analogously, it visited an evaluated `b == 3`.
4. Analogously, it discarded the result bound to `b == 3`.
5. On each execution path `VisitAttributedStmt` was reached, it ran the
[32 lines not shown]