[all-commits] [llvm/llvm-project] caa3b2: [Attributor][FIX] Do not treat byval args as local...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Fri Aug 27 11:12:29 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: caa3b28260cf4af02a4a684921e1fecf0e44725a
      https://github.com/llvm/llvm-project/commit/caa3b28260cf4af02a4a684921e1fecf0e44725a
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-08-27 (Fri, 27 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/ArgumentPromotion/attrs.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/byval-2.ll
    M llvm/test/Transforms/Attributor/ArgumentPromotion/byval.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/2009-09-24-byval-ptr.ll
    M llvm/test/Transforms/Attributor/readattrs.ll
    M llvm/test/Transforms/Attributor/value-simplify.ll

  Log Message:
  -----------
  [Attributor][FIX] Do not treat byval args as local memory (for now)

For now we do should not treat byval arguments as local copies performed
on the call edge, though, in general we should. To make that happen we
need to teach various passes, e.g., DSE, about the copy effect of a
byval. That would also allow us to mark functions only accessing byval
arguments as readnone again, atguably their acceses have no effect
outside of the function, like accesses to allocas.

Reviewed By: kuter

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


  Commit: e05940de2a76df8ce77f943d9b8bc81322a03354
      https://github.com/llvm/llvm-project/commit/e05940de2a76df8ce77f943d9b8bc81322a03354
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-08-27 (Fri, 27 Aug 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

  Log Message:
  -----------
  [Attributor][FIX] Recursion via memory needs to be tracked explicitly

Recursion can happen when we see a PHI use the second time or when we
look at a store value operand use again. We already visited the
potential copies and doing so again will just cause endless looping.

Reviewed By: kuter

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


  Commit: 2930c839a5877356db6966409f4f9f2cdbcf3a07
      https://github.com/llvm/llvm-project/commit/2930c839a5877356db6966409f4f9f2cdbcf3a07
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-08-27 (Fri, 27 Aug 2021)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    A clang/test/AST/ast-dump-openmp-begin-declare-variant_reference.cpp

  Log Message:
  -----------
  [OpenMP][FIX] Allow declare variant to work with reference types

Reference types in the return or parameter position did cause the OpenMP
declare variant overload reasoning to give up. We should allow them as
we allow any other type.

This should fix the bug reported on the mailing list:
https://lists.llvm.org/pipermail/openmp-dev/2021-August/004094.html

Reviewed By: ABataev, pdhaliwal

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


Compare: https://github.com/llvm/llvm-project/compare/fe177a1773e4...2930c839a587


More information about the All-commits mailing list