[PATCH] D33743: (NFC) Track global summary liveness in GVFlags.

Peter Collingbourne via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 31 16:39:03 PDT 2017


pcc added inline comments.


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:439
+    for (auto &S : VI.getSummaryList())
+      if (!S->isLive()) {
+        Changed = true;
----------------
Can we return if we see at least one live summary? I think there is an invariant in this function that if at least one summary for a GUID is live, all are live.


================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:459
   for (const auto &Entry : Index) {
     bool IsLiveRoot = llvm::any_of(
         Entry.second.SummaryList,
----------------
Can this code be simplified to use a for loop? All it needs to do is add a ValueInfo to the worklist if it sees at least one live summary, right?


Repository:
  rL LLVM

https://reviews.llvm.org/D33743





More information about the llvm-commits mailing list