mirror of
https://github.com/revng/revng
synced 2026-06-21 14:07:57 +00:00
36 lines
814 B
C++
36 lines
814 B
C++
//
|
|
// This file is distributed under the MIT License. See LICENSE.md for details.
|
|
//
|
|
|
|
#include "llvm/Support/CommandLine.h"
|
|
#include "llvm/Support/Signals.h"
|
|
|
|
#include "mlir/InitAllDialects.h"
|
|
#include "mlir/InitAllPasses.h"
|
|
#include "mlir/Tools/mlir-opt/MlirOptMain.h"
|
|
|
|
#include "revng/Support/Assert.h"
|
|
#include "revng/Support/InitRevng.h"
|
|
|
|
#include "revng-c/mlir/Dialect/Clift/IR/Clift.h"
|
|
|
|
using namespace llvm::cl;
|
|
|
|
int main(int Argc, char *Argv[]) {
|
|
|
|
mlir::DialectRegistry Registry;
|
|
mlir::registerAllDialects(Registry);
|
|
|
|
mlir::registerAllPasses();
|
|
|
|
Registry.insert<mlir::clift::CliftDialect>();
|
|
|
|
using mlir::asMainReturnCode;
|
|
using mlir::MlirOptMain;
|
|
std::string ToolName = "Standalone optimizer driver\n";
|
|
|
|
return asMainReturnCode(MlirOptMain(Argc, Argv, ToolName, Registry));
|
|
|
|
return 0;
|
|
}
|