NFC: Move SPIR-V dialect to Dialect/ subdirectory

PiperOrigin-RevId: 258345603
This commit is contained in:
Lei Zhang 2019-07-16 05:06:57 -07:00 committed by Mehdi Amini
parent 765b77cc70
commit d36dd94c75
26 changed files with 51 additions and 51 deletions

View File

@ -4,5 +4,4 @@ add_subdirectory(EDSC)
add_subdirectory(GPU)
add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(SPIRV)
add_subdirectory(StandardOps)

View File

@ -1,3 +1,4 @@
add_subdirectory(FxpMathOps)
add_subdirectory(LoopOps)
add_subdirectory(QuantOps)
add_subdirectory(SPIRV)

View File

@ -19,8 +19,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_SPIRV_PASSES_H_
#define MLIR_SPIRV_PASSES_H_
#ifndef MLIR_DIALECT_SPIRV_PASSES_H_
#define MLIR_DIALECT_SPIRV_PASSES_H_
#include "mlir/Pass/Pass.h"
@ -32,4 +32,4 @@ FunctionPassBase *createStdOpsToSPIRVConversionPass();
} // namespace spirv
} // namespace mlir
#endif // MLIR_SPIRV_PASSES_H_
#endif // MLIR_DIALECT_SPIRV_PASSES_H_

View File

@ -19,8 +19,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_SPIRV_SPIRVDIALECT_H_
#define MLIR_SPIRV_SPIRVDIALECT_H_
#ifndef MLIR_DIALECT_SPIRV_SPIRVDIALECT_H_
#define MLIR_DIALECT_SPIRV_SPIRVDIALECT_H_
#include "mlir/IR/Dialect.h"
@ -43,4 +43,4 @@ public:
} // end namespace spirv
} // end namespace mlir
#endif // MLIR_SPIRV_SPIRVDIALECT_H_
#endif // MLIR_DIALECT_SPIRV_SPIRVDIALECT_H_

View File

@ -19,19 +19,19 @@
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_SPIRV_SPIRVOPS_H_
#define MLIR_SPIRV_SPIRVOPS_H_
#ifndef MLIR_DIALECT_SPIRV_SPIRVOPS_H_
#define MLIR_DIALECT_SPIRV_SPIRVOPS_H_
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
#include "mlir/IR/Function.h"
#include "mlir/SPIRV/SPIRVTypes.h"
namespace mlir {
namespace spirv {
#define GET_OP_CLASSES
#include "mlir/SPIRV/SPIRVOps.h.inc"
#include "mlir/Dialect/SPIRV/SPIRVOps.h.inc"
} // end namespace spirv
} // end namespace mlir
#endif // MLIR_SPIRV_SPIRVOPS_H_
#endif // MLIR_DIALECT_SPIRV_SPIRVOPS_H_

View File

@ -32,13 +32,13 @@
#ifdef SPIRV_BASE
#else
include "mlir/SPIRV/SPIRVBase.td"
include "mlir/Dialect/SPIRV/SPIRVBase.td"
#endif // SPIRV_BASE
#ifdef SPIRV_STRUCTURE_OPS
#else
// Pull in ops for defining the SPIR-V module structure
include "mlir/SPIRV/SPIRVStructureOps.td"
include "mlir/Dialect/SPIRV/SPIRVStructureOps.td"
#endif // SPIRV_STRUCTURE_OPS
// -----

View File

@ -19,15 +19,15 @@
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_SPIRV_SPIRVTYPES_H_
#define MLIR_SPIRV_SPIRVTYPES_H_
#ifndef MLIR_DIALECT_SPIRV_SPIRVTYPES_H_
#define MLIR_DIALECT_SPIRV_SPIRVTYPES_H_
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/TypeSupport.h"
#include "mlir/IR/Types.h"
// Pull in all enum type definitions and utility function declarations
#include "mlir/SPIRV/SPIRVEnums.h.inc"
#include "mlir/Dialect/SPIRV/SPIRVEnums.h.inc"
#include <tuple>
@ -196,4 +196,4 @@ public:
} // end namespace spirv
} // end namespace mlir
#endif // MLIR_SPIRV_SPIRVTYPES_H_
#endif // MLIR_DIALECT_SPIRV_SPIRVTYPES_H_

View File

@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_SPIRV_SERIALIZATION_H_
#define MLIR_SPIRV_SERIALIZATION_H_
#ifndef MLIR_DIALECT_SPIRV_SERIALIZATION_H_
#define MLIR_DIALECT_SPIRV_SERIALIZATION_H_
#include "mlir/Support/LLVM.h"
@ -46,4 +46,4 @@ Optional<ModuleOp> deserialize(ArrayRef<uint32_t> binary, MLIRContext *context);
} // end namespace spirv
} // end namespace mlir
#endif // MLIR_SPIRV_SERIALIZATION_H_
#endif // MLIR_DIALECT_SPIRV_SERIALIZATION_H_

View File

@ -12,7 +12,6 @@ add_subdirectory(Parser)
add_subdirectory(Pass)
add_subdirectory(Quantizer)
add_subdirectory(SDBM)
add_subdirectory(SPIRV)
add_subdirectory(StandardOps)
add_subdirectory(Support)
add_subdirectory(TableGen)

View File

@ -20,11 +20,11 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/Dialect/SPIRV/Passes.h"
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/SPIRV/Passes.h"
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/StandardOps/Ops.h"
namespace mlir {

View File

@ -21,7 +21,7 @@ include "mlir/StandardOps/Ops.td"
#ifdef SPIRV_OPS
#else
include "mlir/SPIRV/SPIRVOps.td"
include "mlir/Dialect/SPIRV/SPIRVOps.td"
#endif // SPIRV_OPS
def IsScalar : TypeConstraint<CPred<"!($_self.isa<ShapedType>())">, "scalar">;
@ -45,4 +45,4 @@ multiclass BinaryOpPattern<Op src, SPV_Op tgt> {
defm : BinaryOpPattern<MulFOp, SPV_FMulOp>;
#endif // STANDARD_OPS_TO_SPIRV
#endif // STANDARD_OPS_TO_SPIRV

View File

@ -1,6 +1,7 @@
add_subdirectory(FxpMathOps)
add_subdirectory(LoopOps)
add_subdirectory(QuantOps)
add_subdirectory(SPIRV)
add_llvm_library(MLIRDialect
Traits.cpp

View File

@ -15,7 +15,7 @@
// limitations under the License.
// =============================================================================
#include "mlir/SPIRV/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/SPIRVDialect.h"
// Static initialization for SPIR-V dialect registration.
static mlir::DialectRegistration<mlir::spirv::SPIRVDialect> spirvDialect;

View File

@ -10,12 +10,12 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/SPIRV/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/Parser.h"
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/SPIRV/SPIRVTypes.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Sequence.h"
#include "llvm/ADT/StringExtras.h"
@ -25,7 +25,7 @@
namespace mlir {
namespace spirv {
#include "mlir/SPIRV/SPIRVOpUtils.inc"
#include "mlir/Dialect/SPIRV/SPIRVOpUtils.inc"
} // namespace spirv
} // namespace mlir
@ -43,7 +43,7 @@ SPIRVDialect::SPIRVDialect(MLIRContext *context)
addOperations<
#define GET_OP_LIST
#include "mlir/SPIRV/SPIRVOps.cpp.inc"
#include "mlir/Dialect/SPIRV/SPIRVOps.cpp.inc"
>();
// Allow unknown operations because SPIR-V is extensible.

View File

@ -19,17 +19,17 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/SPIRV/SPIRVTypes.h"
namespace mlir {
namespace spirv {
#include "mlir/SPIRV/SPIRVOpUtils.inc"
#include "mlir/Dialect/SPIRV/SPIRVOpUtils.inc"
} // namespace spirv
} // namespace mlir
@ -846,7 +846,7 @@ namespace mlir {
namespace spirv {
#define GET_OP_CLASSES
#include "mlir/SPIRV/SPIRVOps.cpp.inc"
#include "mlir/Dialect/SPIRV/SPIRVOps.cpp.inc"
} // namespace spirv
} // namespace mlir

View File

@ -19,7 +19,7 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/SPIRV/SPIRVTypes.h"
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
#include "mlir/IR/StandardTypes.h"
#include "llvm/ADT/StringSwitch.h"
@ -27,7 +27,7 @@ using namespace mlir;
using namespace mlir::spirv;
// Pull in all enum utility function definitions
#include "mlir/SPIRV/SPIRVEnums.cpp.inc"
#include "mlir/Dialect/SPIRV/SPIRVEnums.cpp.inc"
//===----------------------------------------------------------------------===//
// ArrayType

View File

@ -20,11 +20,11 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/Serialization.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
#include "mlir/IR/Module.h"
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/SPIRV/Serialization.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Translation.h"

View File

@ -20,10 +20,10 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/Serialization.h"
#include "mlir/IR/Function.h"
#include "mlir/IR/Module.h"
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/SPIRV/Serialization.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Translation.h"

View File

@ -19,13 +19,13 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/SPIRV/Serialization.h"
#include "mlir/Dialect/SPIRV/Serialization.h"
#include "SPIRVBinaryUtils.h"
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Location.h"
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/SPIRV/SPIRVTypes.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/SmallVector.h"

View File

@ -22,7 +22,7 @@
#ifndef MLIR_SPIRV_SERIALIZATION_SPIRV_BINARY_UTILS_H_
#define MLIR_SPIRV_SERIALIZATION_SPIRV_BINARY_UTILS_H_
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include <cstdint>
@ -35,7 +35,7 @@ constexpr unsigned kHeaderWordCount = 5;
/// SPIR-V magic number
constexpr uint32_t kMagicNumber = 0x07230203;
#include "mlir/SPIRV/SPIRVSerialization.inc"
#include "mlir/Dialect/SPIRV/SPIRVSerialization.inc"
} // end namespace spirv
} // end namespace mlir

View File

@ -19,12 +19,12 @@
//
//===----------------------------------------------------------------------===//
#include "mlir/SPIRV/Serialization.h"
#include "mlir/Dialect/SPIRV/Serialization.h"
#include "SPIRVBinaryUtils.h"
#include "mlir/SPIRV/SPIRVDialect.h"
#include "mlir/SPIRV/SPIRVOps.h"
#include "mlir/SPIRV/SPIRVTypes.h"
#include "mlir/Dialect/SPIRV/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/SPIRVTypes.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/SmallVector.h"