This is an archive of the discontinued LLVM Phabricator instance.

[mlir][scf] Make whileOp builder funcs optional
ClosedPublic

Authored by Hardcode84 on Apr 12 2023, 8:46 AM.

Details

Summary

Create empty block without the terminator in this case.

Diff Detail

Event Timeline

Hardcode84 created this revision.Apr 12 2023, 8:46 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 12 2023, 8:46 AM
Hardcode84 requested review of this revision.Apr 12 2023, 8:46 AM
Hardcode84 added a comment.EditedApr 12 2023, 8:53 AM

Some notes:

ftynse accepted this revision.Apr 12 2023, 8:54 AM
ftynse added inline comments.
mlir/lib/Dialect/SCF/IR/SCF.cpp
3817–3819

Nit: it's possible to update the OpBuilder definition in ODS and use CArg there to produce default values for these.

This revision is now accepted and ready to land.Apr 12 2023, 8:54 AM
Hardcode84 added inline comments.Apr 12 2023, 8:59 AM
mlir/lib/Dialect/SCF/IR/SCF.cpp
3817–3819

see my previous comment

This revision was automatically updated to reflect the committed changes.