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
{{ message }}
This repository was archived by the owner on Mar 17, 2026. It is now read-only.
String Move Optimization in std::string Move Constructors: The patch reorders and refines the sequence of stores in std::string move constructors (e.g., C2EOS4_) across multiple benchmarks (abseil-cpp, arrow, cmake, gromacs, opencv, postgres). Specifically, it moves the critical store ptr %src, ptr %dst, align 8, !tbaa !... instruction — which updates the internal pointer to the moved-from buffer — after computing the new capacity/size fields but before finalizing the destination’s size field. This ensures the string object remains in a valid state earlier during the move.
Consistent Pointer Store Placement in String Move Logic: In many C2EOS4_ blocks, the store of the source data pointer into the destination’s internal pointer field (e.g., store ptr %13, ptr %9, align 8, !tbaa !19) was previously omitted or misplaced and is now consistently added — often right before the final store i64 0, ... for the size field. This fixes potential use-of-uninitialized-pointer bugs and improves correctness.
TBAA Metadata Updates in Protocol Buffer Code: In opencv’s protobuf-related IR (extension_set.ll, generated_message_reflection.ll, map_field.ll, message.ll), the patch swaps TBAA metadata IDs (e.g., !164 ↔ !165, !41 ↔ !47, !197 ↔ !208) in load/store instructions and updates corresponding !tbaa node definitions. This reflects refined type-based aliasing assumptions, likely improving optimization safety and precision.
Phi Node Operand Correction in Exception Handling Paths: Several phi instructions in landing pad and exception cleanup paths (e.g., %eh.lpad-body = phi { ptr, i32 } [...]) were updated to reference the correct predecessor basic block labels (e.g., %72 → %72, %57 → %57, %64 → %64) instead of mismatched ones. This fixes malformed PHI nodes that could cause miscompilation or undefined behavior during exception unwinding.
Memcpy Target Address Computation Fix: In multiple C2EOS4_ sequences (e.g., io_util.ll, non_temporal_memcpy_test.ll), the getelementptr used as the destination for llvm.memcpy was incorrectly computed before the relevant size value was updated. The patch reorders the getelementptr (e.g., %25 = getelementptr ...) to occur after the size computation (e.g., %26 = add nuw nsw i64 %24, 1) and uses the newly computed GEP as the memcpy destination — ensuring the copy goes to the correct location in the small-string buffer.
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
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
None yet
2 participants
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#184311
Requested by: @nikic