This is an archive of the discontinued LLVM Phabricator instance.

[mlir][llvm] Move LLVM IR import into separate file (NFC).
ClosedPublic

Authored by gysit on Dec 19 2022, 12:52 AM.

Details

Summary

The revision renames the Importer to ModuleImport and moves the class
out of the ConvertFromLLVMIR.cpp file into ModuleImport.h and
ModuleImport.cpp. Additionally, it introduces two helper methods
on the ModuleImport class that convert functions and globals, and it
merges the translateLLVMIRToModule function into the
registerFromLLVMIRTranslation function to match the design of
the MLIR to LLVM IR export.

This restructuring is a step towards the file structure of the export
and a preparation for an extensible import
https://discourse.llvm.org/t/rfc-extensible-llvm-ir-import/67256/6 that
uses a dialect interface to import intrinsics and metadata.

Diff Detail

Event Timeline

gysit created this revision.Dec 19 2022, 12:52 AM
Herald added a project: Restricted Project. · View Herald Transcript
gysit requested review of this revision.Dec 19 2022, 12:52 AM
ftynse accepted this revision.Dec 19 2022, 12:54 AM
This revision is now accepted and ready to land.Dec 19 2022, 12:54 AM
This revision was automatically updated to reflect the committed changes.