This is an archive of the discontinued LLVM Phabricator instance.

[MLIR] Refactor library initialization of JitRunner.
ClosedPublic

Authored by stephenneuendorffer on Feb 27 2020, 10:09 AM.

Details

Summary

Previously, lib/Support/JitRunner.cpp was essentially a complete application,
performing all library initialization, along with dealing with command line
arguments and actually running passes. This differs significantly from
mlir-opt and required a dependency on InitAllDialects.h. This dependency
is significant, since it requires a dependency on all of the resulting
libraries.

This patch refactors the code so that tools are responsible for library
initialization, including registering all dialects, prior to calling
JitRunnerMain. This places the concern about what dialect to support
with the end application, enabling more extensibility at the cost of
a small amount of code duplication between tools. It also fixes
BUILD_SHARED_LIBS=on.

Diff Detail

Event Timeline

rriddle accepted this revision.Feb 27 2020, 10:13 AM
This revision is now accepted and ready to land.Feb 27 2020, 10:13 AM
stephenneuendorffer edited the summary of this revision. (Show Details)
mehdi_amini accepted this revision.Feb 27 2020, 10:27 PM
This revision was automatically updated to reflect the committed changes.