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

Wenlei He via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 17 22:43:34 PST 2021


wenlei added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1163-1165
+        if (ValueData[I].Count == 0)
+          return true;
+        return false;
----------------
nit: `return (ValueData[I].Count == 0);`?


================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1201
+      Pair.first->second = Data.Count;
+    else if (Total > Data.Count)
+      Total -= Data.Count;
----------------
In what case do we have Total < Data.Count? And Total == Data.Count should be fine for subtraction too?


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