[PATCH] D47895: llvm: Add support for "-fno-delete-null-pointer-checks"

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 7 18:29:09 PDT 2018


efriedma added a comment.

> If an analysis can prove non-nullablility based on any criteria except dereference, it should be fine to remove null checks.

Yes, that's right.  At least, I think that's the only reasonable way to define the attribute.

I was basically just grepping for constructs which look like "getPointerAddressSpace() == 0"; anything that's doing that probably needs to be fixed because address space 0 doesn't have any other special properties.  (Well, actually, that's not completely right: there are special rules for widening loads and stores in address-space 0.  But IIRC almost nothing depends on that.)


Repository:
  rL LLVM

https://reviews.llvm.org/D47895





More information about the llvm-commits mailing list