[libsycl][Driver] Move and rename the SYCL shared library (#188770)
Align the shared library with other runtime libraries:
- Rename from libsycl.so to libLLVMSYCL.so
- Make install dir include the host triple if
LLVM_ENABLE_PER_TARGET_RUNTIME_DIR is ON.
Also updates the Clang driver to be aligned with the new location by
relanding https://github.com/llvm/llvm-project/pull/189053
---------
Co-authored-by: Srividya Sundaram <srividya.sundaram at intel.com>
Add PhaseOrdering test mirroring missed optimization on empty std::set (#192840)
Adds a PhaseOrdering test mirroring missed optimization on empty
`std::set`. The `erase` in not inlined due to missing store-to-load
forwarding between inlining attempts, so inliner sees it as recursive.
Part of #183994
Addressed in #190607
[mlir][spirv] Tighten types of SPIR-V TOSA op definitions (#192623)
Tighten the SPIR-V TOSA op definitions by introducing stricter named
type constraints and aligning verifier coverage with the new type
surface.
Remove implication checks that are now enforced directly by
operand/result type constraints.
Drop the corresponding negative tests that no longer exercise those
verifier paths.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[RISCV][GISel] Add variant_cc test. NFC (#193036)
I couldn't add -global-isel RUN lines to the existing SDAG test because
GISel doesn't support fixed vector arguments yet.
[clang][ssaf][NFC] Standardize getter naming to use `get/take` prefixes (#193031)
To make our APIs uniform, this change adds `get` prefix to instance
accessors, and `take` prefix to "move-out" methods. Removing `get`
prefix throughout turns out to be a bigger change, so I have chosen to
add the prefix to these methods instead.
[clang][ssaf][NFC] Remove stale `ID` field from `MockSerializationFormat` (#192740)
This `ID` field was first introduced for LLVM-style RTTI but was missed
from deletion when we removed RTTI support.
[dsymutil] Add x86-registered-target requirement to embed-resource test (#193043)
The test uses an x86_64 Mach-O input and generates output which requires
the x86 backend.
[offload] Cleanup of llvm-omp-kernel-replay tool (#192779)
This commit cleans up the llvm-omp-kernel-replay tool by simplifying the
JSON file reading code, improving the error checking, and switching to
llvm::Error.
[mlir][spirv] Clarify SPIR-V TOSA op examples (#192952)
Improve the example sections in SPIRVTosaOps.td by adding short
clarifying notes where some tensor operands are not obvious from the
example alone.
The added notes focus on operands that affect the operation semantics,
such as shift amounts, padding, slice coordinates, gather/scatter
indices, resize parameters, table contents, and rescale parameters.
Also replace anonymous SSA names in examples with more descriptive
operand names, and clean up wording and formatting for readability.
Signed-off-by: Davide Grohmann <davide.grohmann at arm.com>
[libc++][NFC] Move namespace macros into a detail header (#193003)
This is another step in splitting up `<__config>` to make it easier to
understand what's going on and have logically separate parts of the
configuration properly separated.
[clang-sycl-linker][NFC] Refactor for backend extensibility (#192886)
Use OutputFileNameExt variable for codegen output extension.
Avoid shadowing OffloadArch type name with local variable.
Simplify codegen loop to single SplitModules assignment.
[AArch64][PAC] Handle signing of init/fini pointers in AsmPrinter
Move signing of the contents of `@llvm.global_(ctors|dtors)` from
Clang frontend to the end of the backend pipeline, to AsmPrinter.
Signing of the pointers to init/fini functions in the backend fixes
registration of the constructors and destructors performed by the
optimizer or the backend.
This commit introduces two new module flags, `ptrauth-init-fini` and
`ptrauth-init-fini-address-discrimination`, mirroring corresponding
Clang options. The flags are semantically boolean, and the module
is allowed to have either none of these flags, only the first one,
or both. The particular constant discriminator to use is not
configurable via module flags and is hardcoded to the value 0xD9D4
in the `llvm/lib/Target/AArch64/AArch64PointerAuth.h` file.
[CIR] Allow _setjmp and _setjmpex to fall through to library calls (#193021)
This change allows calls to _setjmp and _setjmpex to fall through the
builtin handling and be emitted as library calls when we are not
targeting OSMSVCRT. It also adds the code to set "returns_twice" on
functions matching an explicit list, as they are in classic codegen.
[dsymutil] Add --embed-resource to copy files into dSYM bundles. (#190663)
Add a new --embed-resource flag that copies files or directories into
the dSYM bundle's Contents/Resources/ directory during generation.
Projects often need to embed files such as LLDB Python scripts into dSYM
bundles, and this is usually done with a post dsym generation script,
which may race stripping and code signing steps.
rdar://50633614
[llvm-nm] Drop STT_FILE/STT_SECTION from --special-syms (#192129)
The filter for SF_FormatSpecific symbols exempted all such symbols
for architectures having mapping symbols. This caused STT_FILE and
STT_SECTION symbols to appear with --special-syms on these targets
but not on x86_64. Narrow the exemption to only STT_NOTYPE symbols,
which are the actual mapping symbols ($d, $x, etc.).
[HLSL] Add codegen for accessing resource members of a struct (#187127)
Any expression that accesses a resource or resource array member of a global struct instance must be during codegen replaced by an access of the corresponding implicit global resource variable.
When codegen encounters a `MemberExpr` of a resource type, it traverses the AST to locate the parent struct declaration, building the expected global resource variable name along the way. If the parent declaration
is a non-static global struct instance, codegen searches its `HLSLAssociatedResourceDeclAttr` attributes to locate the matching global resource variable and then generates IR code to access the resource global in place of the member access.
Fixes #182989
Don't pass RecipeBuilder
Legacy calls `setRecipe` on all processed recipes but really queries `getRecipe`
for memory operations only, that we don't touch in the scalarization as that
happens after all memory recipes has been processed.
[VPlan] Scalarize to first-lane-only directly on VPlan
This is needed to enable subsequent https://github.com/llvm/llvm-project/pull/182595.
I don't think we can fully port all scalarization logic from the legacy
path to VPlan-based right now because that would require us to introduce
interleave groups much earlier in VPlan pipeline, and without that we
can't really `assert` this new decision matches the previous CM-based
one. And without those `assert`s it's really hard to ensure we properly
port all the previous logic.
As such, I decided just to implement something much simpler that would
be enough for #182595. However, we perform this transformation before
delegating to the old CM-based decision, so it **is** effective
immediately and taking precedence even for consecutive loads/stores
right away.
Depends on https://github.com/llvm/llvm-project/pull/182592 but is stacked on
top of https://github.com/llvm/llvm-project/pull/182594 to enable linear
stacking for https://github.com/llvm/llvm-project/pull/182595.