This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Support iterator arguments in the loop unrolling
Needs RevisionPublic

Authored by liufengdb on Jun 23 2020, 1:17 PM.

Details

Diff Detail

Event Timeline

liufengdb created this revision.Jun 23 2020, 1:17 PM
Herald added a project: Restricted Project. · View Herald TranscriptJun 23 2020, 1:17 PM
rriddle added inline comments.Jun 23 2020, 1:29 PM
mlir/lib/Transforms/Utils/LoopUtils.cpp
488

Use ValueRange instead of ArrayRefs here, it removes the need to create a smallvector below.

liufengdb updated this revision to Diff 272861.Jun 23 2020, 4:32 PM

fix some test failures

liufengdb updated this revision to Diff 272864.Jun 23 2020, 4:34 PM

remove the redundant comments

liufengdb updated this revision to Diff 272865.Jun 23 2020, 4:36 PM

remove unused

ftynse requested changes to this revision.Jun 24 2020, 6:06 AM
ftynse added inline comments.
mlir/lib/Transforms/Utils/LoopUtils.cpp
483

Can this use ValueRange instead of ArrayRef?

503

Nit: camelCase please

504

lookupOrDefault(terminator->getOperand(..)) will remove the need for if below

511

Can we just bail out of transformation in this case, instead of producing incorrect code?

mlir/test/Dialect/SCF/loop-unroll.mlir
263

Let's not pattern-match SSA value names

This revision now requires changes to proceed.Jun 24 2020, 6:06 AM
bondhugula requested changes to this revision.Jun 24 2020, 9:35 AM
bondhugula added a subscriber: bondhugula.

@liufengdb Can you add a commit summary please even if brief?