[all-commits] [llvm/llvm-project] 034703: ValueTracking: Fix isKnownNonZero for non-0 null p...

Matt Arsenault via All-commits all-commits at lists.llvm.org
Thu Jul 16 10:51:09 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 0347039a6e7daa774d016e0a4e0f2568c7913351
      https://github.com/llvm/llvm-project/commit/0347039a6e7daa774d016e0a4e0f2568c7913351
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-07-16 (Thu, 16 Jul 2020)

  Changed paths:
    M llvm/lib/Analysis/ValueTracking.cpp
    A llvm/test/Transforms/InstSimplify/null-ptr-is-valid-attribute.ll
    A llvm/test/Transforms/InstSimplify/null-ptr-is-valid.ll

  Log Message:
  -----------
  ValueTracking: Fix isKnownNonZero for non-0 null pointers for byval

The IR doesn't have a proper concept of invalid pointers, and "null"
constants are just all zeros (though it really needs one).

I think it's not possible to break this for AMDGPU due to the copy
semantics of byval. If you have an original stack object at 0, the
byval copy will be placed above it so I don't think it's really
possible to hit a 0 address.


  Commit: 023883a8346076b2869516c7c0c2fd9e1f139acb
      https://github.com/llvm/llvm-project/commit/023883a8346076b2869516c7c0c2fd9e1f139acb
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-07-16 (Thu, 16 Jul 2020)

  Changed paths:
    M llvm/include/llvm/Analysis/ObjCARCAnalysisUtils.h
    M llvm/include/llvm/IR/Argument.h
    M llvm/lib/Analysis/MemoryBuiltins.cpp
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
    M llvm/lib/IR/Function.cpp
    M llvm/lib/IR/Mangler.cpp
    M llvm/lib/Target/ARM/ARMCallLowering.cpp
    M llvm/lib/Transforms/IPO/DeadArgumentElimination.cpp
    M llvm/lib/Transforms/Scalar/DeadStoreElimination.cpp
    M llvm/lib/Transforms/Utils/InlineFunction.cpp

  Log Message:
  -----------
  IR: Rename Argument::hasPassPointeeByValueAttr to prepare for byref

When the byref attribute is added, there will need to be two similar
functions for the existing cases which have an associate value copy,
and byref which does not. Most, but not all of the existing uses will
use the existing version.

The associated size function added by D82679 also needs to
contextually differ, and will help eliminate a few places still
relying on pointee element types.


  Commit: d909764cc763ae4cdf2125e0adfe288afa829f5b
      https://github.com/llvm/llvm-project/commit/d909764cc763ae4cdf2125e0adfe288afa829f5b
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2020-07-16 (Thu, 16 Jul 2020)

  Changed paths:
    M llvm/lib/IR/Attributes.cpp

  Log Message:
  -----------
  Use findEnumAttribute helper for preallocated


Compare: https://github.com/llvm/llvm-project/compare/b16dfbead21a...d909764cc763


More information about the All-commits mailing list