[all-commits] [llvm/llvm-project] d5d75f: [Attributor] Provide a command line option that li...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Tue Sep 8 22:54:57 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d5d75f61e5fbeb290944ee5d28d6cd13fd40f223
      https://github.com/llvm/llvm-project/commit/d5d75f61e5fbeb290944ee5d28d6cd13fd40f223
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

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

  Log Message:
  -----------
  [Attributor] Provide a command line option that limits recursion depth

In `MultiSource/Benchmarks/tramp3d-v4/tramp3d-v4.cpp` we initialized
attributes until stack frame ~35k caused space to run out. The initial
size 1024 is pretty much random.


  Commit: 2600c9e2efce1dc4c64870b00a45ae0082c685fc
      https://github.com/llvm/llvm-project/commit/2600c9e2efce1dc4c64870b00a45ae0082c685fc
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

  Changed paths:
    M llvm/test/Transforms/Attributor/noalias.ll

  Log Message:
  -----------
  [Attributor] Re-enable a run line in noalias.ll

This was disabled as we were looking for a weird CGSCC problem. I
think/hope we fixed it as there were a lot of updates recently. I could
never reproduce this locally so I'll use the pre-commit phab builds to
confirm this suspicion and if they seem to be happy I'll assume this is
fixed.

Reviewed By: sstefan1

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


  Commit: c0ab901bddd5cb80c71848a426b7eaa2882b2ef5
      https://github.com/llvm/llvm-project/commit/c0ab901bddd5cb80c71848a426b7eaa2882b2ef5
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

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

  Log Message:
  -----------
  [Attributor] Selectively look at the callee even when there are operand bundles

While operand bundles carry unpredictable semantics, we know some of
them and can therefore "ignore" them. In this case we allow to look at
the declaration of `llvm.assume` when asked for the attributes at a call
site. The assume operand bundles we have do not invalidate the
declaration attributes.

We cannot test this in isolation because the llvm.assume attributes are
determined by the parser. However, a follow up patch will provide test
coverage.


  Commit: cefd2a2c705877feebd909a8537b89a8d1d575cc
      https://github.com/llvm/llvm-project/commit/cefd2a2c705877feebd909a8537b89a8d1d575cc
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

  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/callbacks.ll

  Log Message:
  -----------
  [Attributor] Cleanup `IRPosition::getArgNo` usages

As we handle callback calls we need to disambiguate the call site
argument number from the callee argument number. While always equal in
non-callback calls, a callback comes with a partial parameter-argument
mapping so there is no implicit correspondence. Here we split
`IRPosition::getArgNo()` into two public functions, `getCallSiteArgNo()`
and `getCalleeArgNo()`. Usages are adjusted to pick the right one for
their purpose. This fixed some problems that would have been exposed as
we more aggressively optimize callbacks.


  Commit: 849146ba93fe14989ea0b727b055854b23e5c5e5
      https://github.com/llvm/llvm-project/commit/849146ba93fe14989ea0b727b055854b23e5c5e5
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-09-09 (Wed, 09 Sep 2020)

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

  Log Message:
  -----------
  [Attributor] Associate the callback callee with a call site argument (if any)

If we have a callback, call site arguments were already associated with
the callback callee. Now we also associate the function with the
callback callee, thus we know ensure that the following holds true (if
all return nonnull):
   `getAssociatedArgument()->getParent() == getAssociatedFunction()`

To test this an early exit from
  `AAMemoryBehaviorCallSiteArgument::initialize``
is included as well. Without the change to getAssociatedFunction() this
kind of early exit for declarations would cause callback call site
arguments to miss out.


Compare: https://github.com/llvm/llvm-project/compare/c58dfbdc8182...849146ba93fe


More information about the All-commits mailing list