This is an archive of the discontinued LLVM Phabricator instance.

[mlir][NFC] Move Translation.h to a Tools/mlir-translate directory
ClosedPublic

Authored by rriddle on Mar 4 2022, 1:53 PM.

Details

Summary

Translation.h is currently awkwardly shoved into the top-level mlir, even though it is
specific to the mlir-translate tool. This commit moves it to a new Tools/mlir-translate
directory, which is intended for libraries used to implement tools. It also splits the
translate registry from the main entry point, to more closely mirror what mlir-opt
does.

Diff Detail

Event Timeline

rriddle created this revision.Mar 4 2022, 1:53 PM
Herald added a reviewer: ftynse. · View Herald Transcript
Herald added a project: Restricted Project. · View Herald Transcript
rriddle requested review of this revision.Mar 4 2022, 1:53 PM
mehdi_amini added a comment.EditedMar 5 2022, 11:50 AM

I am not convinced that the whole registration for translation isn't just part of the tool either: what other uses exist for this really?

I am not convinced that the whole registration for translation isn't just part of the tool either: what other uses exist for this really?

Aha! You had the same thoughts I did. I originally wrote this commit to just move everything to the mlir-translate/ directory, but wasn't sure others thought differently (given that we had the weird Translation/ lib folder). Will update to do that instead.

rriddle updated this revision to Diff 413237.Mar 5 2022, 12:28 PM
rriddle retitled this revision from [mlir][NFC] Split out MlirTranslateMain Translation.h and better locate Translate files to [mlir][NFC] Move Translation.h to a Tools/mlir-translate directory.
rriddle edited the summary of this revision. (Show Details)
rriddle updated this revision to Diff 413238.Mar 5 2022, 12:30 PM
mehdi_amini accepted this revision.Mar 5 2022, 12:56 PM
This revision is now accepted and ready to land.Mar 5 2022, 12:56 PM
This revision was landed with ongoing or failed builds.Mar 7 2022, 1:06 AM
This revision was automatically updated to reflect the committed changes.
mlir/lib/Tools/mlir-translate/Translation.cpp