[PATCH] D98147: [SCEV] Improve modelling for pointer constants

Michael Kruse via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 8 10:52:02 PST 2021


Meinersbur added inline comments.


================
Comment at: llvm/lib/Analysis/ScalarEvolution.cpp:1076
+    // Does the operand happen to be a (pointer) constant? If so, see if we can
+    // produce an integer constant (but *NOT* an ptr2int constant expression!).
+    if (auto *PC = dyn_cast<Constant>(U->getValue()))
----------------
typo is still there

A `GlobalValue`would but such a constant, but why handle it differently than a local value?


================
Comment at: polly/lib/Analysis/ScopBuilder.cpp:1764
 
+  if (auto *X = dyn_cast<SCEVUnknown>(DestAccFunc)) {
+    if (isa<ConstantPointerNull>(X->getValue()))
----------------
I used `X` to make a quick patch, maybe you can find a better name.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98147



More information about the llvm-commits mailing list