[all-commits] [llvm/llvm-project] b27bdf: [Attributor][FIX] Handle function pointers properl...

Johannes Doerfert via All-commits all-commits at lists.llvm.org
Mon Aug 17 21:39:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b27bdf955a74e1050645ef5482498a834e9dfc1e
      https://github.com/llvm/llvm-project/commit/b27bdf955a74e1050645ef5482498a834e9dfc1e
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-17 (Mon, 17 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/IPConstantProp/openmp_parallel_for.ll
    M llvm/test/Transforms/Attributor/callbacks.ll
    M llvm/test/Transforms/Attributor/liveness.ll
    M llvm/test/Transforms/Attributor/misc.ll
    M llvm/test/Transforms/Attributor/nonnull.ll

  Log Message:
  -----------
  [Attributor][FIX] Handle function pointers properly in AANonNull

Before we tired to create a dominator tree for a declaration when we
wanted to determine if the function pointer is `nonnull`. We now avoid
looking at global values if `Value::getPointerDereferenceableBytes` not
already determined `nonnull`.


  Commit: 858c75f7d19c14002eb81bcbc747bf708f92b1a9
      https://github.com/llvm/llvm-project/commit/858c75f7d19c14002eb81bcbc747bf708f92b1a9
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-17 (Mon, 17 Aug 2020)

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

  Log Message:
  -----------
  [Attributor][NFC] Directly return proper type to avoid casts


  Commit: 1d99c3d7073888517e3557c1b522ed273bbe188c
      https://github.com/llvm/llvm-project/commit/1d99c3d7073888517e3557c1b522ed273bbe188c
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-17 (Mon, 17 Aug 2020)

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

  Log Message:
  -----------
  [Attributor] We (should) keep the CG updated so we can mark it as preserved


  Commit: 8abd69aa9e8c21b9958f531b03ad9801ec850154
      https://github.com/llvm/llvm-project/commit/8abd69aa9e8c21b9958f531b03ad9801ec850154
  Author: Johannes Doerfert <johannes at jdoerfert.de>
  Date:   2020-08-17 (Mon, 17 Aug 2020)

  Changed paths:
    M llvm/lib/Transforms/IPO/AttributorAttributes.cpp
    M llvm/test/Transforms/Attributor/dereferenceable-1.ll
    M llvm/test/Transforms/Attributor/heap_to_stack.ll
    M llvm/test/Transforms/Attributor/liveness.ll
    M llvm/test/Transforms/Attributor/noreturn_async.ll

  Log Message:
  -----------
  [Attributor] Bail early if AAMemoryLocation cannot derive anything

Before this change we looked through all memory operations in a function
even if the first was an unknown call that could do anything. This did
cost a lot of time but there is little use to do so. We also avoid
creating AAs for things that we would have looked at in case no other AA
will; that is the reason for the test changes.

Running only the attributor-cgscc pass on a IR version of
`llvm-test-suite/MultiSource/Applications/SPASS/clause.c` reduced the
time we spend in `AAMemoryLocation::update` from 4% total to
0.9% (disclaimer: no accurate measurements).


Compare: https://github.com/llvm/llvm-project/compare/00d7b7d014f9...8abd69aa9e8c


More information about the All-commits mailing list