[PATCH] D64111: Add getMostFrequentByte and use for isBytewiseValue implementation

Evgenii Stepanov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 12 13:59:38 PDT 2019


eugenis added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:3182
   if (isa<UndefValue>(V))
-    return UndefInt8;
+    return;
 
----------------
vitalybuka wrote:
> jfb wrote:
> > Should `Undef` count as `Other`? Or have its own count?
> Undef means we don't care what it's there, so we can fill we any pattern.
> Other counts bytes which are different from most frequent value and will have to be fixed, e.g. after memset
Should we count undefs separately in the histogram? It seems like it would not add any complexity or runtime cost, and the caller can just add the two number if that's what they need.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64111





More information about the llvm-commits mailing list