[Codegen] Add pass to remove iree_codegen.index_hint ops#23139
Merged
Max191 merged 2 commits intoiree-org:mainfrom Jan 16, 2026
Merged
[Codegen] Add pass to remove iree_codegen.index_hint ops#23139Max191 merged 2 commits intoiree-org:mainfrom
Max191 merged 2 commits intoiree-org:mainfrom
Conversation
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
MaheshRavishankar
approved these changes
Jan 15, 2026
hanhanW
reviewed
Jan 15, 2026
compiler/src/iree/compiler/Codegen/Common/test/remove_index_hints.mlir
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/test/remove_index_hints.mlir
Outdated
Show resolved
Hide resolved
compiler/src/iree/compiler/Codegen/Common/test/remove_index_hints.mlir
Outdated
Show resolved
Hide resolved
hanhanW
approved these changes
Jan 15, 2026
Contributor
hanhanW
left a comment
There was a problem hiding this comment.
LGTM if the review comments are addressed.
krzysz00
reviewed
Jan 15, 2026
Contributor
krzysz00
left a comment
There was a problem hiding this comment.
I'd still like to see these index_hint ops implementing the integer inference interfaces
Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
Contributor
Author
We can add it, although I realized that for the current attributes that we have, the implementation would mostly just be to avoid blocking the analysis. The hints give very little information about the ranges/divisibilities of the index values, since they are more about how the index varies across lanes. (other hint attributes could give more information, of course) |
keshavvinayak01
pushed a commit
that referenced
this pull request
Jan 27, 2026
Adds a pass to remove iree_codegen.index_hint operations. The pass unconditionally drops all index_hint ops, and should be used once the compiler is done using them for optimizations. The ops can get in the way of later optimizations, so this pass should be used to drop them once they are no longer needed. The pass is not added to any pipelines, because we are not generating index_hint ops anywhere yet, but this pass will be added later once index_hints start to be used. --------- Signed-off-by: Max Dawkins <max.dawkins@gmail.com> Signed-off-by: Keshav Vinayak Jha <keshavvinayakjha@gmail.com>
MaheshRavishankar
pushed a commit
to MaheshRavishankar/iree
that referenced
this pull request
Feb 24, 2026
) Adds a pass to remove iree_codegen.index_hint operations. The pass unconditionally drops all index_hint ops, and should be used once the compiler is done using them for optimizations. The ops can get in the way of later optimizations, so this pass should be used to drop them once they are no longer needed. The pass is not added to any pipelines, because we are not generating index_hint ops anywhere yet, but this pass will be added later once index_hints start to be used. --------- Signed-off-by: Max Dawkins <max.dawkins@gmail.com>
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 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.
Adds a pass to remove iree_codegen.index_hint operations. The pass unconditionally drops all index_hint ops, and should be used once the compiler is done using them for optimizations. The ops can get in the way of later optimizations, so this pass should be used to drop them once they are no longer needed.
The pass is not added to any pipelines, because we are not generating index_hint ops anywhere yet, but this pass will be added later once index_hints start to be used.