-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Allowing RDV to call getArgOperandsMutable()
#160415
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
joker-eph
merged 8 commits into
llvm:main
from
FranciscoThiesen:mlir-rdv-call-args-mutable
Sep 26, 2025
Merged
Changes from 2 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
19a9c64
Adding changes to RDV +small repro case for dialect with callOp and t…
FranciscoThiesen 664802a
Merge branch 'main' into mlir-rdv-call-args-mutable
FranciscoThiesen 78ae4f1
Update mlir/lib/Transforms/RemoveDeadValues.cpp with joker-eph sugges…
FranciscoThiesen e3d5d54
Avoiding the expensive symbol look-up
FranciscoThiesen 6ea2cac
Clang formatting
FranciscoThiesen a71642f
Making assumption explicit
FranciscoThiesen d2a3dbe
Adding bidirectional iterator support to const_set_bits_iterator_impl
FranciscoThiesen 7cc4f89
Merge upstream/main to get BitVector bidirectional iterator support
FranciscoThiesen File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
23 changes: 23 additions & 0 deletions
23
mlir/test/Transforms/remove-dead-values-call-segments.mlir
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| // RUN: mlir-opt --split-input-file --remove-dead-values --mlir-print-op-generic %s | FileCheck %s --check-prefix=GEN | ||
|
|
||
| // ----- | ||
| // Private callee: both args become dead after internal DCE; RDV drops callee | ||
| // args and shrinks the *args* segment on the call-site to zero; sizes kept in | ||
| // sync. | ||
|
|
||
| module { | ||
| func.func private @callee(%x: i32, %y: i32) { | ||
| %u = arith.addi %x, %x : i32 // %y is dead | ||
| return | ||
| } | ||
|
|
||
| func.func @caller(%a: i32, %b: i32) { | ||
| // args segment initially has 2 operands. | ||
| "test.call_with_segments"(%a, %b) { callee = @callee, | ||
| operandSegmentSizes = array<i32: 0, 2, 0> } : (i32, i32) -> () | ||
| return | ||
| } | ||
| } | ||
|
|
||
| // GEN: "test.call_with_segments"() <{callee = @callee, operandSegmentSizes = array<i32: 0, 0, 0>}> : () -> () | ||
| // ^ args shrank from 2 -> 0 |
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
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.
Uh oh!
There was an error while loading. Please reload this page.