[Mlir-commits] [mlir] [MLIR][LLVM] Block address support (PR #134335)

Tobias Gysi llvmlistbot at llvm.org
Sat Apr 5 05:33:33 PDT 2025


================
@@ -2429,8 +2438,13 @@ LogicalResult ModuleImport::processFunction(llvm::Function *func) {
   SmallVector<llvm::BasicBlock *> reachableBasicBlocks;
   for (llvm::BasicBlock &basicBlock : *func) {
     // Skip unreachable blocks.
-    if (!reachable.contains(&basicBlock))
+    if (!reachable.contains(&basicBlock)) {
+      if (basicBlock.hasAddressTaken())
+        emitError(funcOp.getLoc())
----------------
gysit wrote:

```suggestion
        return emitError(funcOp.getLoc())
```
We probably also want to return failure to ensure the translations stops?

https://github.com/llvm/llvm-project/pull/134335


More information about the Mlir-commits mailing list