[PATCH] D129653: isInductionPHI - Add some safety checks

Zaara Syeda via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 18 07:01:38 PDT 2022


syzaara added inline comments.


================
Comment at: llvm/lib/Analysis/IVDescriptors.cpp:1509
+
+  if (!Phi)
+    return false;
----------------
nickdesaulniers wrote:
> fhahn wrote:
> > This should never be called with `Phi` being null.
> Sounds like a good case for Phi being a `&` (and additional `const`) rather than a non-const ptr.
This would require many changes to all the places we call isInductionPHI from. Can we add the null check for now, and create a separate PR for this change? @fhahn 


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

https://reviews.llvm.org/D129653



More information about the llvm-commits mailing list