[PATCH] D96806: [SampleFDO] Stop repeated indirect call promotion for the same target
Wei Mi via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 17 22:58:48 PST 2021
wmi marked 5 inline comments as done.
wmi added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1163-1165
+ if (ValueData[I].Count == 0)
+ return true;
+ return false;
----------------
wenlei wrote:
> nit: `return (ValueData[I].Count == 0);`?
That is better. Will fix.
================
Comment at: llvm/lib/Transforms/IPO/SampleProfile.cpp:1201
+ Pair.first->second = Data.Count;
+ else if (Total > Data.Count)
+ Total -= Data.Count;
----------------
wenlei wrote:
> In what case do we have Total < Data.Count? And Total == Data.Count should be fine for subtraction too?
Currently we won't have such case. It is just some extra protect in case of future change. I think assertion will be better. Will change it.
Right, Total == Data.Count should be added. will change it.
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