You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Here is a concise summary of the major changes in this LLVM IR diff:
Replacement of llvm.memset with vectorized stores: Multiple instances of llvm.memset (e.g., zeroing 16-byte regions) are replaced with direct store <N x T> zeroinitializer or splat instructions (e.g., <4 x float>, <2 x float>, <2 x i64>), improving code generation for aligned, fixed-size initializations.
Use of vector loads/stores for aggregate copies: Structured memory copies (e.g., {float, float} or {i64, i64}) are replaced by loading/storing vector types (<2 x float>, <2 x i64>, <4 x i32>) — often eliminating temporary alloca slots and lifetime intrinsics, reducing stack traffic and enabling better optimization.
Elimination of redundant alloca + memcpy sequences: Many patterns involving an alloca-ed temporary buffer followed by memcpy to/from it are removed. Instead, values are loaded directly into vector registers and stored where needed — simplifying control flow and removing unnecessary memory operations.
Refinement of SROA (Scalar Replacement of Aggregates): Several alloca {T, T} declarations are replaced with alloca <2 x T>, reflecting improved aggregate decomposition that enables vectorization from the outset rather than via post-SROA optimization.
Cleanup of dead or unused struct type definitions: Unused struct type declarations (e.g., %struct.anon.10, %struct.PyCompilerFlags, %struct.ViewSpecifier) are removed, reducing IR bloat and improving type system clarity without semantic impact.
These changes collectively reflect aggressive vectorization, SROA refinement, and memory operation elimination — all aimed at generating more efficient, compact, and optimizable IR.
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
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.
Link: llvm/llvm-project#165159
Requested by: @yxsamliu