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

Tobias Gysi llvmlistbot at llvm.org
Fri Apr 4 01:10:39 PDT 2025


================
@@ -2429,8 +2439,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())
----------------
gysit wrote:

Wouldn't this be a an error? In such a scenario we cannot really import the code since the block address will be dropped and hence an invalid block addressof op would be created?

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


More information about the Mlir-commits mailing list