[Mlir-commits] [mlir] 4993e4e - [mlir][llvm] Drop `ResumeOp::verify()` function

Victor Perez llvmlistbot at llvm.org
Mon Apr 3 01:56:24 PDT 2023


Author: Victor Perez
Date: 2023-04-03T09:56:13+01:00
New Revision: 4993e4e5d672312380d4e729bd3b96287620daab

URL: https://github.com/llvm/llvm-project/commit/4993e4e5d672312380d4e729bd3b96287620daab
DIFF: https://github.com/llvm/llvm-project/commit/4993e4e5d672312380d4e729bd3b96287620daab.diff

LOG: [mlir][llvm] Drop `ResumeOp::verify()` function

In patch https://reviews.llvm.org/rG478bd0735fc094d3af37e9791df5118a402ae7a7,
this function was changed so that it always returns `success()`. Drop this
and explicitly state it won't be generated in the `.td` file and explain
`llvm.resume` restrictions will be checked in `LLVMFuncOp::verify()`.

Differential Revision: https://reviews.llvm.org/D147342

Added: 
    

Modified: 
    mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
    mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
index 3abe1614f66fa..f762b9c612d21 100644
--- a/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
+++ b/mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
@@ -894,7 +894,8 @@ def LLVM_ReturnOp : LLVM_TerminatorOp<"return", [Pure, ReturnLike]> {
 def LLVM_ResumeOp : LLVM_TerminatorOp<"resume"> {
   let arguments = (ins LLVM_Type:$value);
   let assemblyFormat = "$value attr-dict `:` type($value)";
-  let hasVerifier = 1;
+  // Consistency of llvm.resume value types is checked in LLVMFuncOp::verify().
+  let hasVerifier = false;
   string llvmInstName = "Resume";
   string llvmBuilder = [{ builder.CreateResume($value); }];
   string mlirBuilder = [{

diff  --git a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
index bfc574ac238bd..c593f848a5e33 100644
--- a/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
+++ b/mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
@@ -1521,17 +1521,6 @@ LogicalResult ReturnOp::verify() {
   return success();
 }
 
-//===----------------------------------------------------------------------===//
-// ResumeOp
-//===----------------------------------------------------------------------===//
-
-LogicalResult ResumeOp::verify() {
-  // Consistency of llvm.resume value types is checked in LLVMFuncOp::verify().
-
-  // No check for personality of function - landingpad op verifies it.
-  return success();
-}
-
 //===----------------------------------------------------------------------===//
 // Verifier for LLVM::AddressOfOp.
 //===----------------------------------------------------------------------===//


        


More information about the Mlir-commits mailing list