[ADT] Bitset: add shift operators, word accessors, and etc (#193400)
This PR is split out from #191757 per reviewer request. It has the
following changes to `llvm::Bitset<N>`:
* Added `operator<<`/`<<=`/`>>`/`>>=`, `getNumWords()`, `getWord()`, and
`findLastSet()`.
* Moved the `std::array<>` constructor from protected to **public** and
**explicit**.
A follow-up PR will use these to re-implement `LaneBitmask` as a
`llvm::Bitset` wrapper.
---
The unit test in the PR is largely generated by LLMs. I have reviewed it
and manually applied changes to cover more edge cases.
[NFC][analyzer] Introduce specialized variants of makeNode (#194459)
This commit introduces new methods `makePostStmtNode` and
`makeNodeWithBinding` of `CoreEngine`, which will be used instead of the
5-parameter overloads of `NodeBuilder::generateNode` and
`NodeBuilder::generateSink` (which were originally methods of the class
`StmtNodeBuilder` that was deleted in commit
fb46677a858697afa116c4252e84050a07bc6a70).
This commit applies the newly introduced methods in a few places (as
examples), but there are 80+ call sites that use the 5-parameter
`NodeBuilder::generateNode` or `generateSink`, so this transition will
be completed in multiple follow-up commits.
I decided to introduce these methods because after the transition there
will be 20+ calls to `makePostStmtNode` and 30+ calls to
`makeNodeWithBinding` and it would be cumbersome to use plain `makeNode`
instead of these specialized variants.
[2 lines not shown]
[analyzer][NFC] Rename class `StackFrameContext` to `StackFrame` (#195802)
This patch continues the refactoring roadmap described in issue #190973
by renaming the `StackFrameContext` class to just `StackFrame`. Many
variables of type `const StackFrame *` also had their names updated to
reflect the new class name `StackFrame`.
[mlir][spirv] Support OpenCL.std clz in the SPIR-V dialect (#195317)
Add support for the OpenCL.std clz extended instruction in the MLIR
SPIR-V dialect. From Spriv Specs - Op Name: "clz", Op Code: "151"
[clang][bytecode] Don't evaluate bound member function expressions in new constant interpreter (#194851)
**Problem:**
A crash is triggered by clangd's hover feature when using C++23 and the
new bytecode interpreter, which calls `Expr::EvaluateAsRValue()` to
attempt constant folding on an expression under the cursor, even when it
is not a valid constant expression.
Tested versions: 22.1.3, Trunk (x86_64-pc-linux-gnu)
**How to reproduce:**
```cpp
struct S { void f(); };
void g() { S s; s.f(); }
```
Running `clangd --check=repro.cpp`
(with `compile_flags.txt` containing `-std=c++23
-fexperimental-new-constant-interpreter`)
[69 lines not shown]
[mlir][SPIR-V] Refine OpTypeImage capability inference (#195060)
Capability requirements for OpTypeImage are determined by Dim, Sampled,
MS, and Arrayed
related to LLVM SPIR-V backend PR
https://github.com/llvm/llvm-project/pull/192626
if: replace link state change queue with state transition
if_link_queue is now a normal bitmask rather than holding a queue.
It holds three bits to mirror the link state - UNKNOWN, DOWN and UP.
There are also some bits to indicate that the link state has been scheduled
for change and if it has been locked for changes (ie the interface being
destroyed).
The logic is simple - transitioning to DOWN will remove UNKNOWN and UP,
transitioning to UNKNOWN will remove UP (no driver should do this).
This means that even in the event of transitions happening faster than
the kernel can spit them out, the correct state of the link will be
preserved which is more important than the exact chain of events.
This also fixes an issue where the workqueue for the link state change
was incorrectly scheduled.
if_link_scheduled is now unused and will be removed in a future patch.
Fixes PR kern/60056.