[PATCH] D85182: [LTO,NFC] Skip generateParamAccessSummary when empty

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 6 14:41:45 PDT 2020


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

lgtm with a possible change below.



================
Comment at: llvm/include/llvm/IR/ModuleSummaryIndex.h:1292
                              std::unique_ptr<GlobalValueSummary> Summary) {
+    if (!HasParamAccess)
+      if (const FunctionSummary *FS = dyn_cast<FunctionSummary>(Summary.get()))
----------------
Minor suggestion - since the common case is !HasParamAccess, I wonder if it would be a little bit more efficient to remove the check and simply HasParamAccess |= ... below.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D85182



More information about the llvm-commits mailing list