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's a concise summary of the major changes in the LLVM IR diff:
Removal of Redundant lifetime.start/end Intrinsics: Several functions (e.g., in actix-rs, coreutils-rs, delta-rs, elfshaker-rs) eliminate unnecessary @llvm.lifetime.start.p0 and @llvm.lifetime.end.p0 calls, often replacing them with direct memory operations or reusing existing stack slots—improving code size and eliminating spurious lifetime markers.
Stack Slot Reallocation & SROA Refinements: In multiple benchmarks (coreutils-rs, delta-rs, elfshaker-rs, fish-rs, ockam-rs), alloca instructions are reordered or resized (e.g., swapping [40 x i8] ↔ [24 x i8]), and SROA (Scalar Replacement of Aggregates) is refined—e.g., merging or relocating .sroa.* fields into larger or better-aligned stack slots (e.g., %13 instead of %.sroa.5) to improve locality and enable better optimization.
Alias Scope Metadata Updates: Significant renumbering and restructuring of !noalias, !alias.scope, and !noalias metadata IDs across modules (coreutils-rs, llvm, meilisearch-rs). This reflects updated alias scope hierarchies—e.g., scopes now correctly associate with argument indices or new function-level scopes—enhancing precision for memory disambiguation.
Phi Node and Control Flow Adjustments: Critical phi node updates (e.g., in coreutils-rs’s _ZN3std2io5Write18write_all_vectored...) fix predecessor lists (e.g., %105 → %102, %30 → %30) and correct loop-phi operand sources—ensuring correctness after CFG transformations like loop rotation or sink hoisting.
Structural Cleanup in OpenSSL Benchmarks: New alloca %struct.ossl_param_st additions (%11) and corresponding memcpy/construct call adjustments in ecparam.ll and pkey.ll align parameter construction logic and simplify multi-step param setup—replacing cascaded memcpys with more direct usage and improving maintainability.
These changes collectively reflect ongoing optimizations in Rust’s LLVM backend: tighter stack layout, improved alias analysis fidelity, safer lifetime management, and robustness against control-flow and SROA-induced IR inconsistencies.
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#174739
Requested by: @antoniofrighetto