[PATCH] D57919: [CodeExtractor] Restore outputs after creating exit stubs

Vedant Kumar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 8 10:56:27 PST 2019


vsk accepted this revision.
vsk added a comment.
This revision is now accepted and ready to land.

Thanks for doing this! LGTM with a simple change.



================
Comment at: lib/Transforms/Utils/CodeExtractor.cpp:1142
+
+    assert(((*InsertPt).getParent()->getParent() == newFunction ||
+            Blocks.count((*InsertPt).getParent())) &&
----------------
It looks like we always deref InsertPt below. Can we just define 'InsertBefore = &*InsertPt' once, and then use it in the assert? Also, it might be simpler to write InsertBefore->getFunction().


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D57919/new/

https://reviews.llvm.org/D57919





More information about the llvm-commits mailing list