[Mlir-commits] [mlir] 8184247 - [mlir] move LLVM target import header and tests

Alex Zinenko llvmlistbot at llvm.org
Tue Mar 9 00:22:21 PST 2021


Author: Alex Zinenko
Date: 2021-03-09T09:22:14+01:00
New Revision: 8184247f0bd0d40e2a2f3ea4833d6deac966e2cf

URL: https://github.com/llvm/llvm-project/commit/8184247f0bd0d40e2a2f3ea4833d6deac966e2cf
DIFF: https://github.com/llvm/llvm-project/commit/8184247f0bd0d40e2a2f3ea4833d6deac966e2cf.diff

LOG: [mlir] move LLVM target import header and tests

Move Target/LLVMIR.h to target/LLVMIR/Import.h to better reflect the purpose of
this file. Also move all LLVM IR target tests under the LLVMIR directory.

Reviewed By: mehdi_amini

Differential Revision: https://reviews.llvm.org/D98178

Added: 
    mlir/include/mlir/Target/LLVMIR/Import.h
    mlir/test/Target/LLVMIR/arm-neon.mlir
    mlir/test/Target/LLVMIR/arm-sve.mlir
    mlir/test/Target/LLVMIR/avx512.mlir
    mlir/test/Target/LLVMIR/import.ll
    mlir/test/Target/LLVMIR/llvmir-debug.mlir
    mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
    mlir/test/Target/LLVMIR/llvmir-invalid.mlir
    mlir/test/Target/LLVMIR/llvmir-types.mlir
    mlir/test/Target/LLVMIR/llvmir.mlir
    mlir/test/Target/LLVMIR/nvvmir.mlir
    mlir/test/Target/LLVMIR/openmp-llvm.mlir
    mlir/test/Target/LLVMIR/rocdl.mlir
    mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir

Modified: 
    mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp

Removed: 
    mlir/include/mlir/Target/LLVMIR.h
    mlir/test/Target/arm-neon.mlir
    mlir/test/Target/arm-sve.mlir
    mlir/test/Target/avx512.mlir
    mlir/test/Target/import.ll
    mlir/test/Target/llvmir-debug.mlir
    mlir/test/Target/llvmir-intrinsics.mlir
    mlir/test/Target/llvmir-invalid.mlir
    mlir/test/Target/llvmir-types.mlir
    mlir/test/Target/llvmir.mlir
    mlir/test/Target/nvvmir.mlir
    mlir/test/Target/openmp-llvm.mlir
    mlir/test/Target/rocdl.mlir
    mlir/test/Target/vector-to-llvm-ir.mlir


################################################################################
diff  --git a/mlir/include/mlir/Target/LLVMIR.h b/mlir/include/mlir/Target/LLVMIR/Import.h
similarity index 82%
rename from mlir/include/mlir/Target/LLVMIR.h
rename to mlir/include/mlir/Target/LLVMIR/Import.h
index 0e801c866837..ef8bd9f7ca40 100644
--- a/mlir/include/mlir/Target/LLVMIR.h
+++ b/mlir/include/mlir/Target/LLVMIR/Import.h
@@ -1,4 +1,4 @@
-//===- LLVMIR.h - MLIR to LLVM IR conversion --------------------*- C++ -*-===//
+//===- Import.h - LLVM IR To MLIR translation -------------------*- C++ -*-===//
 //
 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
 // See https://llvm.org/LICENSE.txt for license information.
@@ -6,12 +6,12 @@
 //
 //===----------------------------------------------------------------------===//
 //
-// This file declares the entry point for the MLIR to LLVM IR conversion.
+// This file declares the entry point for the LLVM IR to MLIR conversion.
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef MLIR_TARGET_LLVMIR_H
-#define MLIR_TARGET_LLVMIR_H
+#ifndef MLIR_TARGET_LLVMIR_IMPORT_H
+#define MLIR_TARGET_LLVMIR_IMPORT_H
 
 #include "mlir/Support/LLVM.h"
 #include "llvm/ADT/StringRef.h"
@@ -38,4 +38,4 @@ translateLLVMIRToModule(std::unique_ptr<llvm::Module> llvmModule,
 
 } // namespace mlir
 
-#endif // MLIR_TARGET_LLVMIR_H
+#endif // MLIR_TARGET_LLVMIR_IMPORT_H

diff  --git a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
index a2d0ea4ab688..28b58cffe170 100644
--- a/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
+++ b/mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
@@ -15,7 +15,7 @@
 #include "mlir/IR/BuiltinOps.h"
 #include "mlir/IR/BuiltinTypes.h"
 #include "mlir/IR/MLIRContext.h"
-#include "mlir/Target/LLVMIR.h"
+#include "mlir/Target/LLVMIR/Import.h"
 #include "mlir/Translation.h"
 
 #include "llvm/ADT/TypeSwitch.h"

diff  --git a/mlir/test/Target/arm-neon.mlir b/mlir/test/Target/LLVMIR/arm-neon.mlir
similarity index 100%
rename from mlir/test/Target/arm-neon.mlir
rename to mlir/test/Target/LLVMIR/arm-neon.mlir

diff  --git a/mlir/test/Target/arm-sve.mlir b/mlir/test/Target/LLVMIR/arm-sve.mlir
similarity index 100%
rename from mlir/test/Target/arm-sve.mlir
rename to mlir/test/Target/LLVMIR/arm-sve.mlir

diff  --git a/mlir/test/Target/avx512.mlir b/mlir/test/Target/LLVMIR/avx512.mlir
similarity index 100%
rename from mlir/test/Target/avx512.mlir
rename to mlir/test/Target/LLVMIR/avx512.mlir

diff  --git a/mlir/test/Target/import.ll b/mlir/test/Target/LLVMIR/import.ll
similarity index 100%
rename from mlir/test/Target/import.ll
rename to mlir/test/Target/LLVMIR/import.ll

diff  --git a/mlir/test/Target/llvmir-debug.mlir b/mlir/test/Target/LLVMIR/llvmir-debug.mlir
similarity index 100%
rename from mlir/test/Target/llvmir-debug.mlir
rename to mlir/test/Target/LLVMIR/llvmir-debug.mlir

diff  --git a/mlir/test/Target/llvmir-intrinsics.mlir b/mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir
similarity index 100%
rename from mlir/test/Target/llvmir-intrinsics.mlir
rename to mlir/test/Target/LLVMIR/llvmir-intrinsics.mlir

diff  --git a/mlir/test/Target/llvmir-invalid.mlir b/mlir/test/Target/LLVMIR/llvmir-invalid.mlir
similarity index 100%
rename from mlir/test/Target/llvmir-invalid.mlir
rename to mlir/test/Target/LLVMIR/llvmir-invalid.mlir

diff  --git a/mlir/test/Target/llvmir-types.mlir b/mlir/test/Target/LLVMIR/llvmir-types.mlir
similarity index 100%
rename from mlir/test/Target/llvmir-types.mlir
rename to mlir/test/Target/LLVMIR/llvmir-types.mlir

diff  --git a/mlir/test/Target/llvmir.mlir b/mlir/test/Target/LLVMIR/llvmir.mlir
similarity index 100%
rename from mlir/test/Target/llvmir.mlir
rename to mlir/test/Target/LLVMIR/llvmir.mlir

diff  --git a/mlir/test/Target/nvvmir.mlir b/mlir/test/Target/LLVMIR/nvvmir.mlir
similarity index 100%
rename from mlir/test/Target/nvvmir.mlir
rename to mlir/test/Target/LLVMIR/nvvmir.mlir

diff  --git a/mlir/test/Target/openmp-llvm.mlir b/mlir/test/Target/LLVMIR/openmp-llvm.mlir
similarity index 100%
rename from mlir/test/Target/openmp-llvm.mlir
rename to mlir/test/Target/LLVMIR/openmp-llvm.mlir

diff  --git a/mlir/test/Target/rocdl.mlir b/mlir/test/Target/LLVMIR/rocdl.mlir
similarity index 100%
rename from mlir/test/Target/rocdl.mlir
rename to mlir/test/Target/LLVMIR/rocdl.mlir

diff  --git a/mlir/test/Target/vector-to-llvm-ir.mlir b/mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir
similarity index 100%
rename from mlir/test/Target/vector-to-llvm-ir.mlir
rename to mlir/test/Target/LLVMIR/vector-to-llvm-ir.mlir


        


More information about the Mlir-commits mailing list