diff options
author | Fangrui Song <i@maskray.me> | 2020-11-30 12:44:35 -0800 |
---|---|---|
committer | Fangrui Song <i@maskray.me> | 2020-11-30 12:44:35 -0800 |
commit | 164410324d8bf3b5a99e39f7dfe3c6d6972dab30 (patch) | |
tree | d1c657432348800fdab7705d63632c9bd09a3e29 /clang/lib/Basic/SourceManager.cpp | |
parent | 66124098a88a564143a36869f495708502a35c50 (diff) | |
download | llvm-164410324d8bf3b5a99e39f7dfe3c6d6972dab30.zip llvm-164410324d8bf3b5a99e39f7dfe3c6d6972dab30.tar.gz llvm-164410324d8bf3b5a99e39f7dfe3c6d6972dab30.tar.bz2 |
[CodeGen] -fno-delete-null-pointer-checks: change dereferenceable to dereferenceable_or_null
After D17993, with -fno-delete-null-pointer-checks we add the dereferenceable attribute to the `this` pointer.
We have observed that one internal target which worked before fails even with -fno-delete-null-pointer-checks.
Switching to dereferenceable_or_null fixes the problem.
dereferenceable currently does not always respect NullPointerIsValid and may
imply nonnull and lead to aggressive optimization. The optimization may be
related to `CallBase::isReturnNonNull`, `Argument::hasNonNullAttr`, or
`Value::getPointerDereferenceableBytes`. See D66664 and D66618 for some discussions.
Reviewed By: bkramer, rsmith
Differential Revision: https://reviews.llvm.org/D92297
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
0 files changed, 0 insertions, 0 deletions