[PATCH] D96806: [SampleFDO] Stop repeated indirect call promotion for the same target

David Li via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 16 14:57:04 PST 2021


davidxl added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1072
+      // means the candidate has been promoted for this indirect call.
+      if (ValueData[I].Value == Function::getGUID(Candidate) &&
+          ValueData[I].Count == 0)
----------------
Why do we need to keep the zero count data in the first place?


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1108
+    if (Pair.first->second != 0)
+      Pair.first->second = Data.Count;
+  }
----------------
Why updating here? Is the meta data more up to date?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D96806



More information about the llvm-commits mailing list