[lldb][CMake] Force OBJECT libraries to also be STATIC (#196222)
When add_lldb_library is called with OBJECT, llvm_add_library would also
produce a SHARED variant under BUILD_SHARED_LIBS=ON. That variant fails
to link because a5a13ca29186 intentionally moved lldbDAP's LINK_LIBS to
its consumers.
Pass STATIC alongside OBJECT so the secondary variant is always an
archive, matching the LLVMTableGenCommon pattern. Fixes
BUILD_SHARED_LIBS=ON breakage reported on #196108.
[CIR][CUDA] builtin vars (#195539)
Implement emitPseudoObjectRValue and fix VisitPseudoObjectExpr in the
scalar emitter to call it instead of errorNYI.
Part of https://github.com/llvm/llvm-project/issues/179278
[Runtimes] Pass through per-runtime CMake options for target runtimes (#194105)
Fix warning:
Manually-specified variables were not used by the project:
LIBCLC_USE_SPIRV_BACKEND.
LIBCLC was already passed through in `-DLLVM_ENABLE_RUNTIMES=libclc` case.
This PR adds to runtime_register_target for `-DRUNTIMES_triple-_LLVM_ENABLE_RUNTIMES=` case.
[AMDGPU][MLIR] Add FoldMemRefOpsIntoGlobalLoadAsyncToLDSOp (#195982)
Add folders for memref aliases for gfx1250 global async to lds.
Assisted by: cursor
Signed-off-by: Eric Feng <Eric.Feng at amd.com>
[MLIR][IntRange] Materialize known constant values only when the value type is integer-like (#196133)
This patch came out of
https://discourse.llvm.org/t/request-for-advice-in-updating-intrange-optimziations/90685
In short, my out-of-tree dialect has region-bearing operations whose
return-like terminators semantically wrap an integer type in a
non-integer type when returning to the parent for control flow (also
this dialect that has no constant materializer). In this case,
`MaterializeKnownConstantValues` will attempt to construct integer
attributes using those non-integer types, which causes a stack trace and
prevents us from using int range optimizations on IR that contains these
ops.
This patch adds guards to the materialization step, so that if the value
that is inferred to be constant is not an integer (or shaped container
with an integer element type), no materialization is attempted.
[Driver] Forward -v to clang-sycl-linker in SPIRV toolchain (#196213)
The SPIRV linker job construction was not forwarding the -v (verbose)
flag to clang-sycl-linker when --sycl-link is used. This is limited to
the --sycl-link path because the default linker spir-link doesn't
support -v flag.
[mlir][reduce] Separate scripts and tests into distinct directories (#196005)
This PR reorganizes the mlir-reduce component by separating reduction
scripts and their corresponding test cases into dedicated directories.
Part of https://github.com/llvm/llvm-project/pull/195997.
[clang-sycl-linker][NFC] Improve clang-sycl-linker verbose output (#196212)
Print in-process operation messages (sycl-device-link, LLVM backend)
before execution rather than after, matching the behavior of
clang-linker-wrapper.
[WebAssembly] Add typed select (select t*, 0x1c) (#195953)
Add MC-layer support for the typed select instruction from the
reference-types proposal:
- New OPERAND_VALTYPE_LIST operand kind (ULEB count followed by N
single-byte valtypes), stored in the MCInst as count + N immediates.
- SELECT_T at 0x1c in WebAssemblyInstrRef.td, gated on
HasReferenceTypes.
- Plumbing through the disassembler, printer, encoder, asm parser, and
type checker.
- Encoding, disassembly, and type-checker error tests, covering
zero-length and multi-value vecs.
ISel continues to select the numeric SELECT_<type> variants at 0x1b. My
motivation is unblocking LLDB, which uses LLVM's disassembler. We got a
report that these instructions show up as <unknown> in LLDB.
rdar://170659547
Revert "[ASan][JSON] Unpoison memory before its reuse" (#196203)
Reverts llvm/llvm-project#79065
This is no longer necessary now that we have gotten rid of ASan short
string annotations in libc++.
Revert "[ASan][ADT] Don't scribble with ASan" (#196201)
Reverts llvm/llvm-project#79066
This is no longer necessary now that we have gotten rid of ASan short
string annotations in libc++ (#194208).
[lldb] Support dynamically loading ScriptInterpreter plugins (#189718)
Add support for building the script interpreter plugins as shared
libraries, controlled by the `LLDB_ENABLE_DYNAMIC_SCRIPTINTERPRETERS`
CMake variable. This allows the plugins, rather than `liblldb`, to link
against their respective dependencies such as Python and Lua, which has
several benefits:
1. It makes it possible to gracefully handle the Python or Lua
dependencies not being present, instead of crashing.
2. It enables programmatically deciding which Python or Lua library to
load.
3. Combined with (2), this opens up a path towards not statically
linking with Python at all, which is required in order to load the LLDB
module in a different Python interpreter (at least this is a hard
requirement on Darwin due to two-level namespaces and install names).
This PR completes #183791
Make it clear that log enable's output file is per channel not per category (#196178)
It is natural to try:
```
log enable -f file1 lldb step
log enable -f file2 lldb process
```
or whatever, and then be surprised that all the logs end up in
`file2`... The help on `log enable`'s `-f` option didn't specify what
you were setting the file for. This PR just changes the help text to be
clear about the current state of things.
[lldb] Fix misconstructed FromErrorStringWithFormatv format strings (#196189)
Fix mistakes in `FromErrorStringWithFormatv` format strings. Uses
https://github.com/llvm/llvm-project/pull/195974
---------
Co-authored-by: Jonas Devlieghere <jonas at devlieghere.com>
[clang][SYCL] Emit "sycl-module-id" function attribute (#195965)
Attach the "sycl-module-id" LLVM function attribute to SYCL device
functions that are candidates for entry points in device-code splitting.
The attribute value is the module identifier (translation unit name),
which clang-sycl-linker uses to group kernels by translation unit when
splitting device code.
The attribute is emitted at two sites:
1. SYCL kernel caller functions (spir_kernel) are synthesized by
EmitSYCLKernelCaller and do not go through EmitFunction, so the
attribute is set directly after SetSYCLKernelAttributes.
2. sycl_external function definitions go through
SetLLVMFunctionAttributesForDefinition; the attribute is added there
when SYCLIsDevice and SYCLExternalAttr are present.
Both sites call the new CodeGenModule::addSYCLModuleIdAttr helper.
Co-authored-by: Claude
[AMDGPU] Validate forced lit64() on VOP3 instructions (#196171)
Lit64 cannot be used with VOP3* but we did not validate it
in case it can be encoded as lit32, but forced with the
operand modifier.