diff --git a/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp b/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp --- a/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp +++ b/mlir/lib/Dialect/X86Vector/Transforms/LegalizeForLLVMExport.cpp @@ -115,7 +115,7 @@ auto opType = adaptor.a().getType(); Type llvmIntType = IntegerType::get(&getTypeConverter()->getContext(), 8); // Dot product of all elements, broadcasted to all elements. - auto attr = rewriter.getI8IntegerAttr(0xff); + auto attr = rewriter.getI8IntegerAttr(static_cast(0xff)); Value scale = rewriter.create(op.getLoc(), llvmIntType, attr); rewriter.replaceOpWithNewOp(op, opType, adaptor.a(), adaptor.b(), diff --git a/mlir/lib/Transforms/ViewOpGraph.cpp b/mlir/lib/Transforms/ViewOpGraph.cpp --- a/mlir/lib/Transforms/ViewOpGraph.cpp +++ b/mlir/lib/Transforms/ViewOpGraph.cpp @@ -71,7 +71,7 @@ class PrintOpPass : public ViewOpGraphPassBase { public: PrintOpPass(raw_ostream &os) : os(os) {} - PrintOpPass(const PrintOpPass &o) : os(o.os.getOStream()) {} + PrintOpPass(const PrintOpPass &o) : PrintOpPass(o.os.getOStream()) {} void runOnOperation() override { emitGraph([&]() { diff --git a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp --- a/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp +++ b/mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp @@ -341,10 +341,6 @@ // Generate methods for accessing the attribute names of this operation. void genAttrNameGetters(); - // Return the index of the given attribute name. This is a relative ordering - // for this name, used in attribute getters. - unsigned getAttrNameIndex(StringRef attrName) const; - // Generates the OpAsmOpInterface for this operation if possible. void genOpAsmInterface(); @@ -750,13 +746,6 @@ } } -unsigned OpEmitter::getAttrNameIndex(StringRef attrName) const { - auto it = attributeNames.find(attrName); - assert(it != attributeNames.end() && "expected attribute name to have been " - "registered in genAttrNameGetters"); - return it->second; -} - void OpEmitter::genAttrGetters() { FmtContext fctx; fctx.withBuilder("::mlir::Builder((*this)->getContext())");