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

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 10 12:17:51 PST 2017


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

LGTM



================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:763
+  // case it would not have hidden visibility.
+  if (!GV || GV->getVisibility() == GlobalValue::HiddenVisibility)
     return C;
----------------
pcc wrote:
> 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.
Ok, that's fine.


================
Comment at: llvm/lib/Transforms/IPO/WholeProgramDevirt.cpp:864
   }
+  CSInfo.TypeCheckedLoadUsers.clear();
 }
----------------
Make sure to update this to instead use the new markDevirt() before committing.


https://reviews.llvm.org/D30017





More information about the llvm-commits mailing list