From e5a6706260c3a748640bd3099a643a654c44bf5c Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 4 Mar 2021 05:21:32 -0800 Subject: [PATCH] Integrate LLVM at llvm/llvm-project@c907681b077c Updates LLVM usage to match [c907681b077c](https://github.com/llvm/llvm-project/commit/c907681b077c) PiperOrigin-RevId: 360891677 --- WORKSPACE | 4 ++-- build_tools/llvm_version.txt | 2 +- include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td | 4 ++-- include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td | 16 ++++++++-------- include/mlir-hlo/Dialect/mhlo/IR/lhlo_ops.td | 4 ++-- 5 files changed, 15 insertions(+), 15 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 958cf40..2b9851a 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -15,9 +15,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive") -LLVM_COMMIT = "5d7e0a23c6f2051d4caf8f8c8821790c40b584be" +LLVM_COMMIT = "c907681b077c6acf95c3ddca6611639c29559e40" -LLVM_SHA256 = "dc100f5eddb35b694454ecc8cbf654b238f2e2684784d33d40536500297e9212" +LLVM_SHA256 = "2929f1730e9ba4fea489400d81e5da21a4e79c94fea9dd3fd12e042350ff19ea" LLVM_BAZEL_TAG = "llvm-project-{commit}".format(commit = LLVM_COMMIT) diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt index 1c6d3bc..45567e1 100644 --- a/build_tools/llvm_version.txt +++ b/build_tools/llvm_version.txt @@ -1,2 +1,2 @@ -5d7e0a23c6f2051d4caf8f8c8821790c40b584be +c907681b077c6acf95c3ddca6611639c29559e40 diff --git a/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td b/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td index 9a42d95..b3f81a0 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td +++ b/include/mlir-hlo/Dialect/mhlo/IR/chlo_ops.td @@ -90,7 +90,7 @@ class HLOClient_BroadcastBinaryElementwiseOp< ); let builders = [ - OpBuilderDAG<(ins "Value":$left, "Value":$right, + OpBuilder<(ins "Value":$left, "Value":$right, "DenseIntElementsAttr":$broadcast_dimensions)>]; let results = (outs HLO_Tensor); @@ -673,7 +673,7 @@ def HLOClient_BroadcastCompareOp : HLOClient_BroadcastBinaryElementwiseOp< let results = (outs HLO_PredTensor); let builders = [ - OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, + OpBuilder<(ins "Value":$lhs, "Value":$rhs, "DenseIntElementsAttr":$broadcast_dimensions, "StringAttr":$comparison_direction, CArg<"StringAttr", "{}">:$compare_type)>]; } diff --git a/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td b/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td index 519873d..f37ae03 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td +++ b/include/mlir-hlo/Dialect/mhlo/IR/hlo_ops.td @@ -61,7 +61,7 @@ def HLO_ConstOp : HLO_Op<"constant", ); let builders = [ - OpBuilderDAG<(ins "Attribute":$value)>]; + OpBuilder<(ins "Attribute":$value)>]; let assemblyFormat = "attr-dict $value"; @@ -163,7 +163,7 @@ def HLO_ConvertOp : HLO_UnaryElementwiseOp<"convert", [NoSideEffect, SameOperandsAndResultShape], HLO_Tensor>, BASE_HLO_ConvertOp { let builders = [ - OpBuilderDAG<(ins "Value":$operand, "Type":$result_element_ty)>]; + OpBuilder<(ins "Value":$operand, "Type":$result_element_ty)>]; let hasFolder = 1; @@ -624,7 +624,7 @@ def HLO_ReduceOp: HLO_Op<"reduce", [ let results = (outs Variadic); let builders = [ - OpBuilderDAG<(ins "ValueRange":$operands, "ValueRange":$init_values, + OpBuilder<(ins "ValueRange":$operands, "ValueRange":$init_values, "DenseIntElementsAttr":$dimensions)>]; let extraClassDeclaration = [{ @@ -662,7 +662,7 @@ def HLO_GetTupleElementOp: HLO_Op<"get_tuple_element", [NoSideEffect]>, BASE_HLO let hasFolder = 1; let builders = [ - OpBuilderDAG<(ins "Value":$value, "int32_t":$index)>]; + OpBuilder<(ins "Value":$value, "int32_t":$index)>]; } def HLO_TupleOp : HLO_Op<"tuple", [NoSideEffect]>, BASE_HLO_TupleOp { @@ -670,7 +670,7 @@ def HLO_TupleOp : HLO_Op<"tuple", [NoSideEffect]>, BASE_HLO_TupleOp { let results = (outs HLO_Tuple); let builders = [ - OpBuilderDAG<(ins "ValueRange":$values)>]; + OpBuilder<(ins "ValueRange":$values)>]; let hasCanonicalizer = 1; } @@ -690,7 +690,7 @@ def HLO_CompareOp: HLO_Op<"compare", [NoSideEffect, SameTypeOperands, let hasFolder = 1; let builders = [ - OpBuilderDAG<(ins "Value":$lhs, "Value":$rhs, + OpBuilder<(ins "Value":$lhs, "Value":$rhs, "StringAttr":$comparison_direction, CArg<"StringAttr", "{}">:$compare_type)>, ]; @@ -889,7 +889,7 @@ def HLO_ConcatenateOp : HLO_Op<"concatenate", let hasFolder = 1; let extraClassDeclaration = [{ - static bool isCompatibleReturnTypes(ArrayRef l, ArrayRef r) { + static bool isCompatibleReturnTypes(TypeRange l, TypeRange r) { return succeeded(mlir::verifyCompatibleShapes(l, r)); } }]; @@ -1170,7 +1170,7 @@ def HLO_SortOp : HLO_Op<"sort", [RecursiveSideEffects, let regions = (region SizedRegion<1>:$comparator); let builders = [ - OpBuilderDAG<(ins "ValueRange":$operands, CArg<"int64_t", "-1">:$dimension, + OpBuilder<(ins "ValueRange":$operands, CArg<"int64_t", "-1">:$dimension, CArg<"bool", "false">:$is_stable)>]; // TODO(b/129422361): SortOp has special conversion logic to HLO. diff --git a/include/mlir-hlo/Dialect/mhlo/IR/lhlo_ops.td b/include/mlir-hlo/Dialect/mhlo/IR/lhlo_ops.td index e2f835a..64bc6a2 100644 --- a/include/mlir-hlo/Dialect/mhlo/IR/lhlo_ops.td +++ b/include/mlir-hlo/Dialect/mhlo/IR/lhlo_ops.td @@ -691,7 +691,7 @@ def FusionOp : LHLO_Op<"fusion", [SingleBlockImplicitTerminator<"TerminatorOp">] let skipDefaultBuilders = 1; let builders = [ - OpBuilderDAG<(ins CArg<"ArrayRef", "{}">:$attributes)> + OpBuilder<(ins CArg<"ArrayRef", "{}">:$attributes)> ]; let extraClassDeclaration = [{ @@ -740,7 +740,7 @@ def TerminatorOp : Terminator operation for the LHLO dialect. }]; let builders = [ - OpBuilderDAG<(ins "ValueRange":$operands), + OpBuilder<(ins "ValueRange":$operands), [{ build($_builder, $_state, llvm::None, operands, llvm::None); }]>]; }