This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Move TestDialect to ::test namespace
ClosedPublic

Authored by stephenneuendorffer on Sep 24 2020, 11:54 AM.

Details

Summary

While the changes are extensive, they basically fall into a few
categories:

  1. Moving the TestDialect itself.
  2. Updating C++ code in tablegen to explicitly use ::mlir, since it

will be put in a headers that shouldn't expect a 'using'.

  1. Updating some generic MLIR Interface definitions to do the same thing.
  2. Updating the Tablegen generator in a few places to be explicit about

namespaces

  1. Doing the same thing for llvm references, since we no longer pick

up the definitions from mlir/Support/LLVM.h

Diff Detail

Event Timeline

Herald added a project: Restricted Project. · View Herald TranscriptSep 24 2020, 11:54 AM
stephenneuendorffer requested review of this revision.Sep 24 2020, 11:54 AM
mehdi_amini accepted this revision.Sep 24 2020, 9:06 PM

LGTM on the principle, whenever you get it to work :)

This revision is now accepted and ready to land.Sep 24 2020, 9:06 PM
mehdi_amini added inline comments.Sep 24 2020, 9:18 PM
mlir/test/lib/Dialect/Test/TestDialect.cpp
24–25

River mentioned to me that a good tradeoff would be to keep the using namespace mlir; but move it after the point where we include all the TableGen generated stuff.

That way all the manually written code in this file does not need to be clobbered with mlir:: everywhere.

mlir/test/lib/Dialect/Test/TestDialect.cpp
24–25

Agreed, I'm more concerned about the tablegen'd stuff being broken right now.

Yeah, still broken.

stephenneuendorffer edited the summary of this revision. (Show Details)
stephenneuendorffer edited the summary of this revision. (Show Details)
This revision was landed with ongoing or failed builds.Aug 14 2021, 1:32 PM
This revision was automatically updated to reflect the committed changes.