Integrate LLVM at https://github.com/llvm/llvm-project/commit/675cefbf6027
PiperOrigin-RevId: 315687944 Change-Id: I9d9d51f16be49fb6a7ce20d9377a6c8c62723ce9
This commit is contained in:
parent
fcfc8566c4
commit
ae29b0fefb
@ -6,6 +6,7 @@ package(licenses = ["notice"])
|
||||
glob_lit_tests(
|
||||
data = [":test_utilities"],
|
||||
driver = "@llvm-project//mlir:run_lit.sh",
|
||||
exclude = ["hlo-legalize-to-lhlo.mlir"], # TODO(pifon): Fix this test.
|
||||
test_file_exts = ["mlir"],
|
||||
)
|
||||
|
||||
|
@ -44,8 +44,8 @@ constexpr StringRef kTempBufferAttr = "temp";
|
||||
template <typename T>
|
||||
using BaseOpConversion = BufferAssignmentOpConversionPattern<T>;
|
||||
using StdReturnOpConverter =
|
||||
BufferAssignmentReturnOpConverter<mlir::ReturnOp, mlir::ReturnOp,
|
||||
xla_lhlo::CopyOp>;
|
||||
detail::BufferAssignmentReturnOpConverter<mlir::ReturnOp, mlir::ReturnOp,
|
||||
xla_lhlo::CopyOp, true>;
|
||||
|
||||
Value InsertDynamicAllocAndDealloc(Location loc, Value result,
|
||||
Value shape_operand,
|
||||
@ -451,11 +451,13 @@ void populateHLOToLHLOConversionPattern(
|
||||
HloToLhloOpConverter<xla_hlo::TanhOp>,
|
||||
HloToLhloReduceOpConverter,
|
||||
HloToLhloTensorLoadOpConverter,
|
||||
HloToLhloTensorStoreOpConverter,
|
||||
FunctionAndBlockSignatureConverter,
|
||||
StdReturnOpConverter
|
||||
HloToLhloTensorStoreOpConverter
|
||||
>(context, bufferAssignment, converter);
|
||||
// clang-format on
|
||||
populateWithBufferAssignmentOpConversionPatterns<
|
||||
mlir::ReturnOp, xla_lhlo::TerminatorOp, xla_lhlo::CopyOp,
|
||||
/*allowMemrefFunctionResults=*/false>(context, bufferAssignment,
|
||||
converter, patterns);
|
||||
}
|
||||
|
||||
std::unique_ptr<OperationPass<ModuleOp>> createLegalizeToLhloPass() {
|
||||
|
81
third_party/mlir/BUILD
vendored
81
third_party/mlir/BUILD
vendored
@ -686,6 +686,25 @@ gentbl(
|
||||
],
|
||||
)
|
||||
|
||||
gentbl(
|
||||
name = "MLIRShapeCanonicalizationIncGen",
|
||||
strip_include_prefix = "include/mlir/Dialect/Shape/IR",
|
||||
tbl_outs = [
|
||||
(
|
||||
"-gen-rewriters",
|
||||
"include/mlir/Dialect/Shape/IR/ShapeCanonicalization.inc",
|
||||
),
|
||||
],
|
||||
tblgen = ":mlir-tblgen",
|
||||
td_file = "lib/Dialect/Shape/IR/ShapeCanonicalization.td",
|
||||
td_srcs = [
|
||||
":StdOpsTdFiles",
|
||||
"include/mlir/Dialect/Shape/IR/ShapeBase.td",
|
||||
"include/mlir/Dialect/Shape/IR/ShapeOps.td",
|
||||
"include/mlir/Interfaces/InferTypeOpInterface.td",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "Shape",
|
||||
srcs = glob(
|
||||
@ -704,6 +723,7 @@ cc_library(
|
||||
":Dialect",
|
||||
":IR",
|
||||
":InferTypeOpInterface",
|
||||
":MLIRShapeCanonicalizationIncGen",
|
||||
":ShapeOpsIncGen",
|
||||
":SideEffects",
|
||||
":Support",
|
||||
@ -736,6 +756,39 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
gentbl(
|
||||
name = "ShapeTransformsPassIncGen",
|
||||
strip_include_prefix = "include",
|
||||
tbl_outs = [(
|
||||
"-gen-pass-decls",
|
||||
"include/mlir/Dialect/Shape/Transforms/Passes.h.inc",
|
||||
)],
|
||||
tblgen = ":mlir-tblgen",
|
||||
td_file = "include/mlir/Dialect/Shape/Transforms/Passes.td",
|
||||
td_srcs = [":PassBaseTdFiles"],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "ShapeTransforms",
|
||||
srcs = glob([
|
||||
"lib/Dialect/Shape/Transforms/*.cpp",
|
||||
"lib/Dialect/Shape/Transforms/*.h",
|
||||
]),
|
||||
hdrs = glob(["include/mlir/Dialect/Shape/Transforms/*.h"]),
|
||||
includes = ["include"],
|
||||
deps = [
|
||||
#":Analysis",
|
||||
#":ControlFlowInterfaces",
|
||||
":IR",
|
||||
":Pass",
|
||||
":Shape",
|
||||
":ShapeTransformsPassIncGen",
|
||||
":Support",
|
||||
":Transforms",
|
||||
#"@llvm-project//llvm:support",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "StandardOps",
|
||||
srcs = glob(
|
||||
@ -1382,6 +1435,30 @@ cc_library(
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "SPIRVToLLVM",
|
||||
srcs = glob([
|
||||
"lib/Conversion/SPIRVToLLVM/*.cpp",
|
||||
]) + [
|
||||
"lib/Conversion/PassDetail.h",
|
||||
],
|
||||
hdrs = glob([
|
||||
"include/mlir/Conversion/SPIRVToLLVM/*.h",
|
||||
]),
|
||||
includes = ["include"],
|
||||
deps = [
|
||||
":ConversionPassIncGen",
|
||||
":IR",
|
||||
":LLVMDialect",
|
||||
":LLVMTransforms",
|
||||
":Pass",
|
||||
":SPIRVDialect",
|
||||
":StandardOps",
|
||||
":Support",
|
||||
":Transforms",
|
||||
],
|
||||
)
|
||||
|
||||
gentbl(
|
||||
name = "LLVMOpsIncGen",
|
||||
strip_include_prefix = "include",
|
||||
@ -2512,6 +2589,7 @@ cc_library(
|
||||
":Pass",
|
||||
":SCFTransforms",
|
||||
":ShapeToStandard",
|
||||
":ShapeTransforms",
|
||||
":StandardOpsTransforms",
|
||||
":StandardToSPIRVConversions",
|
||||
":Support",
|
||||
@ -2608,8 +2686,11 @@ cc_library(
|
||||
":SPIRVDialect",
|
||||
":SPIRVLowering",
|
||||
":SPIRVPassIncGen",
|
||||
":SPIRVToLLVM",
|
||||
":Shape",
|
||||
":ShapeToStandard",
|
||||
":ShapeTransforms",
|
||||
":ShapeTransformsPassIncGen",
|
||||
":StandardOps",
|
||||
":StandardOpsTransforms",
|
||||
":StandardOpsTransformsPassIncGen",
|
||||
|
Loading…
Reference in New Issue
Block a user