[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 21 12:16:57 PDT 2018
efriedma added a comment.
Please fix lib/Analysis/BasicAliasAnalysis.cpp to allow null pointers to alias other objects. Please fix lib/Analysis/LoopAccessAnalysis.cpp to allow a loop to dereference null. Please fix isGEPKnownNonNull in lib/Analysis/ValueTracking.cpp to allow objects located at null. Please fix ConstantFoldScalarCall in lib/Analysis/ConstantFolding.cpp to allow objects located at null. Please fix Argument::hasNonNullAttr in lib/IR/Function.cpp to allow objects at null.
There are probably other places which need to be fixed, but there's no good way to find them all; we'll just have to stumble over them later.
LangRef needs some work to clarify exactly what properties we assume about address-space zero besides the special properties of null, but I should probably write that myself.
================
Comment at: docs/LangRef.rst:1465
+``"null-pointer-is-defined"``
+ If ``"null-pointer-is-defined"`` is set to ``"true"``, then ``null`` address
+ is considered to be a valid address for memory accesses. Any analysis or
----------------
Please specifically say "in address-space 0".
================
Comment at: docs/LangRef.rst:1468
+ optimization should not treat dereferencing a pointer to ``null`` as
+ ``undefined`` behavior in this function.
``optforfuzzing``
----------------
undefined isn't a keyword.
Repository:
rL LLVM
https://reviews.llvm.org/D47895
More information about the llvm-commits
mailing list