Skip to content

Commit 276ffc6

Browse files
committed
Add more clarifying comments
1 parent 95bf090 commit 276ffc6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

mlir/include/mlir/Dialect/LLVMIR/LLVMOps.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1690,8 +1690,7 @@ def LLVM_BlockTagOp : LLVM_Op<"blocktag"> {
16901690
the target address.
16911691

16921692
A given function should have at most one `llvm.blocktag` operation with a
1693-
given `tag`. This operation cannot be used as a terminator and cannot be
1694-
part of an unreachable block.
1693+
given `tag`. This operation cannot be used as a terminator.
16951694

16961695
Example:
16971696

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2241,6 +2241,9 @@ static LogicalResult verifyComdat(Operation *op,
22412241
static LogicalResult verifyBlockTags(LLVMFuncOp funcOp) {
22422242
llvm::DenseSet<BlockTagAttr> blockTags;
22432243
LogicalResult r = success();
2244+
// Note that presence of `BlockTagOp`s currently can't prevent an unrecheable
2245+
// block to be removed by canonicalizer's region simplify pass, which needs to
2246+
// be dialect aware to allow extra constraints to be described.
22442247
funcOp.walk([&](BlockTagOp blockTagOp) {
22452248
if (blockTags.contains(blockTagOp.getTag())) {
22462249
blockTagOp.emitError()

0 commit comments

Comments
 (0)