This is an archive of the discontinued LLVM Phabricator instance.

[mlir][DRR] Add location directive
ClosedPublic

Authored by jpienaar on Apr 7 2020, 7:45 AM.

Details

Summary

Add directive to indicate the location to give to op being created. This
directive is optional and if unused the location will still be the fused
location of all source operations.

Currently this directive only works with other op locations, reusing an
existing op location or a fusion of op locations. But doesn't yet support
supplying metadata for the FusedLoc.

Based off initial revision by antiagainst@ and effectively mirrors GlobalIsel
debug_locations directive.

Diff Detail

Event Timeline

jpienaar created this revision.Apr 7 2020, 7:45 AM
Herald added a project: Restricted Project. · View Herald Transcript
rriddle added inline comments.Apr 7 2020, 11:21 AM
mlir/docs/DeclarativeRewrites.md
677

Why the last argument? May be weird to come from the C++ world where it is always the first argument.

684

nit: typo the matched the location

mlir/tools/mlir-tblgen/RewriterGen.cpp
696

nit: Remove trivial braces.

rriddle accepted this revision.Apr 7 2020, 11:25 AM
This revision is now accepted and ready to land.Apr 7 2020, 11:25 AM
jpienaar updated this revision to Diff 255757.Apr 7 2020, 11:45 AM
jpienaar marked 3 inline comments as done.

Fixed typo and removed trivial braces.

This revision was automatically updated to reflect the committed changes.

Cool! Thanks for pushing forward on this! :)

mlir/docs/DeclarativeRewrites.md
671

typo: tablegen

mlir/include/mlir/IR/OpBase.td
2187

symbols