[PATCH] D47895: llvm: Add support for "-fno-delete-null-pointer-checks"
George Burgess IV via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 6 19:19:28 PDT 2018
george.burgess.iv added a comment.
Ah, sorry. I thought I hit submit, but apparently I didn't. :)
Objectsize-related changes look good to me, modulo a few tiny nits. Thanks!
================
Comment at: lib/Analysis/InstructionSimplify.cpp:2125
+ Opts.NullIsUnknownSize =
+ NullPointerIsDefined(dyn_cast<AllocaInst>(LHS)->getFunction());
if (LHSOffsetCI && RHSOffsetCI &&
----------------
s/dyn_cast/cast/, please
(Or
```
if (auto *Foo = dyn_cast<AllocaInst>(LHS))
if (isa<AllocaInst>(RHS) || isa<GlobalVariable>(RHS)) {
// ...
```
; I'm impartial.)
================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:351
+ AliasAnalysis &AA,
+ Function *F) {
// If we don't know the sizes of either access, then we can't do a comparison.
----------------
`const Function *F`?
================
Comment at: lib/Transforms/Scalar/DeadStoreElimination.cpp:718
const DataLayout &DL, AliasAnalysis *AA,
- const TargetLibraryInfo *TLI) {
+ const TargetLibraryInfo *TLI, Function *F) {
const Value *UnderlyingPointer = GetUnderlyingObject(LoadedLoc.Ptr, DL);
----------------
`const Function *F`?
Repository:
rL LLVM
https://reviews.llvm.org/D47895
More information about the llvm-commits
mailing list