Skip to content

Commit

Permalink
NFC: Move LLVMIR, SDBM, and StandardOps to the Dialect/ directory.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 264193915
  • Loading branch information
River707 authored and tensorflower-gardener committed Aug 19, 2019
1 parent 636c414 commit 893e184
Show file tree
Hide file tree
Showing 96 changed files with 128 additions and 128 deletions.
2 changes: 1 addition & 1 deletion examples/Linalg/Linalg1/include/linalg1/Common.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "mlir/AffineOps/AffineOps.h"
#include "mlir/Analysis/SliceAnalysis.h"
#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/EDSC/Builders.h"
#include "mlir/EDSC/Helpers.h"
#include "mlir/EDSC/Intrinsics.h"
Expand All @@ -35,7 +36,6 @@
#include "mlir/IR/Types.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Transforms/LoopUtils.h"
#include "mlir/Transforms/Passes.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/Linalg/Linalg1/include/linalg1/LLVMIntrinsics.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#ifndef LINALG1_LLVMINTRINSICS_H_
#define LINALG1_LLVMINTRINSICS_H_

#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/EDSC/Builders.h"
#include "mlir/EDSC/Intrinsics.h"
#include "mlir/LLVMIR/LLVMDialect.h"

// Expose some LLVM IR instructions to declarative builders.
namespace intrinsics {
Expand Down
2 changes: 1 addition & 1 deletion examples/Linalg/Linalg1/lib/Common.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@
#include "linalg1/Common.h"
#include "linalg1/Ops.h"
#include "linalg1/Types.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/EDSC/Intrinsics.h"
#include "mlir/StandardOps/Ops.h"

using llvm::ArrayRef;
using mlir::ConstantIndexOp;
Expand Down
2 changes: 1 addition & 1 deletion examples/Linalg/Linalg1/lib/ConvertToLLVMDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/EDSC/Builders.h"
#include "mlir/EDSC/Intrinsics.h"
#include "mlir/IR/Attributes.h"
Expand All @@ -28,7 +29,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Support/LogicalResult.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/Linalg/Linalg3/lib/ConvertToLLVMDialect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#include "mlir/Conversion/ControlFlowToCFG/ConvertControlFlowToCFG.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVM.h"
#include "mlir/Conversion/StandardToLLVM/ConvertStandardToLLVMPass.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/EDSC/Builders.h"
#include "mlir/EDSC/Intrinsics.h"
#include "mlir/IR/Attributes.h"
Expand All @@ -28,7 +29,6 @@
#include "mlir/IR/PatternMatch.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/Transforms/DialectConversion.h"
#include "mlir/Transforms/LowerAffine.h"

Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch2/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
#include "toy/AST.h"

#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
Expand All @@ -32,7 +33,6 @@
#include "mlir/IR/Module.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/StandardOps/Ops.h"

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopedHashTable.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch3/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "toy/Dialect.h"

#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
Expand All @@ -33,7 +34,6 @@
#include "mlir/IR/Module.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/StandardOps/Ops.h"

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopedHashTable.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch4/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "toy/Dialect.h"

#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
Expand All @@ -33,7 +34,6 @@
#include "mlir/IR/Module.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/StandardOps/Ops.h"

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopedHashTable.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch4/mlir/ShapeInferencePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "toy/Dialect.h"

#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/LogicalResult.h"
#include "mlir/Support/STLExtras.h"
#include "llvm/ADT/DenseSet.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch5/mlir/EarlyLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@
#include "linalg1/Intrinsics.h"
#include "linalg1/ViewOp.h"
#include "linalg3/TensorOps.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/EDSC/Builders.h"
#include "mlir/EDSC/Helpers.h"
#include "mlir/EDSC/Intrinsics.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/Parser.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch5/mlir/LateLowering.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,13 @@
#include "linalg3/ConvertToLLVMDialect.h"
#include "linalg3/TensorOps.h"
#include "linalg3/Transforms.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/EDSC/Builders.h"
#include "mlir/EDSC/Helpers.h"
#include "mlir/EDSC/Intrinsics.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/LLVMIR/LLVMDialect.h"
#include "mlir/Parser.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Transforms/DialectConversion.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch5/mlir/MLIRGen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#include "toy/Dialect.h"

#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
Expand All @@ -33,7 +34,6 @@
#include "mlir/IR/Module.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/IR/Types.h"
#include "mlir/StandardOps/Ops.h"

#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/ScopedHashTable.h"
Expand Down
2 changes: 1 addition & 1 deletion examples/toy/Ch5/mlir/ShapeInferencePass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
#include "toy/Dialect.h"

#include "mlir/Analysis/Verifier.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/BlockAndValueMapping.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/StandardTypes.h"
#include "mlir/Pass/Pass.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Support/LogicalResult.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/STLExtras.h"
Expand Down
2 changes: 0 additions & 2 deletions include/mlir/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@ add_subdirectory(AffineOps)
add_subdirectory(Dialect)
add_subdirectory(EDSC)
add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(StandardOps)
add_subdirectory(VectorOps)
2 changes: 2 additions & 0 deletions include/mlir/Dialect/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
add_subdirectory(FxpMathOps)
add_subdirectory(GPU)
add_subdirectory(LLVMIR)
add_subdirectory(LoopOps)
add_subdirectory(QuantOps)
add_subdirectory(SPIRV)
add_subdirectory(StandardOps)
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_TARGET_LLVMDIALECT_H_
#define MLIR_TARGET_LLVMDIALECT_H_
#ifndef MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
#define MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_

#include "mlir/IR/Dialect.h"
#include "mlir/IR/Function.h"
Expand All @@ -34,7 +34,7 @@
#include "llvm/IR/Module.h"
#include "llvm/IR/Type.h"

#include "mlir/LLVMIR/LLVMOpsEnums.h.inc"
#include "mlir/Dialect/LLVMIR/LLVMOpsEnums.h.inc"

namespace llvm {
class Type;
Expand Down Expand Up @@ -145,7 +145,7 @@ class LLVMType : public mlir::Type::TypeBase<LLVMType, mlir::Type,

///// Ops /////
#define GET_OP_CLASSES
#include "mlir/LLVMIR/LLVMOps.h.inc"
#include "mlir/Dialect/LLVMIR/LLVMOps.h.inc"

class LLVMDialect : public Dialect {
public:
Expand Down Expand Up @@ -177,4 +177,4 @@ class LLVMDialect : public Dialect {
} // end namespace LLVM
} // end namespace mlir

#endif // MLIR_TARGET_LLVMDIALECT_H_
#endif // MLIR_DIALECT_LLVMIR_LLVMDIALECT_H_
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#else
#define LLVMIR_OPS

include "mlir/LLVMIR/LLVMOpBase.td"
include "mlir/Dialect/LLVMIR/LLVMOpBase.td"

// Base class for LLVM operations. All operations get an "llvm." prefix in
// their name automatically. LLVM operations have either zero or one result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_LLVMIR_NVVMDIALECT_H_
#define MLIR_LLVMIR_NVVMDIALECT_H_
#ifndef MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_
#define MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_

#include "mlir/IR/Dialect.h"
#include "mlir/IR/OpDefinition.h"
Expand All @@ -30,7 +30,7 @@ namespace NVVM {

///// Ops /////
#define GET_OP_CLASSES
#include "mlir/LLVMIR/NVVMOps.h.inc"
#include "mlir/Dialect/LLVMIR/NVVMOps.h.inc"

class NVVMDialect : public Dialect {
public:
Expand All @@ -40,4 +40,4 @@ class NVVMDialect : public Dialect {
} // namespace NVVM
} // namespace mlir

#endif /* MLIR_LLVMIR_NVVMDIALECT_H_ */
#endif /* MLIR_DIALECT_LLVMIR_NVVMDIALECT_H_ */
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#else
#define NVVMIR_OPS

include "mlir/LLVMIR/LLVMOpBase.td"
include "mlir/Dialect/LLVMIR/LLVMOpBase.td"

def NVVM_Dialect : Dialect {
let name = "nvvm";
Expand Down
6 changes: 3 additions & 3 deletions include/mlir/SDBM/SDBM.h → include/mlir/Dialect/SDBM/SDBM.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef INCLUDE_MLIR_IR_SDBM_H
#define INCLUDE_MLIR_IR_SDBM_H
#ifndef MLIR_DIALECT_SDBM_SDBM_H
#define MLIR_DIALECT_SDBM_SDBM_H

#include "mlir/Support/LLVM.h"
#include "llvm/ADT/DenseMap.h"
Expand Down Expand Up @@ -203,4 +203,4 @@ class SDBM {

} // namespace mlir

#endif // INCLUDE_MLIR_IR_SDBM_H
#endif // MLIR_DIALECT_SDBM_SDBM_H
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
// limitations under the License.
// =============================================================================

#ifndef MLIR_SDBM_SDBMDIALECT_H
#define MLIR_SDBM_SDBMDIALECT_H
#ifndef MLIR_DIALECT_SDBM_SDBMDIALECT_H
#define MLIR_DIALECT_SDBM_SDBMDIALECT_H

#include "mlir/IR/Dialect.h"
#include "mlir/Support/StorageUniquer.h"
Expand All @@ -38,4 +38,4 @@ class SDBMDialect : public Dialect {
};
} // namespace mlir

#endif // MLIR_SDBM_SDBMDIALECT_H
#endif // MLIR_DIALECT_SDBM_SDBMDIALECT_H
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_IR_SDBMEXPR_H
#define MLIR_IR_SDBMEXPR_H
#ifndef MLIR_DIALECT_SDBM_SDBMEXPR_H
#define MLIR_DIALECT_SDBM_SDBMEXPR_H

#include "mlir/Support/LLVM.h"
#include "llvm/ADT/DenseMapInfo.h"
Expand Down Expand Up @@ -527,4 +527,4 @@ template <> struct DenseMapInfo<mlir::SDBMConstantExpr> {
};
} // namespace llvm

#endif // MLIR_IR_SDBMEXPR_H
#endif // MLIR_DIALECT_SDBM_SDBMEXPR_H
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
//
//===----------------------------------------------------------------------===//

#ifndef MLIR_STANDARDOPS_OPS_H
#define MLIR_STANDARDOPS_OPS_H
#ifndef MLIR_DIALECT_STANDARDOPS_OPS_H
#define MLIR_DIALECT_STANDARDOPS_OPS_H

#include "mlir/IR/Attributes.h"
#include "mlir/IR/Builders.h"
Expand Down Expand Up @@ -94,7 +94,7 @@ enum class CmpFPredicate {
};

#define GET_OP_CLASSES
#include "mlir/StandardOps/Ops.h.inc"
#include "mlir/Dialect/StandardOps/Ops.h.inc"

/// This is a refinement of the "constant" op for the case where it is
/// returning a float value of FloatType.
Expand Down Expand Up @@ -360,4 +360,4 @@ ParseResult parseDimAndSymbolList(OpAsmParser *parser,

} // end namespace mlir

#endif // MLIR_STANDARDOPS_OPS_H
#endif // MLIR_DIALECT_STANDARDOPS_OPS_H
File renamed without changes.
2 changes: 1 addition & 1 deletion include/mlir/EDSC/Builders.h
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
#define MLIR_EDSC_BUILDERS_H_

#include "mlir/AffineOps/AffineOps.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/Builders.h"
#include "mlir/StandardOps/Ops.h"
#include "mlir/Transforms/FoldUtils.h"
#include "mlir/VectorOps/VectorOps.h"

Expand Down
2 changes: 1 addition & 1 deletion include/mlir/Transforms/Utils.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
#ifndef MLIR_TRANSFORMS_UTILS_H
#define MLIR_TRANSFORMS_UTILS_H

#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"

Expand Down
2 changes: 1 addition & 1 deletion lib/AffineOps/AffineOps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,14 @@
// =============================================================================

#include "mlir/AffineOps/AffineOps.h"
#include "mlir/Dialect/StandardOps/Ops.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Function.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/Matchers.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/StandardOps/Ops.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallBitVector.h"
#include "llvm/Support/Debug.h"
Expand Down
Loading

0 comments on commit 893e184

Please sign in to comment.