[PATCH] D41638: [llvm-extract] Support extracting basic blocks

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 12:26:25 PST 2018


volkan added inline comments.


================
Comment at: tools/llvm-extract/llvm-extract.cpp:321-322
 
+  // Extract the specified basic blocks from the module and erase the existing
+  // functions.
+  if (!ExtractBlocks.empty()) {
----------------
bogner wrote:
> On interesting side effect of the "-bb function:block" approach is that we'll probably do something kind of strange if someone calls this like "llvm-extract -func f0 -bb f0:bb1" - will the result be functions f0 and f0_bb1, or will f0 be deleted and we only get f0_bb1? I suspect the latter. This is probably fine though - it seems unlikely that someone would really want to do that.
> 
Yes, it's going to be the latter. BlockExtractor erases the existing functions.


https://reviews.llvm.org/D41638





More information about the llvm-commits mailing list