-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
863efc9
commit 4cede66
Showing
3 changed files
with
51 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
set(LLVM_LINK_COMPONENTS | ||
Support | ||
) | ||
|
||
get_property(dialect_libs GLOBAL PROPERTY MLIR_DIALECT_LIBS) | ||
get_property(translation_libs GLOBAL PROPERTY MLIR_TRANSLATION_LIBS) | ||
|
||
add_llvm_executable(crab2mlir-translate | ||
crab2mlir-translate.cpp | ||
) | ||
llvm_update_compile_flags(crab2mlir-translate) | ||
target_link_libraries(crab2mlir-translate | ||
PRIVATE | ||
${dialect_libs} | ||
${translation_libs} | ||
MLIRIR | ||
MLIRParser | ||
MLIRPass | ||
MLIRSPIRV | ||
MLIRTranslation | ||
MLIRSupport | ||
) | ||
|
||
mlir_check_link_libraries(crab2mlir-translate) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
//===- crab2mlir-translate.cpp ---------------------------------*- C++ -*-===// | ||
// | ||
// This file is licensed under the Apache License v2.0 with LLVM Exceptions. | ||
// See https://llvm.org/LICENSE.txt for license information. | ||
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
// | ||
//===----------------------------------------------------------------------===// | ||
// | ||
// This is a command line utility that translates a file from/to MLIR using one | ||
// of the registered translations. | ||
// | ||
//===----------------------------------------------------------------------===// | ||
|
||
#include "mlir/InitAllTranslations.h" | ||
#include "mlir/Support/LogicalResult.h" | ||
#include "mlir/Translation.h" | ||
|
||
#include "Dialect/Crab/IR/CrabDialect.h" | ||
|
||
int main(int argc, char **argv) { | ||
mlir::registerAllTranslations(); | ||
|
||
return failed( | ||
mlir::mlirTranslateMain(argc, argv, "MLIR Translation Testing Tool")); | ||
} |