This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Propagate input side effect information
ClosedPublic

Authored by tpopp on Apr 24 2020, 2:58 AM.

Details

Summary

Previously operations like std.load created methods for obtaining their
effects but did not inherit from the SideEffect interfaces when their
parameters were decorated with the information. The resulting situation
was that passes had no information on the SideEffects of std.load/store
and had to treat them more cautiously. This adds the inheritance
information when creating the methods.

As a side effect, many tests are modified, as they were using std.load
for testing and this oepration would be folded away as part of pattern
rewriting. Tests are modified to use store or to reutn the result of the
std.load.

Diff Detail

Event Timeline

tpopp created this revision.Apr 24 2020, 2:58 AM

Thanks for tackling this! Looks good to me but deferring approval to @rriddle

ftynse resigned from this revision.Apr 24 2020, 5:55 AM
tpopp updated this revision to Diff 259886.Apr 24 2020, 7:48 AM

Update variable names to llvm style.

rriddle accepted this revision.Apr 24 2020, 10:54 AM

Thanks! It looks like the failures are real, can you look into those?

mlir/include/mlir/Support/LLVM.h
60

This looks unrelated.

mlir/lib/TableGen/OpClass.cpp
201

nit: Can you move the traitStr here?

This revision is now accepted and ready to land.Apr 24 2020, 10:54 AM
tpopp updated this revision to Diff 260236.Apr 27 2020, 1:11 AM
tpopp marked 3 inline comments as done.

std::move last use of string.

mlir/lib/TableGen/OpClass.cpp
201

Done.

tpopp added a comment.Apr 27 2020, 2:33 AM

The failing tests seem to have just been failing at head. Failures now are just from the clang-tidy warning of a Twine being used.

This revision was automatically updated to reflect the committed changes.

Seems like this could be checked in a ODS test checking the output of Tablegen?