This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Eliminate the remaining usages of cl::opt instead of PassOption.
ClosedPublic

Authored by rriddle on Apr 7 2020, 10:50 PM.

Details

Summary

Pass options are a better choice for various reasons and avoid the need for static constructors.

Diff Detail

Event Timeline

rriddle created this revision.Apr 7 2020, 10:50 PM
bondhugula accepted this revision.Apr 7 2020, 11:22 PM
bondhugula added a subscriber: bondhugula.
bondhugula added inline comments.
mlir/include/mlir/Dialect/Affine/Passes.td
55

This should be changed to cacheSizeInKiB but I can do it.

mlir/include/mlir/Pass/PassOptions.h
45

-> Returns true if ...

mlir/lib/Dialect/Affine/Transforms/LoopTiling.cpp
327

cacheSize should be changed to cacheSizeInKiB - but I can do it in another revision.

mlir/lib/Dialect/Affine/Transforms/LoopUnroll.cpp
159–160

unrollFull can be bool? If not, this check can be (unrollFull != -1) instead of ternary.

This revision is now accepted and ready to land.Apr 7 2020, 11:22 PM
rriddle updated this revision to Diff 256092.Apr 8 2020, 12:44 PM
rriddle marked 4 inline comments as done.

Rebase and resolve comments

Fantastic, thanks!

mehdi_amini accepted this revision.Apr 8 2020, 1:03 PM
This revision was automatically updated to reflect the committed changes.