[PATCH] D86364: [ValueTracking] Interpret GEPs as a series of adds multiplied by the related scaling factor

Quentin Colombet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 21 18:34:09 PDT 2020


qcolombet added inline comments.


================
Comment at: llvm/lib/Analysis/ValueTracking.cpp:1491
+          uint64_t TypeSizeInBytes =
+              Q.DL.getTypeAllocSize(GTI.getIndexedType());
+          KnownBits ScalingFactor(BitWidth);
----------------
The bug in instrprof-value-prof.c is that this code is only correct for array. For structures the index is not based on the scaling factor.
Fixing that.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D86364



More information about the llvm-commits mailing list