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 }}
Repository navigation
[Transform] Clone analyzer before vectorization rewriting - #3612
VectorizeLoop accepts a const Analyzer pointer, while VectorizeRewriter requires a mutable Analyzer to simplify loop extents. Passing the pointer directly fails C++ compilation.
Clone the analyzer before constructing the rewriter, preserving the caller's analysis context while providing a mutable copy. This follows the existing approach in GetVectorizeSize.
VectorizeLoop clones the supplied analyzer before constructing VectorizeRewriter.
The rewriter uses the mutable clone, preserving the caller’s analysis context.
Vectorization hint handling and the vectorize_hint == 1 path remain unchanged.
C++ style / lint notes
The PR changes C++ source. The touched rules in docs/developer_guide/cpp_style.md concern parameter and analyzer usage; the change does not alter a public API.
CI includes the “C++ API Style Audit (warning only)” step. No audit results were provided.
👋 Hi! Thank you for contributing to the TileLang project.
Please remember to run pre-commit run --all-files in the root directory of the project to ensure your changes are properly linted and formatted. This will help ensure your contribution passes the format check.
We appreciate you taking this step! Our team will review your contribution, and we look forward to your awesome work! 🚀
Reviewing files that changed from the base of the PR and between 741bf8b and ddba6f4.
📒 Files selected for processing: 1
src/transform/loop_vectorize.cc
Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 3 remain after this review.
📝 Walkthrough
VectorizeLoop now passes a cloned arithmetic analyzer to VectorizeRewriter. Vectorization hint handling and the vectorize_hint == 1 path remain unchanged.
Changes: Loop vectorization
Layer / File(s)
Summary
Clone the analyzer src/transform/loop_vectorize.cc
VectorizeLoop passes a cloned arithmetic analyzer to VectorizeRewriter instead of passing the caller’s analyzer directly.
The change preserves analyzer state isolation without introducing a merge-blocking risk.
Pre-merge checks: 4 · 1
Failed checks: 1 warning
Check name
Status
Explanation
Resolution
Docstring Coverage
Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed checks: 4 passed
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title clearly and concisely describes the main change: cloning the analyzer before vectorization rewriting.
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
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.
VectorizeLoop accepts a const Analyzer pointer, while VectorizeRewriter requires a mutable Analyzer to simplify loop extents. Passing the pointer directly fails C++ compilation.
Clone the analyzer before constructing the rewriter, preserving the caller's analysis context while providing a mutable copy. This follows the existing approach in GetVectorizeSize.
Related to #3226.
Summary
VectorizeLoopclones the supplied analyzer before constructingVectorizeRewriter.vectorize_hint == 1path remain unchanged.C++ style / lint notes
docs/developer_guide/cpp_style.mdconcern parameter and analyzer usage; the change does not alter a public API.