[PATCH] D30017: WholeProgramDevirt: Implement export/import support for VCP.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 12:08:49 PST 2017


pcc added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:763
+  // case it would not have hidden visibility.
+  if (!GV || GV->getVisibility() == GlobalValue::HiddenVisibility)
     return C;
----------------
tejohnson wrote:
> I noticed that this function largely duplicates handling in LowerTypeTests.cpp (ditto for exportGlobal). Would it make sense to refactor that into a general helper that can be invoked by both?
Maybe. This is a "rule of three" situation, I think -- if we add another pass that needs this, we can factor it out.


https://reviews.llvm.org/D30017





More information about the llvm-commits mailing list