This is an archive of the discontinued LLVM Phabricator instance.

[mlir][scf] WhileOp patterns cleanup
ClosedPublic

Authored by Hardcode84 on Apr 13 2023, 10:40 AM.

Details

Summary

Fix review comments from https://reviews.llvm.org/D146252
Merge WhileRemoveUnusedArgs pattern with (unused) WhileUnusedArg,
use getConditionOp, use SmallPtrSet and early check, move tests

Diff Detail

Event Timeline

Hardcode84 created this revision.Apr 13 2023, 10:40 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 10:40 AM
Hardcode84 requested review of this revision.Apr 13 2023, 10:40 AM
mehdi_amini accepted this revision.Apr 13 2023, 5:09 PM

Thanks!

mlir/lib/Dialect/SCF/IR/SCF.cpp
3771

Was this dead code because redundant with the early exit at the beginning of the function?

This revision is now accepted and ready to land.Apr 13 2023, 5:09 PM
This revision was automatically updated to reflect the committed changes.
Hardcode84 added inline comments.Apr 14 2023, 5:21 AM
mlir/lib/Dialect/SCF/IR/SCF.cpp
3771

Yes, it was checking the same thing as early check.