[Mlir-commits] [mlir] [MLIR][LLVM] Support for indirectbr (PR #135092)
Tobias Gysi
llvmlistbot at llvm.org
Sun Apr 13 10:16:41 PDT 2025
================
@@ -2306,19 +2306,31 @@ static LogicalResult verifyComdat(Operation *op,
static LogicalResult verifyBlockTags(LLVMFuncOp funcOp) {
llvm::DenseSet<BlockTagAttr> blockTags;
BlockTagOp badBlockTagOp;
+ enum { DupTag, UnrecheableBlock } errorMsgType;
if (funcOp
.walk([&](BlockTagOp blockTagOp) {
+ mlir::Block *block = blockTagOp->getBlock();
+ if (!block->isEntryBlock() && block->use_empty()) {
----------------
gysit wrote:
We probably have to uses some DFS from the entry block to compute the reachable blocks? Otherwise there may be a cycle of unreachable blocks that is not catched.
Similar to here:
https://github.com/llvm/llvm-project/blob/c41ef751f85ee42f40380d064f44cfd347fb6215/mlir/lib/Target/LLVMIR/ModuleImport.cpp#L2453
https://github.com/llvm/llvm-project/pull/135092
More information about the Mlir-commits
mailing list