[all-commits] [llvm/llvm-project] 8d7bac: [Attributor][NFC] AAReachability is currently stat...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Thu Jun 17 23:10:52 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8d7bace3b517e4f1ef43375e65f6c4da115ffef8
      https://github.com/llvm/llvm-project/commit/8d7bace3b517e4f1ef43375e65f6c4da115ffef8
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp

  Log Message:
  -----------
  [Attributor][NFC] AAReachability is currently stateless, don't invalidate it

We invalidated AAReachabilityImpl directly which is not helpful and
confusing as we still used it regardless. We now avoid invalidating it
(not needed anyway) and add checks for the state. This has by itself no
actual effect but prepares for later extensions.


  Commit: 39e1876b0649b35de2ca3bff1983be82dca0bbcc
      https://github.com/llvm/llvm-project/commit/39e1876b0649b35de2ca3bff1983be82dca0bbcc
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A llvm/test/Transforms/Attributor/value-simplify-pointer-info.ll

  Log Message:
  -----------
  [Attributor][NFC] Precommit a set of test cases for load simplification


  Commit: ca7563bb02689a7145a7348d8b7a9676189df296
      https://github.com/llvm/llvm-project/commit/ca7563bb02689a7145a7348d8b7a9676189df296
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    A llvm/test/Transforms/Attributor/cgscc_bugs.ll

  Log Message:
  -----------
  [Attributor][NFC] Add test from PR49606

It is not clear to me how we fixed this, I reverted a few candidates but
I couldn't make the test fail. Still worth having it in our regression
suite.


  Commit: 9a23e673caebdd54d8cc285fcad78f18fa2e919a
      https://github.com/llvm/llvm-project/commit/9a23e673caebdd54d8cc285fcad78f18fa2e919a
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/OpenMPOpt.cpp

  Log Message:
  -----------
  [OpenMP][NFC] Expose AAExecutionDomain and rename its getter

The initial use for AAExecutionDomain was to determine if a single
thread executes a block. While this is sometimes informative most
of the time, and for other reasons, we actually want to know if it
is the "initial thread". Thus, the thread that started execution on
the current device. The deduction needs to be adjusted in a follow
up as the methods we use right not are looking for the OpenMP thread
id which is resets whenever a thread enters a parallel region. What
we basically want is to look for `llvm.nvvm.read.ptx.sreg.ntid.x` and
equivalent functions.


  Commit: 9959eee0015a97f3eb6bdb1b7b1f500190d66f53
      https://github.com/llvm/llvm-project/commit/9959eee0015a97f3eb6bdb1b7b1f500190d66f53
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/depgraph.ll
    A llvm/test/Transforms/Attributor/heap_to_stack_gpu.ll

  Log Message:
  -----------
  [Attributor] Make sure Heap2Stack works properly on a GPU target

If the target stack is not accessible between different running
"threads" we have to make sure not to create allocas for mallocs
that might be used by multiple "threads". The "use check" is
sufficient to prevent this but if we apply the "free check" we have
to make sure the pointer is not communicated to others before
the free is reached.

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


  Commit: d9194b6efb4d287d2a9f2ad216a6fb5b7b260353
      https://github.com/llvm/llvm-project/commit/d9194b6efb4d287d2a9f2ad216a6fb5b7b260353
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp

  Log Message:
  -----------
  [Attributor] Introduce a helper do deal with constant type mismatches

If we simplify values we sometimes end up with type mismatches. If the
value is a constant we can often cast it though to still allow
propagation. The logic is now put into a helper and it replaces some
ad hoc things we did before.

This also introduces the AA namespace for abstract attribute related
functions and types.

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


  Commit: 666dc6f1267dfedcd0502a1f8fbd9aafe463e06a
      https://github.com/llvm/llvm-project/commit/666dc6f1267dfedcd0502a1f8fbd9aafe463e06a
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h
    M llvm/lib/Transforms/IPO/Attributor.cpp
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/multiple_callbacks.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constant.ll
    M llvm/test/Transforms/Attributor/IPConstantProp/return-constants.ll
    M llvm/test/Transforms/Attributor/internalize.ll

  Log Message:
  -----------
  [Attributor] Use a centralized value simplification interface

To allow outside AAs that simplify values we need to ensure all value
simplification goes through the Attributor, not AAValueSimplify (or any
of the other AAs we have already like AAPotentialValues). This patch
also introduces an interface for the outside AAs to register
simplification callbacks for an IRPosition. To make this work as
expected we have to pass IRPositions instead of Values in
AAValueSimplify, which makes sense by itself.


  Commit: 3d6df0108b48358b8cdc6cf3267300c217fe823c
      https://github.com/llvm/llvm-project/commit/3d6df0108b48358b8cdc6cf3267300c217fe823c
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

  Changed paths:
    M llvm/include/llvm/Transforms/IPO/Attributor.h

  Log Message:
  -----------
  [Attributor] Allow to skip the initial update for a new AA

Users might want to run initialize for a set of AAs without an
intermediate update step. Running update eagerly is not a requirement
anyway so we make it optional.


  Commit: 30c9d68ad93af7f420f6d01f91adf12ff36254a0
      https://github.com/llvm/llvm-project/commit/30c9d68ad93af7f420f6d01f91adf12ff36254a0
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2021-06-18 (Fri, 18 Jun 2021)

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

  Log Message:
  -----------
  [Attributor][FIX] Arguments of unknown functions can be undef

This should fix PR50683. The wrong assumption was that we
could always know what the callee is when we replace a call site
argument with undef. We wanted to know that to remove the `noundef`
that might be attached to the argument. Since no callee means we
did the propagation on the caller site, there is no need to remove
an attribute. It is only needed if we replace all uses and therefore
pass `undef` instead of the value that was passed in otherwise.


Compare: https://github.com/llvm/llvm-project/compare/c6b5a25eeb33...30c9d68ad93a


More information about the All-commits mailing list