[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 11:40:48 PDT 2018
efriedma added subscribers: sanjoy, reames, theraven.
efriedma added a comment.
Missing LangRef changes.
How did you come up with the set of checks which need to be updated? Quickly grepping through the source, I found you missed at least lib/Analysis/ValueTracking.cpp, include/llvm/IR/CallSite.h, lib/Analysis/LazyValueInfo.cpp, and lib/Analysis/ConstantFolding.cpp .
================
Comment at: include/llvm/Analysis/Utils/Local.h:93
+/// Return value: true => null pointer dereference is not undefined.
+bool NullPointerIsDefined(const Function *F);
}
----------------
This needs to be one function which both the address-space check and the function attribute check; that's both easier to understand, and easier to extend in the future.
Maybe also put helpers on LoadInst and StoreInst to extract the appropriate address space and call this function.
Repository:
rL LLVM
https://reviews.llvm.org/D47895
More information about the llvm-commits
mailing list