This is an archive of the discontinued LLVM Phabricator instance.

[mlir] Make dispatchIndexOpFoldResult handle constant ops.
AbandonedPublic

Authored by hanchung on Mar 12 2021, 4:23 AM.

Details

Summary

This is useful when creating ops with createOrFold method. The method returns a
Value. If you store it in a SmallVector<OpFoldResult> vector, it is still a
ConstantOp if foldable, not an Attribute. Looking into the defining op will
simplify creating mixed operands cases.

Also fix a comment where uses the method.

Diff Detail

Event Timeline

hanchung created this revision.Mar 12 2021, 4:23 AM
hanchung requested review of this revision.Mar 12 2021, 4:23 AM
Herald added a project: Restricted Project. · View Herald TranscriptMar 12 2021, 4:23 AM

It seems like I should fix bunch of tests...

hanchung planned changes to this revision.Mar 12 2021, 5:35 AM
hanchung abandoned this revision.Apr 12 2021, 11:53 PM