[lldb][NativePDB] Fix width and signedness of enum constants (#210338)
Enumerator values aren't always encoded in the correct bit width and
signedness. This happens with both MSVC and Clang.
On MSVC, unsigned 64bit enumerators can be encoded as signed. For
example `ULONGLONG_MAX` will be encoded as `-1`.
Clang/LLVM will always encode the values as unsigned.
Example: https://godbolt.org/z/96YjGW48W.
I fixed this by setting the expected width and signedness when creating
the enumerator constant. We can't use a shell test like for the other
PDB tests, because no output shows the enum values.
[SPIR-V] Handle bfloat in getZeroFP/getOneFP (#202859)
Related spirv-val change:
https://github.com/KhronosGroup/SPIRV-Tools/pull/6734
---------
Co-authored-by: Juan Manuel Martinez Caamaño <jmartinezcaamao at gmail.com>
[alpha.webkit.UncountedCallArgsChecker] Crash in printArgument (#210411)
The crash was caused by missing nullptr check for Decl used to get
printing policy. Fixed the bug by replacing the use of Decl with
BugManager to get the policy.
[SampleProfile] Support MD5-based ProfileSymbolList (#210235)
This patch speeds up sample profile loading by introducing an
MD5-based ProfileSymbolList (cold symbol list) in extensible binary
profiles.
The sample profile loader spends about a third of its time on loading
and decoding the symbol names in the Profile Symbol List section, yet
we use them only for membership checking purposes via
ProfileSymbolList::contains.
This patch teaches the writer to emit the section as an array of
64-bit GUIDs in the Eytzinger layout. The reader checks the
SecFlagMD5 section flag and sets up an EytzingerTableSpan
pointing into the mmap memory. This achieves both space efficiency
and runtime efficiency.
The new flag, md5-prof-sym-list, is off by default for now.
[6 lines not shown]
Fix metadirective loop variant safety checks
Classify candidate and fallback association from raw directive IDs so clauses are only converted for the selected variant.
Recognize data environments selected by enclosing metadirectives from the emitted OpenMP operation ancestry. Add regressions for unselected clauses and nested selected parallel regions.
Assisted with codex.
[docs] Rewrite 19 LLVM docs from reST to markdown (#208798)
Tracking issue: #201242
[Migration
guide](https://llvm.org/docs/SphinxQuickstartTemplate.html#markdown-migration-guidelines)
This is a stacked PR based on #208800, which does the file rename to
preserve history.
This was prepared with rst2myst plus LLM-assisted cleanup. I paged
through all the generated HTML looking for migration artifacts, and all
of the differences I could find appear to be formatting error
corrections.
Avoid lowering clauses for inapplicable metadirective variants
Classify raw directive specifications from their leaf directive IDs when
checking for loop association. This keeps clause conversion after applicability
filtering, so unsupported clauses in discarded variants cannot reach lowering.
Add a regression for an inapplicable ASSUME HOLDS variant with a NOTHING fallback.
Assisted with codex.
[MLIR][WasmSSA] Instruction parser refactoring of WasmSSA importer (#195500)
Refactored WasmSSA importer mechanism to dispatch control flow to
relevant parser based on op code.
This is to prepare for instructions with multi-bytes opcodes (e.g.
vector instruction and some scalar instructions extensions) which will
be able to reuse the same mechanism.
It also replaces the bit tree to find the address by a jump table.
---------
Co-authored-by: Luc Forget <lforg37 at users.noreply.github.com>
Co-authored-by: Ferdinand Lemaire <ferdinand.lemaire at woven-planet.global>
Co-authored-by: Ferdinand Lemaire <flscminecraft at gmail.com>
Restrict metadirective loop lowering to safe cases
Defer loop variants nested in an existing OpenMP data environment until lowering
can create a variant-local loop induction variable binding. This prevents variant
DSA from affecting the enclosing construct, including for statically inapplicable
variants.
Limit core lowering to DO, SIMD, and DO SIMD. Emit focused TODOs for other
loop-associated directives and add coverage for both boundaries.
Assisted with codex.
[CycleInfo] Reference cycles by preorder index, not pointer. NFC (#210271)
The block-to-innermost-cycle map (BlockMap) and each cycle's parent link
hold a GenericCycle pointer. Store the cycle's preorder index instead,
so no raw cycle pointer remains in the stored representation: BlockMap
becomes a SmallVector<unsigned>, four bytes per block rather than eight,
and the parent link becomes ParentIndex.
The flat Cycles array does not exist during construction, so both hold
creation-order indices into the temporary forest until flatten()
resolves them to preorder indices.
Aided by Claude Opus 4.8
[clang][clangIR]: X86 upstream avx psrldqi/pslldqi (#208025)
This PR upstreams the implementation and corresponding test suites for
X86 byte-shift intrinsics (pslldqi / psrldqi) spanning 128, 256, and
512-bit vector variants from the incubator.
I consolidated both left and right shifts into a single code path since
the underlying lane topology is identical, extracting the
direction-specific index arithmetic into clean variables at the top. Let
me know if you prefer this unified data-driven approach or if explicit
split functions for left/right shifts would be preferred for local
readability.
All integrated tests from the incubator have been upstreamed and are
currently passing.
Minimal compile case
```cpp
#include <emmintrin.h>
[32 lines not shown]
[lldb-dap][test] Avoid a hang on a test failure (#209988)
Tests in `TestDAP_server.py` create `DebugAdapterServer`, passing a
connection string. `DebugAdapterServer.__init__()` creates a socket and
passes the associated input and output streams to its parent class,
`DebugCommunication`. `DAPTestCaseBase.launch()`, which is called from
`TestDAP_server.run_debug_session()`, adds a teardown hook that
eventually calls `DebugCommunication.terminate()`. If the socket is not
closed when this hook executes, it waits indefinitely for the receiving
thread to join.
In the normal case, when a test passes, the connection is closed by
calling `self.dap_server.request_disconnect()` at the end of
`TestDAP_server.run_debug_session()`. If a test fails, the cleanup hook
is called while the connection is still active, which results in a hang.
This can be reproduced by removing the call to `request_disconnect()` or
by changing the condition in the `assertEqual()` on the previous line.
The fix passes the opened socket to 'DebugCommunication' and closes the
socket explicitly in 'DebugCommunication.terminate()'.
[docs] Update the commit review admin task with process details (#210420)
As discussed in the infra area team meeting. Mostly this serves as a
place to stash helpful links.
I picked an arbitrary two week timeout for requests. We can re-evaluate at any time.
It seems less than ideal that one needs issue tracker labelling
privileges to reopen the issue, but I think that's accurate.
[lldb] Contribute the GDB-remote packet history to diagnostics bundles (#210418)
Register a Diagnostics artifact provider from ProcessGDBRemote so a
diagnostics bundle captures the GDB-remote packet history, the same data
"process plugin packet history" prints.
[CIR] Introduce loop cleanup regions (#210212)
For loops and while loops can create variables in their condition
regions that require per-iteration cleanup. The CIR dialect previously
had no clean way to represent these cleanups while maintaining a
separate condition region for the loop operation.
This change introduces an optional cleanup region to these loop ops and
updates the relevant region successor handling to reflect the insertion
of the cleanup region in the control flow when a non-empty cleanup
region is present.
The CFG flattening pass will handle routing the control flow through the
cleanup region in both the normal and EH unwind cases, but this is not
yet implemented. That will be added in a follow-up change, as will
creation of the cleanup region when it is needed during IR generation.
Assisted-by: Cursor / various models
[lldb/script] Add scripting extension template generator (#209647)
This patch adds a `scripting extension generate <ExtensionType>...`
command that introspects a Python extension base class and emits a
skeleton subclass with `# TODO: Implement` stubs for its abstract
methods (or, with `-a`, every method), then opens the result in an
editor.
Generated imports use `from <module> import <class>`, and the generated
`__init__` forwards its arguments to `super().__init__(...)` since every
base class relies on its constructor to set up attributes
(`self.target`, `self.process`, ...) that inherited, non-overridden
methods depend on. When the host can't open an external editor (e.g.
non-macOS), the command reports that as a message rather than an error,
since the file is already written.
To catch regressions in the generator itself instead of just checking
that a file was produced, this patch adds
`TestScriptingExtensionGenerate.py`, which generates a template for
[4 lines not shown]