forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 76
merge main into amd-staging #582
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…egionRewriter.cpp (NFC)
…lvm#167699) When `convertToInteger` fails, the integer result is undefined. In this case, we cannot use it in the subsequent steps. Close llvm#167627.
…lvm#167690) Enables locations to be used as operation attributes. In contrast to the implicit source location every operation carries (`Operation::getLoc()`)—which may be fused or modified during transformations—a `LocationAttr` used as an operation attribute has explicit semantics defined by the operation itself. For example, in our Zig-like language frontend (where types are first-class values), we use a location attribute on struct type operations to store the declaration location, which is part of the type's semantic identity. Using an explicit attribute instead of `Operation::getLoc()` ensures this semantic information is preserved during transformations.
Last PR had asan failures due to bad use of a Twine instead of an std::string.
…lvm#167647) [`llvm.experimental.get.vector.length`](https://llvm.org/docs/LangRef.html#id2399) has the property that if the AVL (%cnt) is less than or equal to VF (%max_lanes) then the return value is just AVL. This patch uses SCEV to simplify this in optimizeForVFAndUF, and adds `ExplicitVectorLength` to `VPInstruction::opcodeMayReadOrWriteFromMemory` so it gets removed once dead.
…7876) This patch introduces some missing s.get.named.barrier.state instructions in the ROCDL dialect
… holds (llvm#166148) This makes it similar to `mlir::TypedValue` in the MLIR C++ API and allows users to be more specific about the values they produce or accept. Co-authored-by: Maksim Levental <maksim.levental@gmail.com>
Added support for lowering the scalar S_ABSDIFF_I32 instruction to equivalent VALU operations.
…c, SUBS(x,y) transform to peephole (llvm#167527) This transform should have never been done in ISel in the first place. It should have been done in peephole, but a few cases were missing.
… helper (llvm#163055) [libc][stdlib] Simplify getenv_test by using inline_strcmp instead of custom helper Replace the custom `my_streq` helper function with LLVM libc's `inline_strcmp` utility from `src/string/memory_utils/inline_strcmp.h`. Changes: - Remove 18-line custom `my_streq` implementation - Use `inline_strcmp` with a simple comparator lambda for string comparisons - Replace `my_streq(..., nullptr)` checks with direct `== nullptr` comparisons - Maintain identical test coverage while reducing code duplication Benefits: - Uses existing, well-tested LLVM libc infrastructure - Clearer test assertions with standard comparison functions - More concise code (reduced from ~48 to ~33 lines) - Consistent with LLVM libc coding practices The test continues to verify: - Empty string handling - Invalid name handling ('=') - Missing environment variable queries - Correct retrieval of existing variables (FRANCE, GERMANY, PATH) - Partial name matching behavior (FRANC vs FRANCE, FRANCE1 vs FRANCE)
This patch adds a Clang-compatible --save-stats option to opt, to provide an easy to use way to save LLVM statistics files when working with opt on the middle end. This is a follow up on the addition to `llc`: llvm#163967 Like on Clang, one can specify --save-stats, --save-stats=cwd, and --save-stats=obj with the same semantics and JSON format. The pre-existing --stats option is not affected. The implementation extracts the flag and its methods into the common `CodeGen/CommandFlags` as `LLVM_ABI`, using a new registration class to conservatively enable opt-in rather than let all tools take it. Its only needed for llc and opt for now. Then it refactors llc and adds support for opt.
This PR implements parts of llvm#162376 - **Broader equivalence than constant index deltas**: - Add Base-delta and Stride-delta matching for Add and GEP forms using ScalarEvolution deltas. - Reuse enabled for both constant and variable deltas when an available IR value dominates the user. - **Dominance-aware dictionary instead of linear scans**: - Tuple-keyed candidate dictionary grouped by basic block. - Walk the immediate-dominator chain to find the nearest dominating basis quickly and deterministically. - **Simple cost model and best-rewrite selection**: - Score candidate expressions and rewrites; select the highest-profit rewrite per instruction. - Skip rewriting when expressions are already foldable or high-efficiency. - **Path compression for better ILP**: - Compress chains of rewrites to a deeper dominating basis when a constant delta exists along the path, reducing dependent bumps on critical paths. - **Dependency-aware rewrite ordering**: - Build a dependency graph (basis, stride, variable delta producers) and rewrite in topological order. - This dependency graph will be needed by the next PR that adds partial strength reduction.
…lvm#167302) Introduce a description of late forwarding to the Neoverse-N3 scheduling model.
…llvm#167692) Help to unblock llvm#165682 I have the avx10_2 bf16 test coverage as well, but its currently breaking as we're missing bf16 strict_fsqrt lowering in the backend
Make the existing libc++ formatter generic Add initializer_list summary provider. Add test for `libstdcpp`
This patch fixes: llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:689:45: error: lambda capture 'DT' is not used [-Werror,-Wunused-lambda-capture] llvm/lib/Transforms/Scalar/StraightLineStrengthReduce.cpp:584:1: error: unused function 'operator<<' [-Werror,-Wunused-function]
…IES" (llvm#167886) Reverts llvm#167794 This breaks a build with BUILD_SHARED_LIBS=ON: /usr/bin/ld: lib/liblldbCommands.a(CommandObjectTarget.cpp.o): undefined reference to symbol '_ZN5clang22PCHContainerOperationsC1Ev Fixing that issue leads to similar failures due to different symbols.
…vectorized compare using vcmpequb.p when Altivec is available (llvm#158657) The patch add 16 bytes load size for function PPCTTIImpl::enableMemCmpExpansion and fold i128 equality/inequality compares of two loads into a vectorized compare using vcmpequb.p when Altivec is available. Rationale: A scalar i128 SETCC (eq/ne) normally lowers to multiple scalar ops. On VSX-capable subtargets, we can instead reinterpret the i128 loads as v16i8 vectors and use the Altive vcmpequb.p instruction to perform a full 128-bit equality check in a single vector compare. Example Result: This transformation replaces memcmp(a, b, 16) with two vector loads and one vector compare instruction.
) - Implemented semantic TODO to catch undeclared mappers. - Fix mapper lookup to include modules imported through USE. - Update and add tests. Fixes llvm#163385.
With DenseMap::keys, we don't need to use [[maybe_unused]].
Idx is already of type unsigned. Identified with readability-redundant-casting.
llvm::map_range(..., [](OpOperand &o) { return &o; })
is equivalent to llvm::make_pointer_range, and the latter is shorter.
…s. (llvm#167504) Useful resolving differences vs mainline downstream.
Added missing cluster.ids op - i.e., along x, y, and z dims. Extended all rocdl tests
This reverts commit acb798e. It turns out the memset calls were papering over the fact that the arrays being used were not initialized rather than papering over a valgrind issue. Move the initialization to the actual member to keep things simpler and to be more consistent with the rest of LLVM.
ronlieb
approved these changes
Nov 13, 2025
Collaborator
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.