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

Volkan Keles via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jan 23 11:35:49 PST 2018


volkan added inline comments.
Herald added a subscriber: hintonda.


================
Comment at: lib/Transforms/IPO/BlockExtractor.cpp:155
+      BlocksToExtractVec.push_back(II->getUnwindDest());
+    CodeExtractor(BlocksToExtractVec).extractCodeRegion();
+    ++NumExtracted;
----------------
bogner wrote:
> I guess CodeExtractor takes care of naming the extracted function, but could you double check that it does the right thing for name collisions? IE, if you extract bb1 from foo, but there's already a function called foo_bb1, what happens?
Yes, it renames the function as foo_bb1.1 in that case.


================
Comment at: tools/bugpoint/ExtractFunction.cpp:410
 
-  std::string uniqueFN = "--extract-blocks-file=";
+  std::string uniqueFN = "-extract-blocks-file=";
   uniqueFN += Temp->TmpName;
----------------
bogner wrote:
> Why this change?
I think I renamed the option and reverted, but I forgot to remove this change. I will remove it.


https://reviews.llvm.org/D41638





More information about the llvm-commits mailing list