Use consistent names for dialect op source files

This CL changes dialect op source files (.h, .cpp, .td) to follow the following
convention:

  <full-dialect-name>/<dialect-namespace>Ops.{h|cpp|td}

Builtin and standard dialects are specially treated, though. Both of them do
not have dialect namespace; the former is still named as BuiltinOps.* and the
latter is named as Ops.*.

Purely mechanical. NFC.

PiperOrigin-RevId: 236371358
This commit is contained in:
Lei Zhang 2019-03-01 13:48:24 -08:00 committed by jpienaar
parent 8254aabd4a
commit 85d9b6c8f7
37 changed files with 45 additions and 45 deletions

View File

@ -1,4 +1,4 @@
//===- BuiltinOps.h - Builtin MLIR Operations -----------------*- C++ -*-===//
//===- BuiltinOps.h - Builtin MLIR Operations -------------------*- C++ -*-===//
//
// Copyright 2019 The MLIR Authors.
//

View File

@ -1,4 +1,4 @@
//===-- op_base.td - Base op definition file ---------------*- tablegen -*-===//
//===-- OpBase.td - Base op definition file ----------------*- tablegen -*-===//
//
// Copyright 2019 The MLIR Authors.
//

View File

@ -67,7 +67,7 @@ public:
///// Ops /////
#define GET_OP_CLASSES
#include "mlir/LLVMIR/llvm_ops.inc"
#include "mlir/LLVMIR/LLVMOps.inc"
namespace LLVM {
class LLVMDialect : public Dialect {

View File

@ -1,4 +1,4 @@
//===-- llvm_ops.td - LLVM IR dialect op definition file ---*- tablegen -*-===//
//===-- LLVMOps.td - LLVM IR dialect op definition file ----*- tablegen -*-===//
//
// Copyright 2019 The MLIR Authors.
//
@ -25,7 +25,7 @@
#ifdef OP_BASE
#else
include "mlir/IR/op_base.td"
include "mlir/IR/OpBase.td"
#endif // OP_BASE
// LLVM IR type wrapped in MLIR.

View File

@ -1,4 +1,4 @@
//===- StandardOps.h - Standard MLIR Operations -----------------*- C++ -*-===//
//===- Ops.h - Standard MLIR Operations -------------------------*- C++ -*-===//
//
// Copyright 2019 The MLIR Authors.
//
@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_STANDARDOPS_STANDARDOPS_H
#define MLIR_STANDARDOPS_STANDARDOPS_H
#ifndef MLIR_STANDARDOPS_OPS_H
#define MLIR_STANDARDOPS_OPS_H
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Dialect.h"
@ -38,7 +38,7 @@ public:
};
#define GET_OP_CLASSES
#include "mlir/StandardOps/standard_ops.inc"
#include "mlir/StandardOps/Ops.inc"
/// The "alloc" operation allocates a region of memory, as specified by its
/// memref type. For example:
@ -751,4 +751,4 @@ private:
} // end namespace mlir
#endif
#endif // MLIR_STANDARDOPS_OPS_H

View File

@ -1,4 +1,4 @@
//===- standard_ops.td - Standard operation definitions ----*- tablegen -*-===//
//===- Ops.td - Standard operation definitions -------------*- tablegen -*-===//
//
// Copyright 2019 The MLIR Authors.
//
@ -25,7 +25,7 @@
#ifdef OP_BASE
#else
include "mlir/IR/op_base.td"
include "mlir/IR/OpBase.td"
#endif // OP_BASE
def AnyType : Type<CPred<"true">, "any type">;

View File

@ -23,7 +23,7 @@
#include "mlir/IR/Matchers.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/Support/Debug.h"
using namespace mlir;

View File

@ -29,7 +29,7 @@
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Instruction.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/MathExtras.h"
#include "mlir/Support/STLExtras.h"
#include "llvm/ADT/DenseMap.h"

View File

@ -29,7 +29,7 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Instruction.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/MathExtras.h"

View File

@ -27,7 +27,7 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/Support/Debug.h"
#define DEBUG_TYPE "memref-bound-check"

View File

@ -26,7 +26,7 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/Support/Debug.h"
#define DEBUG_TYPE "memref-dependence-check"

View File

@ -17,7 +17,7 @@
#include "mlir/Analysis/NestedMatcher.h"
#include "mlir/AffineOps/AffineOps.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/STLExtras.h"

View File

@ -27,7 +27,7 @@
#include "mlir/Analysis/AffineStructures.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/raw_ostream.h"

View File

@ -22,7 +22,7 @@
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Instruction.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/STLExtras.h"

View File

@ -25,7 +25,7 @@
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/LoopUtils.h"
#include "llvm/Support/raw_ostream.h"

View File

@ -32,7 +32,7 @@
#include "mlir/IR/Location.h"
#include "mlir/IR/OpDefinition.h"
#include "mlir/IR/Value.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/STLExtras.h"

View File

@ -27,7 +27,7 @@
#include "mlir/IR/Function.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/STLExtras.h"

View File

@ -68,7 +68,7 @@ LLVMDialect::LLVMDialect(MLIRContext *context)
addTypes<LLVMType>();
#define GET_OP_LIST
addOperations<
#include "mlir/LLVMIR/llvm_ops.inc"
#include "mlir/LLVMIR/LLVMOps.inc"
>();
}

View File

@ -27,7 +27,7 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/Functional.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/Passes.h"

View File

@ -15,7 +15,7 @@
// limitations under the License.
// =============================================================================
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
using namespace mlir;
// Static initialization for standard op dialect registration.

View File

@ -1,4 +1,4 @@
//===- StandardOps.cpp - Standard MLIR Operations -------------------------===//
//===- Ops.cpp - Standard MLIR Operations ---------------------------------===//
//
// Copyright 2019 The MLIR Authors.
//
@ -15,7 +15,7 @@
// limitations under the License.
// =============================================================================
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Builders.h"
@ -41,7 +41,7 @@ StandardOpsDialect::StandardOpsDialect(MLIRContext *context)
DmaStartOp, DmaWaitOp, ExtractElementOp, LoadOp, MemRefCastOp,
SelectOp, StoreOp, TensorCastOp,
#define GET_OP_LIST
#include "mlir/StandardOps/standard_ops.inc"
#include "mlir/StandardOps/Ops.inc"
>();
}

View File

@ -22,7 +22,7 @@
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Module.h"
#include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LLVM.h"
#include "mlir/Translation.h"

View File

@ -27,7 +27,7 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/Transforms/Utils.h"
#include "llvm/ADT/MapVector.h"

View File

@ -29,7 +29,7 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/LoopUtils.h"
#include "mlir/Transforms/Passes.h"
#include "mlir/Transforms/Utils.h"

View File

@ -27,7 +27,7 @@
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/MLIRContext.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/Functional.h"
#include "mlir/Transforms/Passes.h"
using namespace mlir;

View File

@ -37,7 +37,7 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/Types.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/Functional.h"
#include "mlir/Transforms/MLPatternLoweringPass.h"

View File

@ -37,7 +37,7 @@
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/Types.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/LLVM.h"

View File

@ -26,7 +26,7 @@
#include "mlir/Analysis/Dominance.h"
#include "mlir/Analysis/Utils.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/Passes.h"
#include "llvm/ADT/SmallPtrSet.h"
#include <algorithm>

View File

@ -27,7 +27,7 @@
#include "mlir/Analysis/Utils.h"
#include "mlir/IR/Builders.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/LoopUtils.h"
#include "mlir/Transforms/Utils.h"
#include "llvm/ADT/DenseMap.h"

View File

@ -31,7 +31,7 @@
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Instruction.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/Support/Debug.h"

View File

@ -29,7 +29,7 @@
#include "mlir/Analysis/Utils.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Module.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/MathExtras.h"
#include "llvm/ADT/DenseMap.h"
using namespace mlir;

View File

@ -30,7 +30,7 @@
#include "mlir/IR/Location.h"
#include "mlir/IR/Types.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/SuperVectorOps/SuperVectorOps.h"
#include "mlir/Support/Functional.h"
#include "mlir/Support/LLVM.h"

View File

@ -27,7 +27,7 @@
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/StandardOps.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/LoopUtils.h"
#include "Test.h"

View File

@ -1,6 +1,6 @@
// RUN: mlir-tblgen -gen-rewriters -I %S/../../include %s | FileCheck %s
include "mlir/IR/op_base.td"
include "mlir/IR/OpBase.td"
// Create a Type and Attribute.
def T : BuildableType<"buildT">;

View File

@ -1,6 +1,6 @@
// RUN: mlir-tblgen -gen-op-definitions -I %S/../../include %s | FileCheck %s
include "mlir/IR/op_base.td"
include "mlir/IR/OpBase.td"
def SameTypeOp : Op<"same_type_op", [SameValueType]> {
let arguments = (ins I32:$x);

View File

@ -1,6 +1,6 @@
// RUN: mlir-tblgen -gen-op-definitions -I %S/../../include %s | FileCheck %s
include "mlir/IR/op_base.td"
include "mlir/IR/OpBase.td"
def I32OrF32 : Type<CPred<"{0}.isInteger(32) || {0}.isF32()">,
"32-bit integer or floating-point type">;

View File

@ -2,7 +2,7 @@
#ifdef OP_BASE
#else
include "mlir/IR/op_base.td"
include "mlir/IR/OpBase.td"
#endif // OP_BASE
def X_AddOp : Op<"x.add">,