[PATCH] D145854: [GlobalDCE] Don't add dependency via icmp against inbouds pointer

Ayke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 11 11:18:33 PST 2023


aykevl added inline comments.


================
Comment at: llvm/lib/Transforms/IPO/GlobalDCE.cpp:70
+
+static bool isDereferenceableOrNull(Value *O, const DataLayout &DL) {
+  // An inbounds GEP can either be a valid pointer (pointing into
----------------
Note this function is basically a copy of https://github.com/llvm/llvm-project/blob/main/llvm/lib/Analysis/CaptureTracking.cpp#L60. I guess this could be generalized, perhaps making it a method on `Value`?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145854



More information about the llvm-commits mailing list