Page MenuHomePhabricator

[mlir] Generalize m_ConstantIndexOp
Needs RevisionPublic

Authored by chelini on Jan 16 2020, 8:11 AM.



Generalize m_ContantIndexOp by using the m_Constant matcher and checking the operation for an index type.

Diff Detail

Event Timeline

chelini created this revision.Jan 16 2020, 8:11 AM
chelini updated this revision to Diff 238508.Jan 16 2020, 8:20 AM

Unit tests: pass. 61914 tests passed, 0 failed and 783 were skipped.

clang-tidy: unknown.

clang-format: pass.

Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml

ftynse added inline comments.Jan 16 2020, 8:30 AM

Please add explicit to avoid spurious implicit conversions

chelini updated this revision to Diff 238516.Jan 16 2020, 8:48 AM

Add explicit keyword for the single-parameter constructor.

ftynse accepted this revision.Jan 16 2020, 8:52 AM
This revision is now accepted and ready to land.Jan 16 2020, 8:52 AM
rriddle requested changes to this revision.Jan 16 2020, 8:59 AM
rriddle added inline comments.

This is a lot of duplication for what should be one or two lines of code.

This revision now requires changes to proceed.Jan 16 2020, 8:59 AM
rriddle added inline comments.Jan 16 2020, 9:03 AM

I would imagine that the constant_op_binder could optionally constrain the type(using isa<>) as well (via templates).


Drop the assert


nit: merge these on one line.

nicolasvasilache resigned from this revision.Oct 2 2020, 1:27 AM
Herald added a project: Restricted Project. · View Herald TranscriptOct 2 2020, 1:27 AM