Integrate LLVM at llvm/llvm-project@2c3ca3b (#319)
Updates LLVM usage to match llvm/llvm-project@2c3ca3b.
diff --git a/build_tools/llvm_version.txt b/build_tools/llvm_version.txt
index 0c8bd9e..48ded9a 100644
--- a/build_tools/llvm_version.txt
+++ b/build_tools/llvm_version.txt
@@ -1 +1 @@
-131dda9acc6978aba4740d75ca45f411fbabd726
+2c3ca3b684bb2b188d977d47548e79dc559fb8ad
diff --git a/lib/Dialect/EmitC/Conversion/MHLOToEmitC.cpp b/lib/Dialect/EmitC/Conversion/MHLOToEmitC.cpp
index 6b8380a..074f2f6 100644
--- a/lib/Dialect/EmitC/Conversion/MHLOToEmitC.cpp
+++ b/lib/Dialect/EmitC/Conversion/MHLOToEmitC.cpp
@@ -299,8 +299,7 @@
ArrayAttr args;
ArrayAttr templateArgs = rewriter.getArrayAttr(
{TypeAttr::get(elementType),
- emitc::OpaqueAttr::get(ctx, NoneType::get(ctx),
- functionName.getValue())});
+ emitc::OpaqueAttr::get(ctx, functionName.getValue())});
rewriter.replaceOpWithNewOp<emitc::CallOp>(compareOp, compareOp.getType(),
callee, args, templateArgs,
diff --git a/lib/Dialect/EmitC/Conversion/TosaToEmitC.cpp b/lib/Dialect/EmitC/Conversion/TosaToEmitC.cpp
index 2bd5a7b..3b13d18 100644
--- a/lib/Dialect/EmitC/Conversion/TosaToEmitC.cpp
+++ b/lib/Dialect/EmitC/Conversion/TosaToEmitC.cpp
@@ -262,7 +262,7 @@
// the min/max attribute type match the operand's element type and it's bit
// width.
auto elementType =
- adaptor.input().getType().cast<RankedTensorType>().getElementType();
+ adaptor.getInput().getType().cast<RankedTensorType>().getElementType();
if (elementType.isa<IntegerType>()) {
// Change the {min,max}_int type to the element type of the operand.
auto minInt = clampOp.getMinInt();
@@ -342,9 +342,9 @@
rescaleOp.getOutputZpAttr(),
getI64ElementsAttr(rescaleOp.getMultiplierAttr(), rescaleOp.getContext()),
getI64ElementsAttr(rescaleOp.getShiftAttr(), rescaleOp.getContext()),
- rescaleOp.scale32Attr(),
- rescaleOp.double_roundAttr(),
- rescaleOp.per_channelAttr()
+ rescaleOp.getScale32Attr(),
+ rescaleOp.getDoubleRoundAttr(),
+ rescaleOp.getPerChannelAttr()
});
// clang-format on
@@ -385,7 +385,7 @@
// the max attribute type match the operand's element type and it's bit
// width.
auto elementType =
- adaptor.input().getType().cast<RankedTensorType>().getElementType();
+ adaptor.getInput().getType().cast<RankedTensorType>().getElementType();
if (elementType.isa<IntegerType>()) {
// Change the max_int type to the element type of the operand.
auto maxInt = reluNOp.getMaxInt();
@@ -743,7 +743,7 @@
// have to handle any conversion in tosa::pad.
ArrayAttr args;
- Type resultType = padOp.output().getType();
+ Type resultType = padOp.getOutput().getType();
ArrayAttr templateArgs = rewriter.getArrayAttr({TypeAttr::get(resultType)});
rewriter.replaceOpWithNewOp<emitc::CallOp>(padOp, padOp.getType(), callee,
@@ -776,7 +776,7 @@
});
// clang-format on
- Type resultType = sliceOp.output().getType();
+ Type resultType = sliceOp.getOutput().getType();
ArrayAttr templateArgs = rewriter.getArrayAttr({TypeAttr::get(resultType)});
rewriter.replaceOpWithNewOp<emitc::CallOp>(sliceOp, sliceOp.getType(),