[all-commits] [llvm/llvm-project] eb4f41: [Attributor] Really use the executed-context

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Oct 31 13:10:07 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: eb4f41dfe58fc88794e1e227935a6f972f1a50e4
      https://github.com/llvm/llvm-project/commit/eb4f41dfe58fc88794e1e227935a6f972f1a50e4
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2019-10-31 (Thu, 31 Oct 2019)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/FunctionAttrs/arg_nocapture.ll
    M llvm/test/Transforms/FunctionAttrs/dereferenceable.ll
    M llvm/test/Transforms/FunctionAttrs/nocapture.ll
    M llvm/test/Transforms/FunctionAttrs/nosync.ll
    M llvm/test/Transforms/InferFunctionAttrs/dereferenceable.ll

  Log Message:
  -----------
  [Attributor] Really use the executed-context

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.

Differential Revision: https://reviews.llvm.org/D69647




More information about the All-commits mailing list