[PATCH] D72006: [MLIR] Added llvm.invoke and llvm.landingpad

shraiysh via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 19 09:56:22 PST 2020


shraiysh updated this revision to Diff 239000.
shraiysh edited the summary of this revision.
shraiysh added a comment.
Herald added a reviewer: nicolasvasilache.
Herald added subscribers: liufengdb, aartbik, lucyrfox, mgester, arpith-jacob.

I have tried to address almost all the comments.

1. I did not make a builder for llvm.invoke and used the `OperationState` instead - because it would involve two specialised builders for just one instruction. Let me know if making both of them is worth the effort.
2. Because the clauses can have any constant and not only a global variable (`bitcasts` and all), I decided to save them in operands instead of an array of attributes. The verifier for `llvm.invoke` checks for the first `llvm.landingpad` instruction and makes sure that whatever operations occur before it are the ones used in the clauses. I am not sure how sound this is. I will be willing to update it in case this is flawed.

I have also updated the summary. If I missed anything, please let me know, and I will address it.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D72006/new/

https://reviews.llvm.org/D72006

Files:
  mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td
  mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp
  mlir/lib/Target/LLVMIR/ConvertFromLLVMIR.cpp
  mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
  mlir/test/Dialect/LLVMIR/roundtrip.mlir
  mlir/test/Target/import.ll
  mlir/test/Target/llvmir.mlir

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72006.239000.patch
Type: text/x-patch
Size: 21413 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200119/833b1c9e/attachment.bin>


More information about the llvm-commits mailing list