[mlir] Update accessors prefixed form (NFC)

GitOrigin-RevId: 62fea88bc588fd75e22495dd0d00e14fe575e4b4
diff --git a/include/mlir/Dialect/LLVMIR/LLVMOps.td b/include/mlir/Dialect/LLVMIR/LLVMOps.td
index e1d1d4f..f905337 100644
--- a/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -601,8 +601,8 @@
     OpBuilder<(ins "Value":$v1, "Value":$v2, "ArrayAttr":$mask,
       CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs)>];
   let verifier = [{
-    auto type1 = v1().getType();
-    auto type2 = v2().getType();
+    auto type1 = getV1().getType();
+    auto type2 = getV2().getType();
     if (::mlir::LLVM::getVectorElementType(type1) !=
             ::mlir::LLVM::getVectorElementType(type2))
       return emitOpError("expected matching LLVM IR Dialect element types");
@@ -701,7 +701,7 @@
   let arguments = (ins LLVM_Type:$value);
   string llvmBuilder = [{ builder.CreateResume($value); }];
   let verifier = [{
-    if (!isa_and_nonnull<LandingpadOp>(value().getDefiningOp()))
+    if (!isa_and_nonnull<LandingpadOp>(getValue().getDefiningOp()))
       return emitOpError("expects landingpad value as operand");
     // No check for personality of function - landingpad op verifies it.
     return success();
@@ -753,13 +753,13 @@
   let extraClassDeclaration = [{
     /// Return the operands for the case destination block at the given index.
     OperandRange getCaseOperands(unsigned index) {
-      return caseOperands()[index];
+      return getCaseOperands()[index];
     }
 
     /// Return a mutable range of operands for the case destination block at the
     /// given index.
     MutableOperandRange getCaseOperandsMutable(unsigned index) {
-      return caseOperandsMutable()[index];
+      return getCaseOperandsMutable()[index];
     }
   }];
 }
@@ -870,8 +870,8 @@
       CArg<"ArrayRef<NamedAttribute>", "{}">:$attrs),
     [{
       build($_builder, $_state,
-            LLVM::LLVMPointerType::get(global.getType(), global.addr_space()),
-            global.sym_name());
+            LLVM::LLVMPointerType::get(global.getType(), global.getAddrSpace()),
+            global.getSymName());
       $_state.addAttributes(attrs);
     }]>,
     OpBuilder<(ins "LLVMFuncOp":$func,
@@ -1126,7 +1126,7 @@
     }
     /// Return the initializer attribute if it exists, or a null attribute.
     Attribute getValueOrNull() {
-      return value().getValueOr(Attribute());
+      return getValue().getValueOr(Attribute());
     }
     /// Return the initializer region. This may be empty, but if it is not it
     /// terminates in an `llvm.return` op with the initializer value.
diff --git a/include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td b/include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td
index 4955186..671e19a 100644
--- a/include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td
+++ b/include/mlir/Dialect/LLVMIR/LLVMOpsInterfaces.td
@@ -24,7 +24,7 @@
 
   let methods = [
     InterfaceMethod<"Get fastmath flags", "::mlir::LLVM::FastmathFlags",
-                    "fastmathFlags">,
+                    "getFastmathFlags">,
   ];
 }
 
diff --git a/include/mlir/Dialect/StandardOps/IR/Ops.td b/include/mlir/Dialect/StandardOps/IR/Ops.td
index d9df01b..315909b 100644
--- a/include/mlir/Dialect/StandardOps/IR/Ops.td
+++ b/include/mlir/Dialect/StandardOps/IR/Ops.td
@@ -220,7 +220,7 @@
 
   let extraClassDeclaration = [{
     MemRefType getMemRefType() {
-      return memref().getType().cast<MemRefType>();
+      return getMemref().getType().cast<MemRefType>();
     }
   }];
 }
@@ -276,7 +276,7 @@
       return getRegion().getArgument(0);
     }
     MemRefType getMemRefType() {
-      return memref().getType().cast<MemRefType>();
+      return getMemref().getType().cast<MemRefType>();
     }
   }];
 }
@@ -555,7 +555,7 @@
 
     /// Erase the operand at 'index' from the true operand list.
     void eraseTrueOperand(unsigned index)  {
-      trueDestOperandsMutable().erase(index);
+      getTrueDestOperandsMutable().erase(index);
     }
 
     // Accessors for operands to the 'false' destination.
@@ -575,7 +575,7 @@
 
     /// Erase the operand at 'index' from the false operand list.
     void eraseFalseOperand(unsigned index) {
-      falseDestOperandsMutable().erase(index);
+      getFalseDestOperandsMutable().erase(index);
     }
 
   private:
@@ -889,13 +889,13 @@
   let extraClassDeclaration = [{
     /// Return the operands for the case destination block at the given index.
     OperandRange getCaseOperands(unsigned index) {
-      return caseOperands()[index];
+      return getCaseOperands()[index];
     }
 
     /// Return a mutable range of operands for the case destination block at the
     /// given index.
     MutableOperandRange getCaseOperandsMutable(unsigned index) {
-      return caseOperandsMutable()[index];
+      return getCaseOperandsMutable()[index];
     }
   }];
 
diff --git a/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp b/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
index 99e15a2..9f1e0a4 100644
--- a/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
+++ b/lib/Conversion/ArithmeticToSPIRV/ArithmeticToSPIRV.cpp
@@ -637,7 +637,7 @@
 #define DISPATCH(cmpPredicate, spirvOp)                                        \
   case cmpPredicate:                                                           \
     rewriter.replaceOpWithNewOp<spirvOp>(op, op.getResult().getType(),         \
-                                         adaptor.lhs(), adaptor.rhs());        \
+                                         adaptor.getLhs(), adaptor.getRhs());  \
     return success();
 
     DISPATCH(arith::CmpIPredicate::eq, spirv::LogicalEqualOp);
@@ -669,7 +669,7 @@
           "bitwidth emulation is not implemented yet on unsigned op");         \
     }                                                                          \
     rewriter.replaceOpWithNewOp<spirvOp>(op, op.getResult().getType(),         \
-                                         adaptor.lhs(), adaptor.rhs());        \
+                                         adaptor.getLhs(), adaptor.getRhs());  \
     return success();
 
     DISPATCH(arith::CmpIPredicate::eq, spirv::IEqualOp);
@@ -699,7 +699,7 @@
 #define DISPATCH(cmpPredicate, spirvOp)                                        \
   case cmpPredicate:                                                           \
     rewriter.replaceOpWithNewOp<spirvOp>(op, op.getResult().getType(),         \
-                                         adaptor.lhs(), adaptor.rhs());        \
+                                         adaptor.getLhs(), adaptor.getRhs());  \
     return success();
 
     // Ordered.
diff --git a/lib/Conversion/MathToLLVM/MathToLLVM.cpp b/lib/Conversion/MathToLLVM/MathToLLVM.cpp
index 795bfb8..29c6ad3 100644
--- a/lib/Conversion/MathToLLVM/MathToLLVM.cpp
+++ b/lib/Conversion/MathToLLVM/MathToLLVM.cpp
@@ -43,7 +43,7 @@
   LogicalResult
   matchAndRewrite(math::ExpM1Op op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    auto operandType = adaptor.operand().getType();
+    auto operandType = adaptor.getOperand().getType();
 
     if (!operandType || !LLVM::isCompatibleType(operandType))
       return failure();
@@ -62,7 +62,7 @@
       } else {
         one = rewriter.create<LLVM::ConstantOp>(loc, operandType, floatOne);
       }
-      auto exp = rewriter.create<LLVM::ExpOp>(loc, adaptor.operand());
+      auto exp = rewriter.create<LLVM::ExpOp>(loc, adaptor.getOperand());
       rewriter.replaceOpWithNewOp<LLVM::FSubOp>(op, operandType, exp, one);
       return success();
     }
@@ -96,7 +96,7 @@
   LogicalResult
   matchAndRewrite(math::Log1pOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    auto operandType = adaptor.operand().getType();
+    auto operandType = adaptor.getOperand().getType();
 
     if (!operandType || !LLVM::isCompatibleType(operandType))
       return rewriter.notifyMatchFailure(op, "unsupported operand type");
@@ -116,7 +116,7 @@
               : rewriter.create<LLVM::ConstantOp>(loc, operandType, floatOne);
 
       auto add = rewriter.create<LLVM::FAddOp>(loc, operandType, one,
-                                               adaptor.operand());
+                                               adaptor.getOperand());
       rewriter.replaceOpWithNewOp<LLVM::LogOp>(op, operandType, add);
       return success();
     }
@@ -150,7 +150,7 @@
   LogicalResult
   matchAndRewrite(math::RsqrtOp op, OpAdaptor adaptor,
                   ConversionPatternRewriter &rewriter) const override {
-    auto operandType = adaptor.operand().getType();
+    auto operandType = adaptor.getOperand().getType();
 
     if (!operandType || !LLVM::isCompatibleType(operandType))
       return failure();
@@ -169,7 +169,7 @@
       } else {
         one = rewriter.create<LLVM::ConstantOp>(loc, operandType, floatOne);
       }
-      auto sqrt = rewriter.create<LLVM::SqrtOp>(loc, adaptor.operand());
+      auto sqrt = rewriter.create<LLVM::SqrtOp>(loc, adaptor.getOperand());
       rewriter.replaceOpWithNewOp<LLVM::FDivOp>(op, operandType, one, sqrt);
       return success();
     }
diff --git a/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp b/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
index 9e96829..95eca39 100644
--- a/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
+++ b/lib/Conversion/MathToSPIRV/MathToSPIRV.cpp
@@ -45,7 +45,7 @@
     assert(adaptor.getOperands().size() == 1);
     Location loc = operation.getLoc();
     auto type =
-        this->getTypeConverter()->convertType(operation.operand().getType());
+        this->getTypeConverter()->convertType(operation.getOperand().getType());
     auto one = spirv::ConstantOp::getOne(type, operation.getLoc(), rewriter);
     auto onePlus =
         rewriter.create<spirv::FAddOp>(loc, one, adaptor.getOperands()[0]);
diff --git a/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp b/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
index abcef48..90d870f 100644
--- a/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
+++ b/lib/Conversion/SCFToOpenMP/SCFToOpenMP.cpp
@@ -66,7 +66,7 @@
 ///     scf.reduce.return %1
 template <
     typename CompareOpTy, typename SelectOpTy,
-    typename Predicate = decltype(std::declval<CompareOpTy>().predicate())>
+    typename Predicate = decltype(std::declval<CompareOpTy>().getPredicate())>
 static bool
 matchSelectReduction(Block &block, ArrayRef<Predicate> lessThanPredicates,
                      ArrayRef<Predicate> greaterThanPredicates, bool &isMin) {
diff --git a/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp b/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
index 97f210d..e97afac 100644
--- a/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
+++ b/lib/Dialect/Arithmetic/Transforms/ExpandOps.cpp
@@ -24,8 +24,8 @@
   LogicalResult matchAndRewrite(arith::CeilDivUIOp op,
                                 PatternRewriter &rewriter) const final {
     Location loc = op.getLoc();
-    Value a = op.lhs();
-    Value b = op.rhs();
+    Value a = op.getLhs();
+    Value b = op.getRhs();
     Value zero = rewriter.create<arith::ConstantOp>(
         loc, rewriter.getIntegerAttr(a.getType(), 0));
     Value compare =
diff --git a/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index 5577cec..2c320a3 100644
--- a/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -1666,7 +1666,7 @@
 
 LogicalResult
 GlobalCtorsOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
-  for (Attribute ctor : ctors()) {
+  for (Attribute ctor : getCtors()) {
     if (failed(verifySymbolAttrUse(ctor.cast<FlatSymbolRefAttr>(), *this,
                                    symbolTable)))
       return failure();
@@ -1675,7 +1675,7 @@
 }
 
 static LogicalResult verify(GlobalCtorsOp op) {
-  if (op.ctors().size() != op.priorities().size())
+  if (op.getCtors().size() != op.getPriorities().size())
     return op.emitError(
         "mismatch between the number of ctors and the number of priorities");
   return success();
@@ -1687,7 +1687,7 @@
 
 LogicalResult
 GlobalDtorsOp::verifySymbolUses(SymbolTableCollection &symbolTable) {
-  for (Attribute dtor : dtors()) {
+  for (Attribute dtor : getDtors()) {
     if (failed(verifySymbolAttrUse(dtor.cast<FlatSymbolRefAttr>(), *this,
                                    symbolTable)))
       return failure();
@@ -1696,7 +1696,7 @@
 }
 
 static LogicalResult verify(GlobalDtorsOp op) {
-  if (op.dtors().size() != op.priorities().size())
+  if (op.getDtors().size() != op.getPriorities().size())
     return op.emitError(
         "mismatch between the number of dtors and the number of priorities");
   return success();
diff --git a/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp b/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
index 2217cfe..8690546 100644
--- a/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
+++ b/lib/Dialect/Math/Transforms/AlgebraicSimplification.cpp
@@ -41,13 +41,13 @@
 PowFStrengthReduction::matchAndRewrite(math::PowFOp op,
                                        PatternRewriter &rewriter) const {
   Location loc = op.getLoc();
-  Value x = op.lhs();
+  Value x = op.getLhs();
 
   FloatAttr scalarExponent;
   DenseFPElementsAttr vectorExponent;
 
-  bool isScalar = matchPattern(op.rhs(), m_Constant(&scalarExponent));
-  bool isVector = matchPattern(op.rhs(), m_Constant(&vectorExponent));
+  bool isScalar = matchPattern(op.getRhs(), m_Constant(&scalarExponent));
+  bool isVector = matchPattern(op.getRhs(), m_Constant(&vectorExponent));
 
   // Returns true if exponent is a constant equal to `value`.
   auto isExponentValue = [&](double value) -> bool {
diff --git a/lib/Dialect/Math/Transforms/ExpandTanh.cpp b/lib/Dialect/Math/Transforms/ExpandTanh.cpp
index 3fb6f11..3c3d7a8 100644
--- a/lib/Dialect/Math/Transforms/ExpandTanh.cpp
+++ b/lib/Dialect/Math/Transforms/ExpandTanh.cpp
@@ -23,13 +23,13 @@
 ///   1) 1-exp^{-2x} / 1+exp^{-2x}, if x => 0
 ///   2) exp^{2x}-1 / exp^{2x}+1  , if x < 0
 static LogicalResult convertTanhOp(math::TanhOp op, PatternRewriter &rewriter) {
-  auto floatType = op.operand().getType();
+  auto floatType = op.getOperand().getType();
   Location loc = op.getLoc();
   auto floatOne = rewriter.getFloatAttr(floatType, 1.0);
   auto floatTwo = rewriter.getFloatAttr(floatType, 2.0);
   Value one = rewriter.create<arith::ConstantOp>(loc, floatOne);
   Value two = rewriter.create<arith::ConstantOp>(loc, floatTwo);
-  Value doubledX = rewriter.create<arith::MulFOp>(loc, op.operand(), two);
+  Value doubledX = rewriter.create<arith::MulFOp>(loc, op.getOperand(), two);
 
   // Case 1: tanh(x) = 1-exp^{-2x} / 1+exp^{-2x}
   Value negDoubledX = rewriter.create<arith::NegFOp>(loc, doubledX);
@@ -48,7 +48,7 @@
   auto floatZero = rewriter.getFloatAttr(floatType, 0.0);
   Value zero = rewriter.create<arith::ConstantOp>(loc, floatZero);
   Value cmpRes = rewriter.create<arith::CmpFOp>(loc, arith::CmpFPredicate::OGE,
-                                                op.operand(), zero);
+                                                op.getOperand(), zero);
   rewriter.replaceOpWithNewOp<SelectOp>(op, cmpRes, positiveRes, negativeRes);
   return success();
 }
diff --git a/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp b/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
index 97ba3c0..c15d617 100644
--- a/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
+++ b/lib/Dialect/Math/Transforms/PolynomialApproximation.cpp
@@ -295,10 +295,10 @@
 LogicalResult
 TanhApproximation::matchAndRewrite(math::TanhOp op,
                                    PatternRewriter &rewriter) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
   auto bcast = [&](Value value) -> Value {
@@ -308,12 +308,12 @@
   // Clamp operand into [plusClamp, minusClamp] range.
   Value minusClamp = bcast(f32Cst(builder, -7.99881172180175781f));
   Value plusClamp = bcast(f32Cst(builder, 7.99881172180175781f));
-  Value x = clamp(builder, op.operand(), minusClamp, plusClamp);
+  Value x = clamp(builder, op.getOperand(), minusClamp, plusClamp);
 
   // Mask for tiny values that are approximated with `operand`.
   Value tiny = bcast(f32Cst(builder, 0.0004f));
   Value tinyMask = builder.create<arith::CmpFOp>(
-      arith::CmpFPredicate::OLT, builder.create<math::AbsOp>(op.operand()),
+      arith::CmpFPredicate::OLT, builder.create<math::AbsOp>(op.getOperand()),
       tiny);
 
   // The monomial coefficients of the numerator polynomial (odd).
@@ -383,10 +383,10 @@
 LogicalResult
 LogApproximationBase<Op>::logMatchAndRewrite(Op op, PatternRewriter &rewriter,
                                              bool base2) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
   auto bcast = [&](Value value) -> Value {
@@ -415,7 +415,7 @@
   Value cstCephesLogP7 = bcast(f32Cst(builder, -2.4999993993E-1f));
   Value cstCephesLogP8 = bcast(f32Cst(builder, +3.3333331174E-1f));
 
-  Value x = op.operand();
+  Value x = op.getOperand();
 
   // Truncate input values to the minimum positive normal.
   x = max(builder, x, cstMinNormPos);
@@ -469,11 +469,11 @@
   }
 
   Value invalidMask = builder.create<arith::CmpFOp>(arith::CmpFPredicate::ULT,
-                                                    op.operand(), cstZero);
+                                                    op.getOperand(), cstZero);
   Value zeroMask = builder.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ,
-                                                 op.operand(), cstZero);
+                                                 op.getOperand(), cstZero);
   Value posInfMask = builder.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ,
-                                                   op.operand(), cstPosInf);
+                                                   op.getOperand(), cstPosInf);
 
   // Filter out invalid values:
   //  • x == 0     -> -INF
@@ -530,10 +530,10 @@
 LogicalResult
 Log1pApproximation::matchAndRewrite(math::Log1pOp op,
                                     PatternRewriter &rewriter) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
   auto bcast = [&](Value value) -> Value {
@@ -547,7 +547,7 @@
   //          ^^^^^^^^^^^^^^^^^^^^^^
   //             "logLarge" below.
   Value cstOne = bcast(f32Cst(builder, 1.0f));
-  Value x = op.operand();
+  Value x = op.getOperand();
   Value u = builder.create<arith::AddFOp>(x, cstOne);
   Value uSmall =
       builder.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ, u, cstOne);
@@ -577,10 +577,10 @@
 LogicalResult
 ErfPolynomialApproximation::matchAndRewrite(math::ErfOp op,
                                             PatternRewriter &rewriter) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
   auto bcast = [&](Value value) -> Value {
@@ -637,9 +637,9 @@
   bounds[2] = bcast(f32Cst(builder, 3.75f));
 
   Value isNegativeArg = builder.create<arith::CmpFOp>(arith::CmpFPredicate::OLT,
-                                                      op.operand(), zero);
-  Value negArg = builder.create<arith::NegFOp>(op.operand());
-  Value x = builder.create<SelectOp>(isNegativeArg, negArg, op.operand());
+                                                      op.getOperand(), zero);
+  Value negArg = builder.create<arith::NegFOp>(op.getOperand());
+  Value x = builder.create<SelectOp>(isNegativeArg, negArg, op.getOperand());
 
   Value offset = offsets[0];
   Value p[polyDegree + 1];
@@ -701,10 +701,10 @@
 LogicalResult
 ExpApproximation::matchAndRewrite(math::ExpOp op,
                                   PatternRewriter &rewriter) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
 
@@ -735,7 +735,7 @@
   Value cstCephesExpP4 = bcast(f32Cst(builder, 0.03668965196652099192f));
   Value cstCephesExpP5 = bcast(f32Cst(builder, 0.01314350012789660196f));
 
-  Value x = op.operand();
+  Value x = op.getOperand();
 
   // Reduced y = x - floor(x / ln(2)) * ln(2) = x - k * ln(2)
   Value xL2Inv = mul(x, cstLog2E);
@@ -823,10 +823,10 @@
 LogicalResult
 ExpM1Approximation::matchAndRewrite(math::ExpM1Op op,
                                     PatternRewriter &rewriter) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
   auto bcast = [&](Value value) -> Value {
@@ -838,7 +838,7 @@
   // and when the input is ~= -inf, i.e. u - 1 ~= -1.
   Value cstOne = bcast(f32Cst(builder, 1.0f));
   Value cstNegOne = bcast(f32Cst(builder, -1.0f));
-  Value x = op.operand();
+  Value x = op.getOperand();
   Value u = builder.create<math::ExpOp>(x);
   Value uEqOne =
       builder.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ, u, cstOne);
@@ -892,10 +892,10 @@
       llvm::is_one_of<OpTy, math::SinOp, math::CosOp>::value,
       "SinAndCosApproximation pattern expects math::SinOp or math::CosOp");
 
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   ImplicitLocOpBuilder builder(op->getLoc(), rewriter);
   auto bcast = [&](Value value) -> Value {
@@ -941,7 +941,7 @@
   Value twoOverPi = bcast(f32Cst(builder, TWO_OVER_PI));
   Value piOverTwo = bcast(f32Cst(builder, PI_OVER_2));
 
-  Value x = op.operand();
+  Value x = op.getOperand();
 
   Value k = floor(mul(x, twoOverPi));
 
@@ -1015,10 +1015,10 @@
 LogicalResult
 RsqrtApproximation::matchAndRewrite(math::RsqrtOp op,
                                     PatternRewriter &rewriter) const {
-  if (!getElementTypeOrSelf(op.operand()).isF32())
+  if (!getElementTypeOrSelf(op.getOperand()).isF32())
     return rewriter.notifyMatchFailure(op, "unsupported operand type");
 
-  ArrayRef<int64_t> shape = vectorShape(op.operand());
+  ArrayRef<int64_t> shape = vectorShape(op.getOperand());
 
   // Only support already-vectorized rsqrt's.
   if (shape.empty() || shape.back() % 8 != 0)
@@ -1034,14 +1034,14 @@
   Value cstNegHalf = bcast(f32Cst(builder, -0.5f));
   Value cstMinNormPos = bcast(f32FromBits(builder, 0x00800000u));
 
-  Value negHalf = builder.create<arith::MulFOp>(op.operand(), cstNegHalf);
+  Value negHalf = builder.create<arith::MulFOp>(op.getOperand(), cstNegHalf);
 
   // Select only the inverse sqrt of positive normals (denormals are
   // flushed to zero).
-  Value ltMinMask = builder.create<arith::CmpFOp>(arith::CmpFPredicate::OLT,
-                                                  op.operand(), cstMinNormPos);
+  Value ltMinMask = builder.create<arith::CmpFOp>(
+      arith::CmpFPredicate::OLT, op.getOperand(), cstMinNormPos);
   Value infMask = builder.create<arith::CmpFOp>(arith::CmpFPredicate::OEQ,
-                                                op.operand(), cstPosInf);
+                                                op.getOperand(), cstPosInf);
   Value notNormalFiniteMask = builder.create<arith::OrIOp>(ltMinMask, infMask);
 
   // Compute an approximate result.
diff --git a/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp b/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
index 6abb0a5..cc8800d 100644
--- a/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
+++ b/lib/Target/LLVMIR/Dialect/LLVMIR/LLVMToLLVMIRTranslation.cpp
@@ -161,7 +161,7 @@
       // clang-format on
   };
   llvm::FastMathFlags ret;
-  auto fmf = op.fastmathFlags();
+  auto fmf = op.getFastmathFlags();
   for (auto it : handlers)
     if (bitEnumContains(fmf, it.first))
       (ret.*(it.second))(true);
diff --git a/lib/Target/LLVMIR/ModuleTranslation.cpp b/lib/Target/LLVMIR/ModuleTranslation.cpp
index db0e7c2..5d8345d 100644
--- a/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -610,8 +610,8 @@
     auto dtorOp = dyn_cast<GlobalDtorsOp>(op);
     if (!ctorOp && !dtorOp)
       continue;
-    auto range = ctorOp ? llvm::zip(ctorOp.ctors(), ctorOp.priorities())
-                        : llvm::zip(dtorOp.dtors(), dtorOp.priorities());
+    auto range = ctorOp ? llvm::zip(ctorOp.getCtors(), ctorOp.getPriorities())
+                        : llvm::zip(dtorOp.getDtors(), dtorOp.getPriorities());
     auto appendGlobalFn =
         ctorOp ? llvm::appendToGlobalCtors : llvm::appendToGlobalDtors;
     for (auto symbolAndPriority : range) {
diff --git a/tools/mlir-tblgen/LLVMIRConversionGen.cpp b/tools/mlir-tblgen/LLVMIRConversionGen.cpp
index 06c2330..1a92f4a 100644
--- a/tools/mlir-tblgen/LLVMIRConversionGen.cpp
+++ b/tools/mlir-tblgen/LLVMIRConversionGen.cpp
@@ -121,6 +121,7 @@
   llvm::raw_string_ostream bs(builder);
   while (auto loc = findNextVariable(builderStrRef)) {
     auto name = loc.in(builderStrRef).drop_front();
+    auto getterName = op.getGetterName(name);
     // First, insert the non-matched part as is.
     bs << builderStrRef.substr(0, loc.pos);
     // Then, rewrite the name based on its kind.
@@ -128,13 +129,13 @@
     if (isOperandName(op, name)) {
       auto result =
           isVariadicOperand
-              ? formatv("moduleTranslation.lookupValues(op.{0}())", name)
-              : formatv("moduleTranslation.lookupValue(op.{0}())", name);
+              ? formatv("moduleTranslation.lookupValues(op.{0}())", getterName)
+              : formatv("moduleTranslation.lookupValue(op.{0}())", getterName);
       bs << result;
     } else if (isAttributeName(op, name)) {
-      bs << formatv("op.{0}()", name);
+      bs << formatv("op.{0}()", getterName);
     } else if (isResultName(op, name)) {
-      bs << formatv("moduleTranslation.mapValue(op.{0}())", name);
+      bs << formatv("moduleTranslation.mapValue(op.{0}())", getterName);
     } else if (name == "_resultType") {
       bs << "moduleTranslation.convertType(op.getResult().getType())";
     } else if (name == "_hasResult") {