[PATCH] D72006: [MLIR] Added llvm.invoke and llvm.landingpad
shraiysh via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 20 03:30:32 PST 2020
shraiysh added inline comments.
================
Comment at: mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td:357
+ // Check it must be an operand
+ for(auto ops : lpOp.getOperands())
+ if(ops.getDefiningOp() == prevInst)
----------------
rriddle wrote:
> This loop seems fairly inefficient. Can you rework this?
I have avoided this now, by processing `GlobalVariable` in `processConstant` (earlier it was in `processValue`) and putting it at the beginning of the basic block. So, now, the first instruction has to be a landingpad instruction.
================
Comment at: mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp:471
+
+ parser.getCurrentLocation(&typeLocation);
+ if (parser.parseColon() || parser.parseType(type)) {
----------------
rriddle wrote:
> I don't see where the location is used.
It is used in reporting the error inside next if.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72006/new/
https://reviews.llvm.org/D72006
More information about the llvm-commits
mailing list