[PATCH] D32624: Memory intrinsic value profile optimization: Avoid divide by 0
David Li via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 27 17:13:07 PDT 2017
davidxl added inline comments.
================
Comment at: lib/Transforms/Instrumentation/IndirectCallPromotion.cpp:877
+ // scale up the counts properly (and there is no profitable transformation).
+ if (TotalCount == 0)
+ return false;
----------------
Or change it to
if (TotalCount < MemOpCountThreshold)
return false;
and move this check before the actual count check.
https://reviews.llvm.org/D32624
More information about the llvm-commits
mailing list