================
@@ -1940,22 +1975,30 @@ def CallOp : CIR_CallOpBase<"call", 
[NoRegionArguments]> {
   let arguments = commonArgs;
 
   let builders = [
-    // Build a call op for a direct call
-    OpBuilder<(ins "mlir::SymbolRefAttr":$callee, "mlir::Type":$resType,
-                   "mlir::ValueRange":$operands), [{
+      // Build a call op for a direct call
+      OpBuilder<(ins "mlir::SymbolRefAttr":$callee, "mlir::Type":$resType,
+                    "mlir::ValueRange":$operands,
+                    CArg<"SideEffect", "SideEffect::All">:$sideEffect),
+                [{
       assert(callee && "callee attribute is required for direct call");
       $_state.addOperands(operands);
       $_state.addAttribute("callee", callee);
+      $_state.addAttribute("side_effect",
+        SideEffectAttr::get($_builder.getContext(), sideEffect));
       if (resType && !isa<VoidType>(resType))
         $_state.addTypes(resType);
     }]>,
-    // Build a call op for an indirect call
-    OpBuilder<(ins "mlir::Value":$calleePtr, "mlir::Type":$resType,
-                   "mlir::ValueRange":$operands), [{
+      // Build a call op for an indirect call
+      OpBuilder<(ins "mlir::Value":$calleePtr, "mlir::Type":$resType,
----------------
andykaylor wrote:

Again, indenting is wrong.

https://github.com/llvm/llvm-project/pull/144201
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to