Page MenuHomePhabricator

[mlir] handle nested regions in llvm-legalize-for-export

Authored by ftynse on Jan 18 2022, 1:16 AM.



The translation from the MLIR LLVM dialect to LLVM IR includes a mechanism that
ensures the successors of a block to be different blocks in case block
arguments are passed to them since the opposite cannot be expressed in LLVM IR.
This mechanism previously only worked for functions because it was written
prior to the introduction of other region-carrying operations such as the
OpenMP dialect, which also translates directly to LLVM IR. Modify this
mechanism to handle all regions in the module and not only functions.

Diff Detail

Event Timeline

ftynse created this revision.Jan 18 2022, 1:16 AM
ftynse requested review of this revision.Jan 18 2022, 1:16 AM
wsmoses accepted this revision.Jan 18 2022, 7:54 AM
This revision is now accepted and ready to land.Jan 18 2022, 7:54 AM
This revision was landed with ongoing or failed builds.Jan 18 2022, 8:09 AM
This revision was automatically updated to reflect the committed changes.