[PATCH] D69647: [Attributor] Really use the executed-context
Johannes Doerfert via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 30 15:36:32 PDT 2019
jdoerfert created this revision.
jdoerfert added reviewers: uenoku, sstefan1, lebedev.ri.
Herald added subscribers: llvm-commits, jfb, bollu, hiraditya.
Herald added a project: LLVM.
jdoerfert added a comment.
I'll reupload later with full context (sorry)
Before we did not follow casts and geps when we looked at the users of a
pointer in the pointers must-be-executed-context. This caused us to fail
to determine if it was accessed for sure. With this change we follow
such users now.
The above extension exposed problems in getKnownNonNullAndDerefBytesForUse
which did not always check what the base pointer was. We also did not
handle negative offsets as conservative as we have to without explicit
loop handling. Finally, we should not derive a huge number if we access
a pointer that was traversed backwards first.
The problems exposed by this functional change are already tested in the
existing test cases as is the functional change.
https://reviews.llvm.org/D69647
Files:
llvm/lib/Transforms/IPO/Attributor.cpp
llvm/test/Transforms/FunctionAttrs/arg_nocapture.ll
llvm/test/Transforms/FunctionAttrs/dereferenceable.ll
llvm/test/Transforms/FunctionAttrs/noalias_returned.ll
llvm/test/Transforms/FunctionAttrs/nocapture.ll
llvm/test/Transforms/FunctionAttrs/nosync.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69647.227193.patch
Type: text/x-patch
Size: 10311 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191030/c6eab489/attachment-0001.bin>
More information about the llvm-commits
mailing list