Page MenuHomePhabricator

[MLIR][OpenMP] Place alloca scope within wsloop in scf.parallel to omp lowering

Authored by wsmoses on Mar 1 2022, 2:04 PM.


Summary replaced the use of stacksave/restore with memref.alloca_scope, but kept the save/restore at the same location. This PR places the allocation scope within the wsloop, thus keeping the same allocation scope as the original scf.parallel (e.g. no longer over stack allocating).

Diff Detail

Event Timeline

wsmoses created this revision.Mar 1 2022, 2:04 PM
Herald added a project: Restricted Project. · View Herald TranscriptMar 1 2022, 2:04 PM
wsmoses requested review of this revision.Mar 1 2022, 2:04 PM
ftynse added inline comments.Mar 2 2022, 9:09 AM

Splice doesn't work well with patterns, consider something like rewriter.mergeBlocks instead.

wsmoses updated this revision to Diff 412454.Mar 2 2022, 9:26 AM

Use mergeBlock

ftynse accepted this revision.Mar 2 2022, 9:30 AM
This revision is now accepted and ready to land.Mar 2 2022, 9:30 AM