This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Remove redundant scf.if builder
AcceptedPublic

Authored by frgossen on Feb 27 2023, 2:38 PM.

Details

Summary

The builder with withElseRegion implicitly builds a terminator depending on the op types, which is unnecessarily complex.
The same can be achieved with scf::buildTerminatedBody which makes the intention clear.

Diff Detail

Event Timeline

frgossen created this revision.Feb 27 2023, 2:38 PM
frgossen requested review of this revision.Feb 27 2023, 2:38 PM
jpienaar accepted this revision.Feb 27 2023, 8:49 PM
This revision is now accepted and ready to land.Feb 27 2023, 8:49 PM
frgossen updated this revision to Diff 501182.Feb 28 2023, 9:28 AM

Fix flang

Herald added a project: Restricted Project. · View Herald TranscriptFeb 28 2023, 9:28 AM
frgossen updated this revision to Diff 501221.Feb 28 2023, 10:42 AM

Fix formatting