[Mlir-commits] [mlir] 4a8cef1 - [mlir] Change SCF/Complex to prefixed (NFC)

Jacques Pienaar llvmlistbot at llvm.org
Thu Dec 30 09:58:05 PST 2021


Author: Jacques Pienaar
Date: 2021-12-30T09:57:51-08:00
New Revision: 4a8cef157b758e3f3d85f9fa63ebc7b5ee02f488

URL: https://github.com/llvm/llvm-project/commit/4a8cef157b758e3f3d85f9fa63ebc7b5ee02f488
DIFF: https://github.com/llvm/llvm-project/commit/4a8cef157b758e3f3d85f9fa63ebc7b5ee02f488.diff

LOG: [mlir] Change SCF/Complex to prefixed (NFC)

See
https://llvm.discourse.group/t/psa-ods-generated-accessors-will-change-to-have-a-get-prefix-update-you-apis/4476

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
    mlir/include/mlir/Dialect/SCF/SCFOps.td
    mlir/lib/Dialect/SCF/SCF.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/Complex/IR/ComplexBase.td b/mlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
index 9981f69be4df4..4382183254ac4 100644
--- a/mlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
+++ b/mlir/include/mlir/Dialect/Complex/IR/ComplexBase.td
@@ -21,7 +21,7 @@ def Complex_Dialect : Dialect {
 
   let dependentDialects = ["arith::ArithmeticDialect", "StandardOpsDialect"];
   let hasConstantMaterializer = 1;
-  let emitAccessorPrefix = kEmitAccessorPrefix_Both;
+  let emitAccessorPrefix = kEmitAccessorPrefix_Prefixed;
 }
 
 #endif // COMPLEX_BASE

diff  --git a/mlir/include/mlir/Dialect/SCF/SCFOps.td b/mlir/include/mlir/Dialect/SCF/SCFOps.td
index 01386ce4a5c25..e3ae535f59d3c 100644
--- a/mlir/include/mlir/Dialect/SCF/SCFOps.td
+++ b/mlir/include/mlir/Dialect/SCF/SCFOps.td
@@ -21,7 +21,7 @@ def SCF_Dialect : Dialect {
   let name = "scf";
   let cppNamespace = "::mlir::scf";
   let dependentDialects = ["arith::ArithmeticDialect"];
-  let emitAccessorPrefix = kEmitAccessorPrefix_Both;
+  let emitAccessorPrefix = kEmitAccessorPrefix_Prefixed;
 }
 
 // Base class for SCF dialect ops.

diff  --git a/mlir/lib/Dialect/SCF/SCF.cpp b/mlir/lib/Dialect/SCF/SCF.cpp
index 534c0f03a0b70..1ca7e49c5a3a2 100644
--- a/mlir/lib/Dialect/SCF/SCF.cpp
+++ b/mlir/lib/Dialect/SCF/SCF.cpp
@@ -1631,8 +1631,8 @@ struct CombineNestedIfs : public OpRewritePattern<IfOp> {
       return failure();
 
     Location loc = op.getLoc();
-    Value newCondition = rewriter.create<arith::AndIOp>(loc, op.condition(),
-                                                        nestedIf.condition());
+    Value newCondition = rewriter.create<arith::AndIOp>(
+        loc, op.getCondition(), nestedIf.getCondition());
     auto newIf = rewriter.create<IfOp>(loc, newCondition);
     Block *newIfBlock = newIf.thenBlock();
     rewriter.eraseOp(newIfBlock->getTerminator());


        


More information about the Mlir-commits mailing list