Page MenuHomePhabricator

[mlir] Utility method for getting mixed integer and values list as just values.
AbandonedPublic

Authored by mravishankar on Mar 1 2021, 10:45 AM.

Details

Summary

For a list of mixed integer and SSA values (used for offsets, sizes
and strides in OffsetSizeAndStrideOpInterface) return the entries as
SSA values.

Diff Detail

Unit TestsFailed

TimeTest
50 msx64 debian > Flang.Semantics::resolve102.f90
Script: -- : 'RUN: at line 1'; /mnt/disks/ssd0/agent/llvm-project/flang/test/Semantics/test_errors.sh /mnt/disks/ssd0/agent/llvm-project/flang/test/Semantics/resolve102.f90 /mnt/disks/ssd0/agent/llvm-project/build/tools/flang/test/Semantics/Output/resolve102.f90.tmp /mnt/disks/ssd0/agent/llvm-project/build/bin/f18 -intrinsic-module-directory /mnt/disks/ssd0/agent/llvm-project/build/tools/flang/include/flang

Event Timeline

mravishankar created this revision.Mar 1 2021, 10:45 AM
mravishankar requested review of this revision.Mar 1 2021, 10:45 AM
hanchung accepted this revision.Mar 2 2021, 11:20 AM

just few style nits.

mlir/include/mlir/Interfaces/ViewLikeInterface.td
183 ↗(On Diff #327183)

Add a period at the end.

218 ↗(On Diff #327183)

ditto

253 ↗(On Diff #327183)

ditto

mlir/lib/Interfaces/ViewLikeInterface.cpp
11–12 ↗(On Diff #327183)

Add a blank line between these two.

43–44 ↗(On Diff #327183)

Add a blank line between two methods.

This revision is now accepted and ready to land.Mar 2 2021, 11:20 AM

Address comments and use ValueRange instead OperandRange for values.

mravishankar marked 5 inline comments as done.Mar 2 2021, 12:47 PM

Moving the utility methods to StandardDialect/Utils since keep it on
ViewInterface is a layering violation. Also drop the interface methods
that use that utility.

rriddle added inline comments.Mar 2 2021, 2:00 PM
mlir/lib/Dialect/StandardOps/Utils/Utils.cpp
36

Can you use integers.getAsValueRange<IntegerAttr>() instead?

39

nit: Drop trivial braces.

mravishankar marked an inline comment as done.

Address comments

mlir/lib/Dialect/StandardOps/Utils/Utils.cpp
36

Thanks!

mravishankar abandoned this revision.Mar 3 2021, 1:59 PM

@nicolasvasilache suggestion abandoning this patch. The intent is to make the use of OpFoldResult more common, and having a fall back to get Value would affect that.