[PATCH] D33839: Correctly remap BlockAddress when using CodeExtractor

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Jun 10 21:34:59 PDT 2017


davidxl added a comment.

It is probably not legal to outline a BB with BB's address captured, so your previous version is better.



================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:75
+  // lead to unexpected behavior, like cross-function jumps
+  SmallPtrSet<User const *, 16> Visited;
+  SmallVector<User const *, 16> ToVisit;
----------------
You can use BasicBlock::hasAddressTaken method


https://reviews.llvm.org/D33839





More information about the llvm-commits mailing list